本文整理汇总了C++中HostProcess::proc_name方法的典型用法代码示例。如果您正苦于以下问题:C++ HostProcess::proc_name方法的具体用法?C++ HostProcess::proc_name怎么用?C++ HostProcess::proc_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HostProcess
的用法示例。
在下文中一共展示了HostProcess::proc_name方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: name
void
Session::default_service (const char *addrspec)
{
const char *equal = ACE_OS::strchr(addrspec,'=');
if (equal == 0)
return;
ACE_CString name (addrspec,(equal - addrspec));
Endpoint ep (equal+1);
static long next_def_pid = 0;
--next_def_pid;
HostProcess *hp = new HostProcess ("defaulted",next_def_pid);
hp->proc_name(name);
hp->add_listen_endpoint (ep);
this->processes_.bind(next_def_pid,hp);
this->procs_by_name_.bind(name,hp);
}
示例2: if
void
Log::get_preamble ()
{
char * p = ACE_OS::strstr (this->line_, "(");
char * t = 0;
this->info_ = this->line_;
if (p == 0)
return;
if (p != this->line_)
{
char * x = ACE_OS::strstr (this->line_, "TAO (");
if (x+4 != p)
{
x = ACE_OS::strstr (this->line_, "@(");
if (x + 1 != p)
return;
}
}
long pid = ACE_OS::strtol(p + 1, &t, 10);
if (pid == 0)
return;
long tid = 0;
if ( *t == '|' )
tid = ACE_OS::strtol(t + 1, 0, 10);
else if ( *t != ')')
return; // not either (pid) or (pid|tid)
this->info_ = ACE_OS::strstr (p, ")") + 1;
this->hostproc_ = 0;
for (ACE_DLList_Iterator<HostProcess> i (this->procs_);
!i.done();
i.advance())
{
i.next(this->hostproc_);
if (this->hostproc_->pid() == pid)
{
break;
}
this->hostproc_ = 0;
}
if (this->hostproc_ == 0)
this->hostproc_ = this->session_.find_process(pid);
if (this->hostproc_ == 0)
{
size_t numprocs = this->procs_.size();
this->hostproc_ = new HostProcess (this->origin_,pid);
this->procs_.insert_tail(this->hostproc_);
ACE_CString &procname = this->alias_.length() > 0 ?
this->alias_ : this->origin_;
switch (numprocs)
{
case 0:
this->hostproc_->proc_name(procname);
break;
case 1:
{
ACE_CString a2 = procname + "_1";
HostProcess *first;
if (this->procs_.get(first) == 0)
first->proc_name(a2);
}
//fallthru
default:
{
char ext[10];
ACE_OS::sprintf(ext,"_" ACE_SIZE_T_FORMAT_SPECIFIER_ASCII,numprocs+1);
ACE_CString a2 = procname + ext;
this->hostproc_->proc_name(a2);
}
}
this->session_.add_process (this->hostproc_);
}
this->thr_ = this->hostproc_->find_thread (tid, this->offset_);
return;
}