Atlas-C++
|
Base class for decoders that take Atlas::Message::Object. More...
#include <DecoderBase.h>
Public Member Functions | |
void | streamBegin () override |
Begin an Atlas stream. | |
void | streamMessage () override |
Start a message in an Atlas stream. | |
void | streamEnd () override |
Ends the Atlas stream. | |
void | mapMapItem (std::string name) override |
Starts a map object to the currently streamed map. | |
void | mapListItem (std::string name) override |
Starts a list object to the currently streamed map. | |
void | mapIntItem (std::string name, long) override |
Adds an integer to the currently streames map. | |
void | mapFloatItem (std::string name, double) override |
Adds a float to the currently streamed map. | |
void | mapStringItem (std::string name, std::string) override |
Adds a string to the currently streamed map. | |
void | mapEnd () override |
Ends the currently streamed map. | |
void | listMapItem () override |
Starts a map object in the currently streamed list. | |
void | listListItem () override |
Starts a list object in the currently streamed list. | |
void | listIntItem (long) override |
Adds an integer to the currently streames list. | |
void | listFloatItem (double) override |
Adds a float to the currently streamed list. | |
void | listStringItem (std::string) override |
Adds a string to the currently streamed list. | |
void | listEnd () override |
Ends the currently streamed list. | |
Protected Types | |
enum | State { STATE_STREAM, STATE_MAP, STATE_LIST } |
Our current decoding state. | |
Protected Member Functions | |
virtual void | messageArrived (MapType obj)=0 |
Override this - called when an object was received. | |
Protected Attributes | |
std::stack< State > | m_state |
The state stack. | |
std::stack< MapType > | m_maps |
The map stack. | |
std::stack< ListType > | m_lists |
The list stack. | |
std::stack< std::string > | m_names |
Names for maps and lists. | |
Base class for decoders that take Atlas::Message::Object.
This class is passed to a codec as receiver bridge. It decodes a stream into Message::Object objects, and after completion calls the abstract messageArrived() method. This is to be overridden by base classes, which might, for instance, provide an object queue or a callback method for arrived messages.
Copyright 2000-2004 the respective authors.
This document can be licensed under the terms of the GNU Free Documentation License or the GNU General Public License and may be freely distributed under the terms given by one of these licenses.