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

#include <EncoderBase.h>

Inheritance diagram for Atlas::EncoderBase:
Collaboration diagram for Atlas::EncoderBase:

Public Member Functions

 EncoderBase (Atlas::Bridge &b)
 You will need to implement this in subclasses. More...
 
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

Base class forwarding to Atlas::Bridge as skeleton for other encoders

This class is useful when building your own encoders that work on top of Bridge (hence taking one as an argument).

It forwards all requests to a protected Bridge b, hence you can inherit from it and your encoder can be used as a Bridge (for instance, as argument to another encoder) without you needing to implement all these forwarding requests.

Of course your encoder does not have to inherit from EncoderBase - you could offer a completely different interface from that of bridge.

See also
Bridge

Definition at line 30 of file EncoderBase.h.

Constructor & Destructor Documentation

◆ EncoderBase()

Atlas::EncoderBase::EncoderBase ( Atlas::Bridge b)
inlineexplicit

You will need to implement this in subclasses.

Definition at line 34 of file EncoderBase.h.

Member Function Documentation

◆ listEnd()

void Atlas::EncoderBase::listEnd ( )
inline

Definition at line 60 of file EncoderBase.h.

◆ listFloatItem()

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

Definition at line 58 of file EncoderBase.h.

◆ listIntItem()

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

Definition at line 57 of file EncoderBase.h.

◆ listListItem()

void Atlas::EncoderBase::listListItem ( )
inline

Definition at line 56 of file EncoderBase.h.

◆ listMapItem()

void Atlas::EncoderBase::listMapItem ( )
inline

Definition at line 55 of file EncoderBase.h.

◆ listStringItem()

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

Definition at line 59 of file EncoderBase.h.

◆ mapEnd()

void Atlas::EncoderBase::mapEnd ( )
inline

Definition at line 52 of file EncoderBase.h.

◆ mapFloatItem()

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

Definition at line 48 of file EncoderBase.h.

◆ mapIntItem()

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

Definition at line 46 of file EncoderBase.h.

◆ mapListItem()

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

Definition at line 44 of file EncoderBase.h.

◆ mapMapItem()

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

Definition at line 42 of file EncoderBase.h.

◆ mapStringItem()

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

Definition at line 50 of file EncoderBase.h.

◆ streamBegin()

void Atlas::EncoderBase::streamBegin ( )
inline

Definition at line 38 of file EncoderBase.h.

◆ streamEnd()

void Atlas::EncoderBase::streamEnd ( )
inline

Definition at line 40 of file EncoderBase.h.

◆ streamMessage()

void Atlas::EncoderBase::streamMessage ( )
inline

Definition at line 39 of file EncoderBase.h.

Member Data Documentation

◆ m_b

Atlas::Bridge& Atlas::EncoderBase::m_b
protected

The bridge that requests are forwarded to.

Definition at line 64 of file EncoderBase.h.

Referenced by Atlas::Objects::ObjectsEncoder::streamObjectsMessage().


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