Atlas 0.7.0
Networking protocol for the Worldforge system.
|
#include <Formatter.h>
Public Member Functions | |
Formatter (std::ostream &s, Atlas::Bridge &b) | |
void | streamBegin () override |
void | streamMessage () override |
void | streamEnd () override |
void | mapMapItem (std::string name) override |
void | mapListItem (std::string name) override |
void | mapIntItem (std::string name, std::int64_t) override |
void | mapFloatItem (std::string name, double) override |
void | mapStringItem (std::string name, std::string) override |
void | mapNoneItem (std::string name) override |
void | mapEnd () override |
void | listMapItem () override |
void | listListItem () override |
void | listIntItem (std::int64_t) override |
void | listFloatItem (double) override |
void | listStringItem (std::string) override |
void | listNoneItem () override |
void | listEnd () override |
void | setSpacing (int s) |
Protected Attributes | |
std::ostream & | m_stream |
Bridge & | m_bridge |
int | m_indent |
int | m_spacing |
Atlas stream formatter
This class implements the Bridge interface that accepts an Atlas stream. It copies the input stream to an output bridge, inserting formatting characters according to settings defined at construction time.
Definition at line 23 of file Formatter.h.
Atlas::Formatter::Formatter | ( | std::ostream & | s, |
Atlas::Bridge & | b | ||
) |
Definition at line 14 of file Formatter.cpp.
|
overridevirtual |
Ends the currently streamed list.
Implements Atlas::Bridge.
Reimplemented in Atlas::MultiLineListFormatter.
Definition at line 127 of file Formatter.cpp.
|
overridevirtual |
Adds a float to the currently streamed list.
Implements Atlas::Bridge.
Reimplemented in Atlas::MultiLineListFormatter.
Definition at line 113 of file Formatter.cpp.
|
overridevirtual |
Adds an integer to the currently streamed list.
Implements Atlas::Bridge.
Reimplemented in Atlas::MultiLineListFormatter.
Definition at line 108 of file Formatter.cpp.
|
overridevirtual |
Starts a list object in the currently streamed list.
Implements Atlas::Bridge.
Reimplemented in Atlas::MultiLineListFormatter.
Definition at line 103 of file Formatter.cpp.
|
overridevirtual |
Starts a map object in the currently streamed list.
Implements Atlas::Bridge.
Reimplemented in Atlas::MultiLineListFormatter.
Definition at line 95 of file Formatter.cpp.
|
overridevirtual |
Adds an empty item to the currently streamed list.
Implements Atlas::Bridge.
Reimplemented in Atlas::MultiLineListFormatter.
Definition at line 123 of file Formatter.cpp.
|
overridevirtual |
Adds a string to the currently streamed list.
Implements Atlas::Bridge.
Reimplemented in Atlas::MultiLineListFormatter.
Definition at line 118 of file Formatter.cpp.
|
overridevirtual |
Ends the currently streamed map.
Implements Atlas::Bridge.
Definition at line 86 of file Formatter.cpp.
|
overridevirtual |
Adds a float to the currently streamed map.
Implements Atlas::Bridge.
Definition at line 66 of file Formatter.cpp.
|
overridevirtual |
Adds an integer to the currently streamed map.
Implements Atlas::Bridge.
Definition at line 59 of file Formatter.cpp.
|
overridevirtual |
Starts a list object to the currently streamed map.
Implements Atlas::Bridge.
Reimplemented in Atlas::MultiLineListFormatter.
Definition at line 53 of file Formatter.cpp.
|
overridevirtual |
Starts a map object to the currently streamed map.
Implements Atlas::Bridge.
Definition at line 45 of file Formatter.cpp.
|
overridevirtual |
Adds a none item to the currently streamed map.
Implements Atlas::Bridge.
Definition at line 80 of file Formatter.cpp.
|
overridevirtual |
Adds a string to the currently streamed map.
Implements Atlas::Bridge.
Definition at line 73 of file Formatter.cpp.
|
inline |
Definition at line 49 of file Formatter.h.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Start a message in an Atlas stream.
Implements Atlas::Bridge.
Definition at line 28 of file Formatter.cpp.
|
protected |
Definition at line 56 of file Formatter.h.
|
protected |
Definition at line 57 of file Formatter.h.
|
protected |
Definition at line 58 of file Formatter.h.
|
protected |
Definition at line 55 of file Formatter.h.