| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
DataEvent< T, TID > Class Template ReferenceEvent type for passing around data (or pointers to data). In a state machine, use a SignalTrans to test for a specific data value and make the sid the address of the node posting the event. More...
Inheritance diagram for DataEvent< T, TID >:
![]() Detailed Descriptiontemplate<class T, int TID = -1>
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| void | setData (const T &d) |
| assigns d to the internal data | |
| const T & | getData () const |
| returns data | |
| T & | getData () |
| returns data | |
| virtual unsigned int | getBinSize () const |
| should return the minimum size needed if using binary format (i.e. not XML) | |
| virtual unsigned int | loadBinaryBuffer (const char buf[], unsigned int len) |
| load from binary format | |
| virtual unsigned int | saveBinaryBuffer (char buf[], unsigned int len) const |
| save to binary format | |
| virtual void | loadXML (xmlNode *node) |
| load from XML format | |
| virtual void | saveXML (xmlNode *node) const |
| save to XML format | |
| virtual classTypeID_t | getClassTypeID () const |
| All subclasses should override this and return a unique ID for their class. | |
| virtual void | getDataFromString (std::stringstream &s) |
| virtual void | sendDataToString (std::stringstream &s) const |
| template<> | |
| void | getDataFromString (std::stringstream &ss) |
| template<> | |
| void | getDataFromString (std::stringstream &ss) |
| template<> | |
| void | getDataFromString (std::stringstream &ss) |
| template<> | |
| void | getDataFromString (std::stringstream &ss) |
| template<> | |
| void | getDataFromString (std::stringstream &ss) |
| template<> | |
| void | getDataFromString (std::stringstream &ss) |
| template<> | |
| void | sendDataToString (std::stringstream &ss) const |
| template<> | |
| void | sendDataToString (std::stringstream &ss) const |
| template<> | |
| void | sendDataToString (std::stringstream &ss) const |
| template<> | |
| void | sendDataToString (std::stringstream &ss) const |
| template<> | |
| void | sendDataToString (std::stringstream &ss) const |
| template<> | |
| void | sendDataToString (std::stringstream &ss) const |
| template<> | |
| void | getDataFromString (std::stringstream &ss) |
| template<> | |
| void | getDataFromString (std::stringstream &ss) |
| template<> | |
| void | getDataFromString (std::stringstream &ss) |
| template<> | |
| void | getDataFromString (std::stringstream &ss) |
| template<> | |
| void | getDataFromString (std::stringstream &ss) |
| template<> | |
| void | getDataFromString (std::stringstream &ss) |
| template<> | |
| void | sendDataToString (std::stringstream &ss) const |
| template<> | |
| void | sendDataToString (std::stringstream &ss) const |
| template<> | |
| void | sendDataToString (std::stringstream &ss) const |
| template<> | |
| void | sendDataToString (std::stringstream &ss) const |
| template<> | |
| void | sendDataToString (std::stringstream &ss) const |
| template<> | |
| void | sendDataToString (std::stringstream &ss) const |
Constructors | |
| DataEvent () | |
| copy constructor | |
| DataEvent (const T &d, EventGeneratorID_t gid, size_t sid, EventTypeID_t tid, unsigned int dur=0) | |
| copy constructor | |
| DataEvent (const T &d, EventGeneratorID_t gid, size_t sid, EventTypeID_t tid, unsigned int dur, const std::string &n, float mag) | |
| copy constructor | |
| DataEvent (const DataEvent &evt) | |
| copy constructor | |
| const DataEvent & | operator= (const DataEvent &evt) |
| assignment | |
| virtual EventBase * | clone () const |
| copy constructor | |
Static Public Member Functions | |
| static unsigned int | encode (const T &x, char buf[], unsigned int cap) |
| static unsigned int | decode (T &x, const char buf[], unsigned int cap) |
Static Protected Member Functions | |
| static EventBase::classTypeID_t | registerDataType (EventBase::classTypeID_t classid) |
| this silliness is to work around parsing issue in gcc 3.3 branch | |
Protected Attributes | |
| T | data |
| the data being communicated | |
Static Protected Attributes | |
| static const EventBase::classTypeID_t | autoRegisterDataEvent = DataEvent<T,TID>::registerDataType(makeClassTypeID("DATA")+(TID<0?static_cast<EventBase::classTypeID_t>(getTypeRegistry().getNumTypes()):static_cast<EventBase::classTypeID_t>(TID))) |
| causes class type id to automatically be regsitered with EventBase's FamilyFactory (getTypeRegistry()) | |
copy constructor
Definition at line 15 of file DataEvent.h.
| DataEvent< T, TID >::DataEvent | ( | const T & | d, | |
| EventGeneratorID_t | gid, | |||
| size_t | sid, | |||
| EventTypeID_t | tid, | |||
| unsigned int | dur = 0 | |||
| ) |
copy constructor
Definition at line 16 of file DataEvent.h.
| DataEvent< T, TID >::DataEvent | ( | const T & | d, | |
| EventGeneratorID_t | gid, | |||
| size_t | sid, | |||
| EventTypeID_t | tid, | |||
| unsigned int | dur, | |||
| const std::string & | n, | |||
| float | mag | |||
| ) |
copy constructor
Definition at line 17 of file DataEvent.h.
copy constructor
Definition at line 20 of file DataEvent.h.
| static unsigned int DataEvent< T, TID >::decode | ( | T & | x, | |
| const char | buf[], | |||
| unsigned int | cap | |||
| ) | [static] |
Definition at line 33 of file DataEvent.h.
Referenced by DataEvent< T, TID >::loadBinaryBuffer().
| static unsigned int DataEvent< T, TID >::encode | ( | const T & | x, | |
| char | buf[], | |||
| unsigned int | cap | |||
| ) | [static] |
Definition at line 32 of file DataEvent.h.
Referenced by DataEvent< T, TID >::saveBinaryBuffer().
| unsigned int DataEvent< T, TID >::getBinSize | ( | ) | const [virtual] |
should return the minimum size needed if using binary format (i.e. not XML)
Reimplemented from EventBase.
Definition at line 85 of file DataEvent.h.
| virtual classTypeID_t DataEvent< T, TID >::getClassTypeID | ( | ) | const [virtual] |
All subclasses should override this and return a unique ID for their class.
All IDs corresponding to all-capital letters are reserved for future framework expansion. (Thus, user subclasses should contain at least one lower-case letter.) This code can be used when serializing to allow quick identification of the class type by the receiver.
Reimplemented from EventBase.
Definition at line 41 of file DataEvent.h.
| T& DataEvent< T, TID >::getData | ( | ) |
returns data
Definition at line 30 of file DataEvent.h.
| const T& DataEvent< T, TID >::getData | ( | ) | const |
returns data
Definition at line 29 of file DataEvent.h.
Referenced by SignalTrans< T >::doEvent(), PitchDetector::doEvent(), BufferedImageGenerator::doEvent(), LookAtMarkers::Search::doStart(), LookAtMarkers::TrackMarker::doStart(), StateNode::extractSignal(), SpeechNode::preStart(), SoundNode::preStart(), DynamicMotionSequenceNode::preStart(), and StateNode::tryExtractSignal().
| void DataEvent< double,-1 >::getDataFromString | ( | std::stringstream & | ss | ) |
| void DataEvent< int,-1 >::getDataFromString | ( | std::stringstream & | ss | ) |
| void DataEvent< unsigned int,-1 >::getDataFromString | ( | std::stringstream & | ss | ) |
| void DataEvent< unsigned short int,-1 >::getDataFromString | ( | std::stringstream & | ss | ) |
| void DataEvent< unsigned char,-1 >::getDataFromString | ( | std::stringstream & | ss | ) |
| void DataEvent< double,-1 >::getDataFromString | ( | std::stringstream & | ss | ) |
Definition at line 8 of file DataEvent.cc.
Definition at line 7 of file DataEvent.cc.
| void DataEvent< int,-1 >::getDataFromString | ( | std::stringstream & | ss | ) |
Definition at line 6 of file DataEvent.cc.
| void DataEvent< unsigned int,-1 >::getDataFromString | ( | std::stringstream & | ss | ) |
Definition at line 5 of file DataEvent.cc.
| void DataEvent< unsigned short int,-1 >::getDataFromString | ( | std::stringstream & | ss | ) |
Definition at line 4 of file DataEvent.cc.
| void DataEvent< unsigned char,-1 >::getDataFromString | ( | std::stringstream & | ss | ) |
Definition at line 3 of file DataEvent.cc.
| void DataEvent< T, TID >::getDataFromString | ( | std::stringstream & | s | ) | [virtual] |
Definition at line 146 of file DataEvent.h.
Referenced by DataEvent< T, TID >::loadXML().
| unsigned int DataEvent< T, TID >::loadBinaryBuffer | ( | const char | buf[], | |
| unsigned int | len | |||
| ) | [virtual] |
| static EventBase::classTypeID_t DataEvent< T, TID >::registerDataType | ( | EventBase::classTypeID_t | classid | ) | [static, protected] |
this silliness is to work around parsing issue in gcc 3.3 branch
Definition at line 50 of file DataEvent.h.
| unsigned int DataEvent< T, TID >::saveBinaryBuffer | ( | char | buf[], | |
| unsigned int | len | |||
| ) | const [virtual] |
| void DataEvent< double,-1 >::sendDataToString | ( | std::stringstream & | ss | ) | const |
| void DataEvent< int,-1 >::sendDataToString | ( | std::stringstream & | ss | ) | const |
| void DataEvent< unsigned int,-1 >::sendDataToString | ( | std::stringstream & | ss | ) | const |
| void DataEvent< unsigned short int,-1 >::sendDataToString | ( | std::stringstream & | ss | ) | const |
| void DataEvent< unsigned char,-1 >::sendDataToString | ( | std::stringstream & | ss | ) | const |
| void DataEvent< double,-1 >::sendDataToString | ( | std::stringstream & | ss | ) | const |
Definition at line 15 of file DataEvent.cc.
Definition at line 14 of file DataEvent.cc.
| void DataEvent< int,-1 >::sendDataToString | ( | std::stringstream & | ss | ) | const |
Definition at line 13 of file DataEvent.cc.
| void DataEvent< unsigned int,-1 >::sendDataToString | ( | std::stringstream & | ss | ) | const |
Definition at line 12 of file DataEvent.cc.
| void DataEvent< unsigned short int,-1 >::sendDataToString | ( | std::stringstream & | ss | ) | const |
Definition at line 11 of file DataEvent.cc.
| void DataEvent< unsigned char,-1 >::sendDataToString | ( | std::stringstream & | ss | ) | const |
Definition at line 10 of file DataEvent.cc.
| void DataEvent< T, TID >::sendDataToString | ( | std::stringstream & | s | ) | const [virtual] |
Definition at line 158 of file DataEvent.h.
Referenced by DataEvent< T, TID >::saveXML().
| void DataEvent< T, TID >::setData | ( | const T & | d | ) |
assigns d to the internal data
Definition at line 28 of file DataEvent.h.
const EventBase::classTypeID_t DataEvent< T, TID >::autoRegisterDataEvent = DataEvent<T,TID>::registerDataType(makeClassTypeID("DATA")+(TID<0?static_cast<EventBase::classTypeID_t>(getTypeRegistry().getNumTypes()):static_cast<EventBase::classTypeID_t>(TID))) [static, protected] |
causes class type id to automatically be regsitered with EventBase's FamilyFactory (getTypeRegistry())
Definition at line 61 of file DataEvent.h.
Referenced by DataEvent< T >::getClassTypeID().
the data being communicated
Definition at line 47 of file DataEvent.h.
Referenced by DataEvent< T, TID >::getBinSize(), DataEvent< T >::getData(), DataEvent< T, TID >::getDataFromString(), DataEvent< T, TID >::loadBinaryBuffer(), DataEvent< T >::operator=(), DataEvent< T, TID >::saveBinaryBuffer(), DataEvent< T, TID >::sendDataToString(), and DataEvent< T >::setData().
|
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:06 2016 by Doxygen 1.6.3 |