NAME

Atlas::Message::DecoderBase - Base class for decoders that take Atlas::Message::Object.

SYNOPSIS


#include <DecoderBase.h>

Inherits Atlas::Bridge.

Inherited by Atlas::Message::QueuedDecoder, and Atlas::Objects::ObjectsDecoder.

Public Member Functions


virtual void streamBegin ()
Begin an Atlas stream.
virtual void streamMessage ()
Start a message in an Atlas stream.
virtual void streamEnd ()
Ends the Atlas stream.
virtual void mapMapItem (const std::string &name)
Starts a map object to the currently streamed map.
virtual void mapListItem (const std::string &name)
Starts a list object to the currently streamed map.
virtual void mapIntItem (const std::string &name, long)
Adds an integer to the currently streames map.
virtual void mapFloatItem (const std::string &name, double)
Adds a float to the currently streamed map.
virtual void mapStringItem (const std::string &name, const std::string &)
Adds a string to the currently streamed map.
virtual void mapEnd ()
Ends the currently streamed map.
virtual void listMapItem ()
Starts a map object in the currently streamed list.
virtual void listListItem ()
Starts a list object in the currently streamed list.
virtual void listIntItem (long)
Adds an integer to the currently streames list.
virtual void listFloatItem (double)
Adds a float to the currently streamed list.
virtual void listStringItem (const std::string &)
Adds a string to the currently streamed list.
virtual void listEnd ()
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 (const 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.

Detailed Description

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.

See also:

Atlas::Bridge

Atlas::Codec

Object

Author:

Stefanus Du Toit <sdt [at] gmx.net>

Author

Generated automatically by Doxygen for Atlas-C++ from the source code.