本文整理汇总了C++中Invocation::add_notify_incident方法的典型用法代码示例。如果您正苦于以下问题:C++ Invocation::add_notify_incident方法的具体用法?C++ Invocation::add_notify_incident怎么用?C++ Invocation::add_notify_incident使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Invocation
的用法示例。
在下文中一共展示了Invocation::add_notify_incident方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: text
void
Log::parse_notify_poa_helper_i (void)
{
Invocation *inv = this->thr_->current_invocation ();
if (inv == 0)
{
ACE_ERROR ((LM_ERROR,"%d: notify_poa_helper line = %s, no current invocation on thread\n", this->offset_, this->info_));
return;
}
bool activate = ACE_OS::strstr (this->info_, "Activating") != 0;
char *idpos = ACE_OS::strstr (this->info_, "id = ");
long objid = ACE_OS::strtol (idpos + 5, 0, 10);
idpos = ACE_OS::strstr (idpos + 5, "in POA : ");
long poaid = ACE_OS::strtol (idpos + 10, 0, 10);
char buffer[100];
ACE_OS::sprintf (buffer,"Notify object %s, object id %ld, POA %ld on line %ld",
(activate ? "activation" : "deactivation"), objid, poaid,
(unsigned long)this->offset_);
ACE_CString text (buffer);
inv->add_notify_incident (text, this->offset_);
}
示例2: if
void
Log::parse_notify_object_i (void)
{
Invocation *inv = this->thr_->current_invocation ();
if (inv == 0)
{
// ACE_ERROR ((LM_ERROR,"%d: notify_object line = %s, no current invocation on thread\n", this->offset_, this->info_));
}
char *ptr = ACE_OS::strstr (this->info_, "object:") + 7;
u_long objid = ACE_OS::strtol (ptr, &ptr, 16);
char note[100];
note[0] = 0;
if (ACE_OS::strstr (ptr, "created") != 0)
{
::sprintf (note, "Created notify object %lx",objid);
#if 0
NotifyObject notobj = new NotifyObject (objid, this->offset_, this->timestamp_);
this->hostproc_->add_notify_obj (notobj);
#endif
}
else if (ACE_OS::strstr (ptr, "destroyed") != 0)
{
::sprintf (note, "Destroyed notify object %lx",objid);
#if 0
NotifyObject notobj = this->hostproc_->find_notify_obj (objid);
if (notobj == 0)
{
ACE_ERROR ((LM_ERROR, "%d: could not find notify object %lx\n", this->offset_, objid));
}
else
{
notobj->destroyed (this->offset_, this->timestamp_);
}
#endif
}
else if (ACE_OS::strstr (ptr, "incr ") != 0)
{
ptr = ACE_OS::strchr (ptr, '=');
int count = ACE_OS::strtol (ptr + 2, 0, 10);
::sprintf (note, "increment reference notify object %lx, count now %d",objid, count);
#if 0
NotifyObject notobj = this->hostproc_->find_notify_obj (objid);
if (notobj == 0)
{
notobj = new NotifyObject (objid, this->offset_, this->timestamp_);
this->hostproc_->add_notify_obj (notobj);
}
notobj->incr (this->offset_, this->timestamp_);
#endif
}
else if (ACE_OS::strstr (ptr, "decr ") != 0)
{
ptr = ACE_OS::strchr (ptr, '=');
int count = ACE_OS::strtol (ptr + 2, 0, 10);
::sprintf (note, "decrement reference notify object %lx, count now %d",objid, count);
#if 0
NotifyObject notobj = this->hostproc_->find_notify_obj (objid);
if (notobj == 0)
{
ACE_ERROR ((LM_ERROR, "%d: could not find notify object %x\n", this->offset_, objid));
}
else
{
notobj->decr (this->offset_, this->timestamp_);
}
#endif
}
ACE_CString text (note);
if (inv)
inv->add_notify_incident (text, this->offset_);
}