Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | Related Pages

Atlas::Message::DecoderBase Class Reference

Base class for decoders that take Atlas::Message::Element. More...

#include <DecoderBase.h>

Inheritance diagram for Atlas::Message::DecoderBase:

Atlas::Bridge Atlas::Message::QueuedDecoder Atlas::Objects::Decoder List of all members.

Public Member Functions

virtual void streamBegin ()
virtual void streamMessage (const Map &)
virtual void streamEnd ()
virtual void mapItem (const std::string &name, const Map &)
virtual void mapItem (const std::string &name, const List &)
virtual void mapItem (const std::string &name, long)
virtual void mapItem (const std::string &name, double)
virtual void mapItem (const std::string &name, const std::string &)
virtual void mapEnd ()
virtual void listItem (const Map &)
virtual void listItem (const List &)
virtual void listItem (long)
virtual void listItem (double)
virtual void listItem (const std::string &)
virtual void listEnd ()

Protected Types

enum  State { STATE_STREAM, STATE_MAP, STATE_LIST }
 Our current decoding state.


Protected Member Functions

virtual void objectArrived (const Element &obj)=0
 Override this - called when an object was received.


Protected Attributes

std::stack< Statestate
 The state stack.

std::stack< Element::MapType > maps
 The map stack.

std::stack< Element::ListType > lists
 The list stack.

std::stack< std::string > names
 Names for maps and lists.


Detailed Description

Base class for decoders that take Atlas::Message::Element.

This class is passed to a codec as receiver bridge. It decodes a stream into Message::Element objects, and after completion calls the abstract objectArrived() 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

Element

Author:
Stefanus Du Toit <sdt@gmx.net>


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

Copyright 2000 the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.