Atlas  0.7.0
Networking protocol for the Worldforge system.
Atlas Funky Encoder

A compile-time-semantics-checking-<<-style encoder. More...

Classes

class  Atlas::Funky::BeginMessage
 
class  Atlas::Funky::EndMessage
 
class  Atlas::Funky::BeginMap
 
class  Atlas::Funky::EndMap
 
class  Atlas::Funky::BeginList
 
class  Atlas::Funky::EndList
 
class  Atlas::Funky::EncMapValue< B, T >
 
class  Atlas::Funky::EncMap< B, T >
 
class  Atlas::Funky::EncList< B, T >
 
class  Atlas::Funky::FunkyEncoder< B >
 
class  Atlas::Funky::Tokens
 

Detailed Description

A compile-time-semantics-checking-<<-style encoder.

This encoder is composed of several classes which each have different operator<<. You can use it to send a message through a bridge in a format similar to the following:

using namespace Funky;
Funky::Encoder enc(&myBridge);
enc << Token::begin_message
    << Token::begin_map
       << "an int" << 1234
       << "a float" << 3.142
       << "a string" << "Hello World!"
       << "a list" << Token::begin_list
          << 5678
          << 2.181
          << "another string!"
       << Token::end_list
    << Token::end_map
    << Token::end_message;

The special thing is that it will perform semantic checking automatically at compile time via a template stack.

Author
Stefanus Du Toit sdt@g.nosp@m.mx.n.nosp@m.et, with help of Mike Day miked.nosp@m.ay@c.nosp@m.orpli.nosp@m.nk.c.nosp@m.om.au
See also
Atlas::Bridge