本文整理汇总了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;
}
示例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;
}
示例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;
}