本文整理汇总了C++中ACE_Module_Type::name方法的典型用法代码示例。如果您正苦于以下问题:C++ ACE_Module_Type::name方法的具体用法?C++ ACE_Module_Type::name怎么用?C++ ACE_Module_Type::name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACE_Module_Type
的用法示例。
在下文中一共展示了ACE_Module_Type::name方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
ACE_Module_Type *
ACE_Stream_Type::find (const ACE_TCHAR *mod_name) const
{
ACE_TRACE ("ACE_Stream_Type::find");
for (ACE_Module_Type *m = this->head_;
m != 0;
m = m->link ())
if (ACE_OS::strcmp (m->name (), mod_name) == 0)
return m;
return 0;
}
示例2: fini
int
ACE_Stream_Type::fini (void) const
{
ACE_TRACE ("ACE_Stream_Type::fini");
void *obj = this->object ();
MT_Stream *str = (MT_Stream *) obj;
for (ACE_Module_Type *m = this->head_; m != 0;)
{
ACE_Module_Type *t = m->link ();
// Final arg is an indication to *not* delete the Module.
str->remove (m->name (),
MT_Module::M_DELETE_NONE);
m = t;
}
str->close ();
return ACE_Service_Type_Impl::fini ();
}
示例3:
int
ACE_Stream_Type::remove (ACE_Module_Type *mod)
{
ACE_TRACE ("ACE_Stream_Type::remove");
ACE_Module_Type *prev = 0;
void *obj = this->object ();
MT_Stream *str = (MT_Stream *) obj;
int result = 0;
for (ACE_Module_Type *m = this->head_; m != 0; )
{
// We need to do this first so we don't bomb out if we delete m!
ACE_Module_Type *link = m->link ();
if (m == mod)
{
if (prev == 0)
this->head_ = link;
else
prev->link (link);
// Final arg is an indication to *not* delete the Module.
if (str->remove (m->name (),
MT_Module::M_DELETE_NONE) == -1)
result = -1;
// Do not call m->fini (); as this will result in a double delete
// of the ACE_Module_type when ACE_Service_Repository::fini is called
}
else
prev = m;
m = link;
}
return result;
}