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

Public Member Functions

 XML (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.
 

Static Public Member Functions

static std::string escape (const std::string &)
 Escapes a string for HTML. More...
 
static std::string unescape (const std::string &)
 Un-escapes a previously "escaped" string for HTML. More...
 

Protected Types

enum  Token { TOKEN_TAG, TOKEN_START_TAG, TOKEN_END_TAG, TOKEN_DATA }
 
enum  State {
  PARSE_NOTHING, PARSE_STREAM, PARSE_MAP, PARSE_LIST,
  PARSE_INT, PARSE_FLOAT, PARSE_STRING
}
 

Protected Member Functions

void tokenTag (char)
 
void tokenStartTag (char)
 
void tokenEndTag (char)
 
void tokenData (char)
 
void parseStartTag ()
 
void parseEndTag ()
 

Protected Attributes

std::istream & m_istream
 
std::ostream & m_ostream
 
Bridgem_bridge
 
Token m_token
 
std::stack< State > m_state
 
std::stack< std::string > m_data
 
std::string m_tag
 
std::string m_name
 

Member Function Documentation

static std::string Atlas::Codecs::XML::escape ( const std::string &  )
static

Escapes a string for HTML.

Parameters
Theoriginal string.
Returns
An escaped string.
static std::string Atlas::Codecs::XML::unescape ( const std::string &  )
static

Un-escapes a previously "escaped" string for HTML.

Parameters
Theoriginal string.
Returns
An unescaped string.

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.