OpenTracker

An Open Architecture for Reconfigurable Tracking based on XML | Contact

ot::EventUtilityNode Class Reference
[Common Classes]

The EventUtilityNode provides the possibility to rename, discard, or add attributes to every event passed to this node. More...

#include <EventUtilityNode.h>

Inheritance diagram for ot::EventUtilityNode:

Inheritance graph
[legend]
Collaboration diagram for ot::EventUtilityNode:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual int isEventGenerator ()
virtual void onEventGenerated (Event &event, Node &generator)
void setRename (const std::string &oldName, const std::string &newName)
void setDiscard (const std::string &discard)
void setCreate (const std::string &type, const std::string &name, const std::string &value)

Protected Attributes

std::string oldName
std::string newName
std::string discard
std::string type
std::string name
std::string value

Friends

class CommonNodeFactory

Detailed Description

The EventUtilityNode provides the possibility to rename, discard, or add attributes to every event passed to this node.

Author:
Jochen von Spiczak

Definition at line 80 of file EventUtilityNode.h.


Member Function Documentation

virtual int ot::EventUtilityNode::isEventGenerator (  )  [inline, virtual]

Returns 1 to show that this node is an event generator.

Returns:
1 because node implements EventGenerator

Reimplemented from ot::Node.

Definition at line 101 of file EventUtilityNode.h.

void ot::EventUtilityNode::onEventGenerated ( Event event,
Node generator 
) [virtual]

This method changes the incoming event and updates the node's observers.

Parameters:
event the incoming event
generator the node that generated the incoming event

Reimplemented from ot::Node.

Definition at line 74 of file EventUtilityNode.cxx.

References ot::Event::addAttribute(), ot::Event::delAttribute(), discard, ot::Event::hasAttribute(), name, newName, oldName, ot::Event::renAttribute(), type, ot::Node::updateObservers(), and value.

void ot::EventUtilityNode::setCreate ( const std::string &  type,
const std::string &  name,
const std::string &  value 
)

Sets the type, name, and value (encoded in strings) of the attribute, which is to be created.

Parameters:
type generic type name of the new attribute
name the name of the new attribute
value the initial value of the new attribute
Returns:

Definition at line 66 of file EventUtilityNode.cxx.

Referenced by ot::CommonNodeFactory::createNode().

void ot::EventUtilityNode::setDiscard ( const std::string &  discard  ) 

Sets the name of the attribute, which is to be discarded.

Parameters:
discard name of the attribute to be discarded

Definition at line 60 of file EventUtilityNode.cxx.

Referenced by ot::CommonNodeFactory::createNode().

void ot::EventUtilityNode::setRename ( const std::string &  oldName,
const std::string &  newName 
)

Sets the old and new name of the attribute, which is to be renamed.

Parameters:
oldName the old name
newName the new name

Definition at line 53 of file EventUtilityNode.cxx.

Referenced by ot::CommonNodeFactory::createNode().


Friends And Related Function Documentation

friend class CommonNodeFactory [friend]

Definition at line 129 of file EventUtilityNode.h.


Member Data Documentation

std::string ot::EventUtilityNode::discard [protected]

the name of the attribute to be discarded

Definition at line 88 of file EventUtilityNode.h.

Referenced by onEventGenerated().

std::string ot::EventUtilityNode::name [protected]

the name of the attribute to be created

Reimplemented from ot::Node.

Definition at line 92 of file EventUtilityNode.h.

Referenced by onEventGenerated().

std::string ot::EventUtilityNode::newName [protected]

the new name of the attribute to be renamed

Definition at line 86 of file EventUtilityNode.h.

Referenced by onEventGenerated().

std::string ot::EventUtilityNode::oldName [protected]

the old name of the attribute to be renamed

Definition at line 84 of file EventUtilityNode.h.

Referenced by onEventGenerated().

std::string ot::EventUtilityNode::type [protected]

the type of the attribute to be created

Reimplemented from ot::Node.

Definition at line 90 of file EventUtilityNode.h.

Referenced by onEventGenerated().

std::string ot::EventUtilityNode::value [protected]

the value of the attribute to be created

Definition at line 94 of file EventUtilityNode.h.

Referenced by onEventGenerated().


The documentation for this class was generated from the following files:

copyright (c) 2006 Graz University of Technology