7 #ifndef ATLAS_CODECS_BACH_H 8 #define ATLAS_CODECS_BACH_H 10 #include <Atlas/Codec.h> 15 namespace Atlas {
namespace Codecs {
27 void poll(
bool can_read)
override;
35 void mapIntItem(std::string name,
long)
override;
47 unsigned linenum()
const {
return m_linenum;}
51 std::istream& m_istream;
52 std::ostream& m_ostream;
72 bool stringmode()
const;
74 std::string m_name, m_data;
75 std::stack<State> m_state;
77 inline void parseInit(
char);
78 inline void parseStream(
char);
79 inline void parseMap(
char);
80 inline void parseList(
char);
81 inline void parseData(
char);
82 inline void parseInt(
char);
83 inline void parseFloat(
char);
84 inline void parseString(
char);
85 inline void parseLiteral(
char);
86 inline void parseName(
char);
87 inline void parseComment(
char);
89 inline std::string encodeString(std::string);
90 inline std::string decodeString(std::string);
92 void writeIntItem(
const std::string &,
long);
93 void writeFloatItem(
const std::string &,
double);
94 void writeStringItem(
const std::string &,std::string);
95 void writeLine(
const std::string &,
bool=
true,
bool=
false);
100 #endif // ATLAS_CODECS_BACH_H void listFloatItem(double) override
Adds a float to the currently streamed list.
void listEnd() override
Ends the currently streamed list.
void listStringItem(std::string) override
Adds a string to the currently streamed list.
void listMapItem() override
Starts a map object in the currently streamed list.
Atlas stream bridge.
Definition: Bridge.h:35
void streamEnd() override
Ends the Atlas stream.
void streamMessage() override
Start a message in an Atlas stream.
void streamBegin() override
Begin an Atlas stream.
The Atlas namespace.
Definition: Bridge.h:20
void mapListItem(std::string name) override
Starts a list object to the currently streamed map.
Atlas stream codec.
Definition: Codec.h:27
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 mapMapItem(std::string name) override
Starts a map object to the currently streamed map.
void mapIntItem(std::string name, long) override
Adds an integer to the currently streames map.
void listIntItem(long) override
Adds an integer to the currently streames list.
void listListItem() override
Starts a list object in the currently streamed list.
void mapEnd() override
Ends the currently streamed map.