本文整理汇总了C++中ACE_Arg_Shifter::cur_arg_strncasecmp方法的典型用法代码示例。如果您正苦于以下问题:C++ ACE_Arg_Shifter::cur_arg_strncasecmp方法的具体用法?C++ ACE_Arg_Shifter::cur_arg_strncasecmp怎么用?C++ ACE_Arg_Shifter::cur_arg_strncasecmp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACE_Arg_Shifter
的用法示例。
在下文中一共展示了ACE_Arg_Shifter::cur_arg_strncasecmp方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
TAO_Notify_Tests_EventChannel_Command::init (ACE_Arg_Shifter& arg_shifter)
{
if (arg_shifter.is_anything_left ())
{
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Create")) == 0) // -Create ec_name factory_name [COLLOCATED]
{
this->command_ = CREATE;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
this->factory_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("COLLOCATED")) == 0)
{
this->collocated_ = 1;
}
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("COLOCATED")) == 0) // grandfather in misspelled
{
this->collocated_ = 1;
ACE_DEBUG ((LM_WARNING, "TAO_Notify_Tests_EventChannel_Command::init --"
" warning: deprecated misspelled COLOCATED option used.\n"));
}
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Destroy")) == 0) // -Destroy ec_name
{
this->command_ = DESTROY;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Set_QoS")) == 0) // -Set_QoS ec_name [Qos Options]
{
this->command_ = SET_QOS;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
TAO_Notify_Tests_Options_Parser qos_parser;
qos_parser.execute (this->qos_, arg_shifter);
}
}
}
示例2: if
void
TAO_Notify_Tests_Application_Command::init (ACE_Arg_Shifter& arg_shifter)
{
if (arg_shifter.is_anything_left ())
{
/// -Init | Run | Shutdown
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Init")) == 0)
{
this->command_ = INIT;
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Run")) == 0)
{
this->command_ = RUN;
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-WaitForEvents")) == 0)
{
this->command_ = WAIT_FOR_EVENTS;
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Shutdown")) == 0)
{
this->command_ = SHUTDOWN;
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-DumpStats")) == 0)
{
this->command_ = DUMP_STATE;
arg_shifter.consume_arg ();
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Samples")) == 0)
{
this->dump_samples_ = 1;
arg_shifter.consume_arg ();
}
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-SignalPeer")) == 0)
{
this->command_ = SIGNAL_PEER;
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-WaitToStart")) == 0)
{
this->command_ = WAIT_TO_START;
arg_shifter.consume_arg ();
}
}
}
示例3:
int
DT_Creator::dt_task_init (ACE_Arg_Shifter& arg_shifter)
{
static int dt_index = 0;
time_t start_time = 0;
int load = 0;
int iter = 0;
int importance = 0;
char *job_name = 0;
int dist = 0;
const ACE_TCHAR* current_arg = 0;
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Importance")) == 0)
{
arg_shifter.consume_arg ();
current_arg = arg_shifter.get_current ();
importance = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-Start_Time"))))
{
start_time = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-Iter"))))
{
iter = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-Load"))))
{
load = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-JobName"))))
{
job_name = (char *)current_arg;
dist = 1;
arg_shifter.consume_arg ();
}
dt_list_ [dt_index++] = this->create_thr_task (importance,
start_time,
load,
iter,
dist,
job_name);
return 0;
}
示例4: if
int
TAO_Notify_Tests_Periodic_Consumer::init_state (ACE_Arg_Shifter& arg_shifter)
{
// First, let the base class look for options.
if (TAO_Notify_Tests_StructuredPushConsumer::init_state (arg_shifter) == -1)
return -1;
const ACE_TCHAR *current_arg = 0;
while (arg_shifter.is_anything_left ())
{
if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-MaxCount"))))
{
this->max_count_ = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
if (max_count_ == 0)
{
if (this->client_)
this->client_->done (this);
}
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Check_Priority")) == 0)
{
this->check_priority_ = 1;
arg_shifter.consume_arg ();
}
else
{
break;
}
} /* while */
return 0;
}
示例5: if
void
TAO_Notify_Tests_Options_Parser::execute (CosNotification::QoSProperties& qos, ACE_Arg_Shifter& arg_shifter)
{
const ACE_TCHAR *current_arg = 0;
NotifyExt::Priority default_priority = NotifyExt::minPriority;
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-ThreadPool")) == 0) // -ThreadPool [-Threads static_threads] [-Priority default_priority]
{
arg_shifter.consume_arg ();
CORBA::ULong static_threads = 1u;
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Threads")) == 0)
{
arg_shifter.consume_arg ();
current_arg = arg_shifter.get_current ();
static_threads = static_cast<CORBA::ULong> (ACE_OS::atoi (current_arg));
arg_shifter.consume_arg ();
}
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Priority")) == 0)
{
arg_shifter.consume_arg ();
current_arg = arg_shifter.get_current ();
const int priority= ACE_OS::atoi (current_arg);
if (priority < NotifyExt::minPriority)
{
NotifyExt::Priority default_priority = NotifyExt::minPriority;
ACE_DEBUG ((LM_DEBUG, "-Priority %d is too small (min priority %d used)\n",
priority, static_cast<int> (default_priority)));
}
else if (NotifyExt::maxPriority < priority)
{
NotifyExt::Priority default_priority = NotifyExt::maxPriority;
ACE_DEBUG ((LM_DEBUG, "-Priority %d is too large (max priority %d used)\n",
priority, static_cast<int> (default_priority)));
}
else
default_priority = static_cast<NotifyExt::Priority> (priority);
arg_shifter.consume_arg ();
}
NotifyExt::ThreadPoolParams tp_params
= { NotifyExt::CLIENT_PROPAGATED, default_priority,
0, static_threads, 0, default_priority, 0, 0, 0
};
qos.length (1);
qos[0].name = CORBA::string_dup (NotifyExt::ThreadPool);
qos[0].value <<= tp_params;
} /* ThreadPool */
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Lanes")) == 0) // -Lanes lane_count -Lane prio static_thr dy_thr
{
arg_shifter.consume_arg ();
current_arg = arg_shifter.get_current ();
int lanecount = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
NotifyExt::ThreadPoolLanesParams tpl_params;
tpl_params.priority_model = NotifyExt::CLIENT_PROPAGATED;
tpl_params.server_priority = default_priority;
tpl_params.stacksize = 0;
tpl_params.lanes.length (lanecount);
tpl_params.allow_borrowing = 0;
tpl_params.allow_request_buffering = 0;
tpl_params.max_buffered_requests = 0;
tpl_params.max_request_buffer_size = 0;
int l_index = 0;
//parse lane values ...
while (arg_shifter.is_anything_left ())
{
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Lane")) == 0)
{
arg_shifter.consume_arg ();
// read priority
tpl_params.lanes[l_index].lane_priority = ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
// static thread count
tpl_params.lanes[l_index].static_threads = ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
// dynamic thread count
tpl_params.lanes[l_index].dynamic_threads = ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "QoS Parser parsed lane: - %d, %d, %d\n",
tpl_params.lanes[l_index].lane_priority, tpl_params.lanes[l_index].static_threads, tpl_params.lanes[l_index].dynamic_threads));
l_index++;
//.........这里部分代码省略.........
示例6: if
void
TAO_Notify_Tests_Filter_Command::init (ACE_Arg_Shifter& arg_shifter)
{
if (arg_shifter.is_anything_left ())
{
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-CreateFactory")) == 0) // -Create factory_name ec
{
this->command_ = CREATE_FACTORY;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); // FF name
arg_shifter.consume_arg ();
this->factory_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); //EC
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-CreateFilter")) == 0) // -CreateFilter filter_name filterfactory_name
{
this->command_ = CREATE_FILTER;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); // Filter name
arg_shifter.consume_arg ();
this->factory_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); //FF
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Add_Constraint")) == 0) // -Add_Constraint filter_name constraint_expr
{
this->command_ = ADD_CONSTRAINT;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); // Filter name
arg_shifter.consume_arg ();
this->constraint_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); //Constraint
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Add_Filter")) == 0) // -Add_Filter filter_name FilterAdmin_Name
{
this->command_ = ADD_FILTER;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); // Filter name
arg_shifter.consume_arg ();
this->factory_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); //FilterAdmin
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Destroy")) == 0) // -Destroy filter_name
{
this->command_ = DESTROY;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); // filter
arg_shifter.consume_arg ();
}
}
}
示例7: if
void
TAO_Notify_Tests_Periodic_Consumer_Command::init (ACE_Arg_Shifter& arg_shifter)
{
if (arg_shifter.is_anything_left ())
{
/// -Create consumer_name admin_name -POA [POA_name] consumer_specific_options
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Create")) == 0)
{
this->command_ = CREATE;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
int is_relay = 0;
int is_direct = 0;
ACE_CString relay_destination;
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Relay")) == 0)
{
is_relay = 1;
arg_shifter.consume_arg ();
relay_destination = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Direct")) == 0)
{
is_direct = 1;
arg_shifter.consume_arg ();
}
TAO_Notify_Tests_Periodic_Consumer* consumer = 0;
// create the consumer
if (is_relay == 1)
consumer = new TAO_Notify_Tests_Relay_Consumer (relay_destination);
else if (is_direct == 1)
consumer = new TAO_Notify_Tests_Direct_Consumer ();
else
consumer = new TAO_Notify_Tests_Periodic_Consumer ();
consumer->set_name (this->name_);
TAO_Notify_Tests_Activation_Manager* act_mgr = 0;
LOOKUP_MANAGER->resolve (act_mgr);
{
act_mgr->_register (consumer, this->name_.c_str ());
}
consumer->init_state (arg_shifter);
} /* -Create */
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Subscription")) == 0) // -Subscription admin_name +added_type1 +-added_type2 ... -added_type3 -added_type4..
{
this->command_ = SUBSCRIPTION;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
TAO_Notify_Tests_Options_Parser options_parser;
options_parser.execute (this->added_, this->removed_, arg_shifter);
} /* Subscription */
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Disconnect")) == 0) //
{
this->command_ = DISCONNECT;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
} /* disconnect */
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Deactivate")) == 0) //
{
this->command_ = DEACTIVATE;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
} /* deactivate */
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Status")) == 0) //
{
this->command_ = DUMP_STATE;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
} /* -Dump */
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Set_QoS")) == 0) // -Set_QoS ec_name [Qos Options]
{
this->command_ = SET_QOS;
//.........这里部分代码省略.........
示例8: if
int
POA_Holder::init (ACE_Arg_Shifter& arg_shifter)
{
ACE_DEBUG ((LM_DEBUG,
"Init POA\n"));
const ACE_TCHAR *current_arg = 0;
POA_name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ()); // Read the name of the POA
arg_shifter.consume_arg ();
while (arg_shifter.is_anything_left ())
{
if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-PriorityModel"))))
{
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("CLIENT")) == 0)
priority_model_ = RTCORBA::CLIENT_PROPAGATED;
else
priority_model_ = RTCORBA::SERVER_DECLARED;
arg_shifter.consume_arg ();
server_priority_ = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-Lanes"))))
{
int lanecount = ACE_OS::atoi (current_arg);
lanes_.length (lanecount);
arg_shifter.consume_arg ();
int l_index = 0;
//parse lane values ...
while (arg_shifter.is_anything_left ())
{
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Lane")) == 0)
{
arg_shifter.consume_arg ();
// read priority
lanes_[l_index].lane_priority = ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
// static thread count
lanes_[l_index].static_threads = ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
// dynamic thread count
lanes_[l_index].dynamic_threads = ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
//if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "lane parsed - %d, %d, %d\n",
lanes_[l_index].lane_priority, lanes_[l_index].static_threads, lanes_[l_index].dynamic_threads));
l_index++;
}
else
break;
} /* while -- lane values */
} /* if -Lanes */
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-ThreadPool")) == 0)
{
ACE_DEBUG ((LM_DEBUG,
"Thread Pool\n"));
arg_shifter.consume_arg ();
thread_pool_ = 1;
// read priority
tp_static_threads_ = ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
tp_dynamic_threads_ = ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
tp_priority_ = ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
ACE_DEBUG ((LM_DEBUG,
"Thread Pool Initialized\n"));
}
else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-Bands"))))
{
ACE_DEBUG ((LM_DEBUG,
"Initializing Bands\n"));
int bandcount = ACE_OS::atoi (current_arg);
bands_.length (bandcount);
arg_shifter.consume_arg ();
int b_index = 0;
//parse band values ...
while (arg_shifter.is_anything_left ())
{
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Band")) == 0)
{
arg_shifter.consume_arg ();
// read low
bands_[b_index].low = ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
//.........这里部分代码省略.........
示例9: if
void
TAO_Notify_Tests_Periodic_Supplier_Command::init (ACE_Arg_Shifter& arg_shifter)
{
if (arg_shifter.is_anything_left ())
{
/// -Create supplier_name admin_name -POA [POA_name] supplier_specific_options
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Create")) == 0)
{
this->command_ = CREATE;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
int is_direct = 0;
ACE_CString direct_target;
if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Direct")) == 0)
{
is_direct = 1;
arg_shifter.consume_arg ();
direct_target = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
}
TAO_Notify_Tests_Periodic_Supplier* supplier = 0;
// create the supplier
if (is_direct == 1)
supplier = new TAO_Notify_Tests_Direct_Supplier (direct_target);
else
supplier = new TAO_Notify_Tests_Periodic_Supplier ();
supplier->set_name (this->name_);
TAO_Notify_Tests_Activation_Manager* act_mgr = 0;
LOOKUP_MANAGER->resolve (act_mgr);
{
act_mgr->_register (supplier, this->name_.c_str ());
}
supplier->init_state (arg_shifter);
} /* -Create */
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Offer")) == 0) // -Offer supplier_name +added_type1 +-added_type2 ... -added_type3 -added_type4..
{
this->command_ = OFFER;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
TAO_Notify_Tests_Options_Parser options_parser;
options_parser.execute (this->added_, this->removed_, arg_shifter);
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Disconnect")) == 0) //
{
this->command_ = DISCONNECT;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
} /* disconnect */
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Deactivate")) == 0) //
{
this->command_ = DEACTIVATE;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
} /* deactivate */
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Status")) == 0) //
{
this->command_ = DUMP_STATE;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
} /* -Dump */
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-Set_QoS")) == 0) // -Set_QoS ec_name [Qos Options]
{
this->command_ = SET_QOS;
arg_shifter.consume_arg ();
this->name_ = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
TAO_Notify_Tests_Options_Parser qos_parser;
qos_parser.execute (this->qos_, arg_shifter);
}
} /* if */
//.........这里部分代码省略.........
示例10: if
int
TAO_Notify_Tests_Periodic_Supplier::init_state (ACE_Arg_Shifter& arg_shifter)
{
// First, let the base class look for options.
if (TAO_Notify_Tests_StructuredPushSupplier::init_state (arg_shifter) == -1)
return -1;
const ACE_TCHAR *current_arg = 0;
while (arg_shifter.is_anything_left ())
{
if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-EventType"))))
{
this->event_.type ("*", ACE_TEXT_ALWAYS_CHAR(current_arg)) ;
zeroth_event.type ("*", ACE_TEXT_ALWAYS_CHAR(current_arg)) ;
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-FilterLongData")) == 0) // -FilterLongData name value
{
arg_shifter.consume_arg ();
ACE_CString name = ACE_TEXT_ALWAYS_CHAR(arg_shifter.get_current ());
arg_shifter.consume_arg ();
CORBA::Long value = (CORBA::Long)ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
CORBA::Any buffer;
buffer <<= (CORBA::Long) value;
this->event_.filter (name.c_str (), buffer);
}
else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-Priority"))))
{
priority_ = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
CORBA::Any buffer;
buffer <<= (CORBA::Short) this->priority_;
this->event_.qos (CosNotification::Priority, buffer);
}
else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-Period"))))
{
period_ = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ExecTime"))))
{
exec_time_ = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-Phase"))))
{
phase_ = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-Iter"))))
{
iter_ = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
if (stats_.init (iter_) == -1)
return -1;
}
else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-Load"))))
{
load_ = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-RunTime")))) // in seconds
{
run_time_ = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
else
{
ACE_DEBUG ((LM_DEBUG, "parse Task unknown option %s\n",
arg_shifter.get_current ()));
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "event type %s, priority %d, period %duS, exec_time %duS, phase %duS, iter %d, load %d\n",
event_.type(), priority_, period_, exec_time_, phase_, iter_, load_));
break;
}
}
return 0;
}