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


C++ EventType::set_type_context方法代码示例

本文整理汇总了C++中EventType::set_type_context方法的典型用法代码示例。如果您正苦于以下问题:C++ EventType::set_type_context方法的具体用法?C++ EventType::set_type_context怎么用?C++ EventType::set_type_context使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EventType的用法示例。


在下文中一共展示了EventType::set_type_context方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

/*!

\brief Gets event type's parent.
\return Returns event types parent. The returned EvenType will be empty if the event type
has no parent.

*/
dmz::EventType
dmz::EventType::get_parent () const {

   EventType result;

   if (_context) {

      _context->lock.lock ();
      result.set_type_context (_context->parent);
      _context->lock.unlock ();
   }

   return result;
}
开发者ID:ben-sangster,项目名称:dmz,代码行数:21,代码来源:dmzRuntimeEventType.cpp

示例2: result

/*!

\brief Gets next event type child.
\param[in] it RuntimeIterator.
\param[out] type EventType to store next child.
\return Returns dmz::True if the next child is returned. Returns dmz::False if
the event type has no more children to return.

*/
dmz::Boolean
dmz::EventType::get_next_child (RuntimeIterator &it, EventType &type) const {

   Boolean result (False);

   if (_context && (this != &type)) {

      _context->lock.lock ();
      type.set_type_context (_context->table.get_next (it.state.it));
      _context->lock.unlock ();
   }

   if (type) { result = True; }

   return result;
}
开发者ID:ben-sangster,项目名称:dmz,代码行数:25,代码来源:dmzRuntimeEventType.cpp

示例3: current

/*!

\brief Finds Config.
\details Looks for Config up the EventType tree until Config is found or the root
EventType is reached. Uses dmz::Config::lookup_all_config_merged().
\param[in] Name String containing the name of the Config data to find.
\param[out] type EventType that the Config was found in.
\return Returns a Config object. The Config object will be empty if the named Config
can not be found.

*/
dmz::Config
dmz::EventType::find_config (const String &Name, EventType &type) const {

   Config result;

   EventType current (_context);

   while (current) {

      if (current.get_config ().lookup_all_config_merged (Name, result)) {

         type = current;
         current.set_type_context (0);
      }
      else { current.become_parent (); }
   }

   return result;
}
开发者ID:ben-sangster,项目名称:dmz,代码行数:30,代码来源:dmzRuntimeEventType.cpp


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