本文整理汇总了C++中ACE_Module_Type::fini方法的典型用法代码示例。如果您正苦于以下问题:C++ ACE_Module_Type::fini方法的具体用法?C++ ACE_Module_Type::fini怎么用?C++ ACE_Module_Type::fini使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACE_Module_Type
的用法示例。
在下文中一共展示了ACE_Module_Type::fini方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
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;
// This call may end up deleting m, which is ok since we
// don't access it again!
m->fini ();
}
else
prev = m;
m = link;
}
return result;
}
示例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);
// Finalize the Module (this may delete it, but we don't really
// care since we don't access it again).
m->fini ();
m = t;
}
str->close ();
return ACE_Service_Type_Impl::fini ();
}