Atlas 0.7.0
Networking protocol for the Worldforge system.
Atlas::Objects::ObjectsEncoder Class Reference

#include <Encoder.h>

Inheritance diagram for Atlas::Objects::ObjectsEncoder:
Collaboration diagram for Atlas::Objects::ObjectsEncoder:

Public Member Functions

 ObjectsEncoder (Atlas::Bridge &b)
 
 ~ObjectsEncoder () override=default
 The default destructor. More...
 
template<class ObjectData >
void streamObjectsMessage (const Atlas::Objects::SmartPtr< ObjectData > &o)
 
void streamBegin ()
 
void streamMessage ()
 
void streamEnd ()
 
void mapMapItem (const std::string &name)
 
void mapListItem (const std::string &name)
 
void mapIntItem (const std::string &name, std::int64_t i)
 
void mapFloatItem (const std::string &name, double d)
 
void mapStringItem (const std::string &name, const std::string &s)
 
void mapEnd ()
 
void listMapItem ()
 
void listListItem ()
 
void listIntItem (std::int64_t i)
 
void listFloatItem (double d)
 
void listStringItem (const std::string &s)
 
void listEnd ()
 

Protected Attributes

Atlas::Bridgem_b
 The bridge that requests are forwarded to. More...
 

Detailed Description

Objects hierarchy encoder

This Encoder can be used to send objects in the Atlas::Objects hierarchy to a certain Bridge (e.g. a codec).

Simply call the streamMessage member with a pointer to the object to be sent.

See also
Atlas::Objects::Decoder
Author
Stefanus Du Toit sdt@g.nosp@m.mx.n.nosp@m.et

Definition at line 26 of file Encoder.h.

Constructor & Destructor Documentation

◆ ObjectsEncoder()

Atlas::Objects::ObjectsEncoder::ObjectsEncoder ( Atlas::Bridge b)
inlineexplicit

The default constructor.

Parameters
bThe Bridge to which objects are to be sent.

Definition at line 31 of file Encoder.h.

◆ ~ObjectsEncoder()

Atlas::Objects::ObjectsEncoder::~ObjectsEncoder ( )
overridedefault

The default destructor.

Member Function Documentation

◆ listEnd()

void Atlas::EncoderBase::listEnd ( )
inlineinherited

Definition at line 60 of file EncoderBase.h.

◆ listFloatItem()

void Atlas::EncoderBase::listFloatItem ( double  d)
inlineinherited

Definition at line 58 of file EncoderBase.h.

◆ listIntItem()

void Atlas::EncoderBase::listIntItem ( std::int64_t  i)
inlineinherited

Definition at line 57 of file EncoderBase.h.

◆ listListItem()

void Atlas::EncoderBase::listListItem ( )
inlineinherited

Definition at line 56 of file EncoderBase.h.

◆ listMapItem()

void Atlas::EncoderBase::listMapItem ( )
inlineinherited

Definition at line 55 of file EncoderBase.h.

◆ listStringItem()

void Atlas::EncoderBase::listStringItem ( const std::string &  s)
inlineinherited

Definition at line 59 of file EncoderBase.h.

◆ mapEnd()

void Atlas::EncoderBase::mapEnd ( )
inlineinherited

Definition at line 52 of file EncoderBase.h.

◆ mapFloatItem()

void Atlas::EncoderBase::mapFloatItem ( const std::string &  name,
double  d 
)
inlineinherited

Definition at line 48 of file EncoderBase.h.

◆ mapIntItem()

void Atlas::EncoderBase::mapIntItem ( const std::string &  name,
std::int64_t  i 
)
inlineinherited

Definition at line 46 of file EncoderBase.h.

◆ mapListItem()

void Atlas::EncoderBase::mapListItem ( const std::string &  name)
inlineinherited

Definition at line 44 of file EncoderBase.h.

◆ mapMapItem()

void Atlas::EncoderBase::mapMapItem ( const std::string &  name)
inlineinherited

Definition at line 42 of file EncoderBase.h.

◆ mapStringItem()

void Atlas::EncoderBase::mapStringItem ( const std::string &  name,
const std::string &  s 
)
inlineinherited

Definition at line 50 of file EncoderBase.h.

◆ streamBegin()

void Atlas::EncoderBase::streamBegin ( )
inlineinherited

Definition at line 38 of file EncoderBase.h.

◆ streamEnd()

void Atlas::EncoderBase::streamEnd ( )
inlineinherited

Definition at line 40 of file EncoderBase.h.

◆ streamMessage()

void Atlas::EncoderBase::streamMessage ( )
inlineinherited

Definition at line 39 of file EncoderBase.h.

◆ streamObjectsMessage()

template<class ObjectData >
void Atlas::Objects::ObjectsEncoder::streamObjectsMessage ( const Atlas::Objects::SmartPtr< ObjectData > &  o)
inline

Send an object to the bridge.

Parameters
oThe object that is to be sent.

Definition at line 38 of file Encoder.h.

References Atlas::EncoderBase::m_b, Atlas::Bridge::mapEnd(), and Atlas::Bridge::streamMessage().

Member Data Documentation

◆ m_b

Atlas::Bridge& Atlas::EncoderBase::m_b
protectedinherited

The bridge that requests are forwarded to.

Definition at line 64 of file EncoderBase.h.

Referenced by streamObjectsMessage().


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