1 #ifndef EMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
2 #define EMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
4 #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
30 const char *c_str()
const;
31 unsigned size()
const;
44 bool SetIndent(
unsigned n);
45 bool SetPreCommentIndent(
unsigned n);
46 bool SetPostCommentIndent(
unsigned n);
47 bool SetFloatPrecision(
unsigned n);
48 bool SetDoublePrecision(
unsigned n);
67 Emitter& WriteIntegralType(T value);
70 Emitter& WriteStreamable(T value);
73 void PreWriteIntegralType(std::stringstream& str);
74 void PreWriteStreamable(std::stringstream& str);
75 void PostWriteIntegralType(
const std::stringstream& str);
76 void PostWriteStreamable(
const std::stringstream& str);
79 unsigned GetFloatPrecision()
const;
80 unsigned GetDoublePrecision()
const;
83 void PreAtomicWrite();
84 bool GotoNextPreAtomicState();
85 void PostAtomicWrite();
86 void EmitSeparationIfNecessary();
98 void EmitTag(
bool verbatim,
const _Tag& tag);
100 const char *ComputeFullBoolName(
bool b)
const;
101 bool CanEmitNewline()
const;
108 template <
typename T>
114 std::stringstream str;
121 template <
typename T>
127 std::stringstream str;
129 SetStreamablePrecision<T>(str);
136 inline void Emitter::SetStreamablePrecision<float>(std::stringstream& str)
142 inline void Emitter::SetStreamablePrecision<double>(std::stringstream& str)
186 #endif // EMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM