Atlas-C++
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Atlas::Codecs::Bach Class Reference
Inheritance diagram for Atlas::Codecs::Bach:
Atlas::Codec Atlas::Bridge

Public Member Functions

 Bach (std::istream &in, std::ostream &out, Atlas::Bridge &b)
 
void poll (bool can_read) override
 
void streamBegin () override
 Begin an Atlas stream.
 
void streamMessage () override
 Start a message in an Atlas stream.
 
void streamEnd () override
 Ends the Atlas stream.
 
void mapMapItem (std::string name) override
 Starts a map object to the currently streamed map.
 
void mapListItem (std::string name) override
 Starts a list object to the currently streamed map.
 
void mapIntItem (std::string name, long) override
 Adds an integer to the currently streames map.
 
void mapFloatItem (std::string name, double) override
 Adds a float to the currently streamed map.
 
void mapStringItem (std::string name, std::string) override
 Adds a string to the currently streamed map.
 
void mapEnd () override
 Ends the currently streamed map.
 
void listMapItem () override
 Starts a map object in the currently streamed list.
 
void listListItem () override
 Starts a list object in the currently streamed list.
 
void listIntItem (long) override
 Adds an integer to the currently streames list.
 
void listFloatItem (double) override
 Adds a float to the currently streamed list.
 
void listStringItem (std::string) override
 Adds a string to the currently streamed list.
 
void listEnd () override
 Ends the currently streamed list.
 
unsigned linenum () const
 

Protected Types

enum  State {
  PARSE_INIT, PARSE_STREAM, PARSE_MAP, PARSE_LIST,
  PARSE_NAME, PARSE_DATA, PARSE_INT, PARSE_FLOAT,
  PARSE_STRING, PARSE_LITERAL, PARSE_COMMENT
}
 

Protected Member Functions

bool stringmode () const
 
void parseInit (char)
 
void parseStream (char)
 
void parseMap (char)
 
void parseList (char)
 
void parseData (char)
 
void parseInt (char)
 
void parseFloat (char)
 
void parseString (char)
 
void parseLiteral (char)
 
void parseName (char)
 
void parseComment (char)
 
std::string encodeString (std::string)
 
std::string decodeString (std::string)
 
void writeIntItem (const std::string &, long)
 
void writeFloatItem (const std::string &, double)
 
void writeStringItem (const std::string &, std::string)
 
void writeLine (const std::string &, bool=true, bool=false)
 

Protected Attributes

std::istream & m_istream
 
std::ostream & m_ostream
 
Bridgem_bridge
 
bool m_comma
 
unsigned m_linenum
 
std::string m_name
 
std::string m_data
 
std::stack< State > m_state
 

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

Copyright 2000-2004 the respective authors.

This document can be licensed under the terms of the GNU Free Documentation License or the GNU General Public License and may be freely distributed under the terms given by one of these licenses.