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

Atlas Funky Encoder

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

Compounds

class  BeginList
 Token class representing the beginning of a list. More...

class  BeginMap
 Token class representing the beginning of a map. More...

class  BeginMessage
 Token class representing the beginning of a message. More...

class  EncList
 Encoder in List state. More...

class  EncMap
 Encoder in Map state. More...

class  EncMapValue
 Encoder in map value state. More...

class  Encoder
 The root encoder in "stream" state. More...

class  EndList
 Token class representing the end of a list. More...

class  EndMap
 Token class representing the end of a map. More...

class  EndMessage
 Token class representing the end of a message. More...

class  Tokens
 Tokens representing beginnings and ends of maps/lists. More...


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@gmx.net>, with help of Mike Day <mikeday@corplink.com.au>
See also:
Atlas::Bridge

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.