当前位置: 首页>>代码示例>>C++>>正文


C++ Invocation::add_notify_incident方法代码示例

本文整理汇总了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_);
}
开发者ID:manut,项目名称:TAO,代码行数:23,代码来源:Log.cpp

示例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_);
}
开发者ID:manut,项目名称:TAO,代码行数:73,代码来源:Log.cpp


注:本文中的Invocation::add_notify_incident方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。