Exemplo n.º 1
0
/*!

\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;
}
Exemplo n.º 2
0
/*!

\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;
}
Exemplo n.º 3
0
/*!

\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;
}