Warning, file /include/yaml-cpp/emittermanip.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef EMITTERMANIP_H_62B23520_7C8E_11DE_8A39_0800200C9A66
0002 #define EMITTERMANIP_H_62B23520_7C8E_11DE_8A39_0800200C9A66
0003
0004 #if defined(_MSC_VER) || \
0005 (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
0006 (__GNUC__ >= 4))
0007 #pragma once
0008 #endif
0009
0010 #include <string>
0011
0012 namespace YAML {
0013 enum EMITTER_MANIP {
0014
0015 Auto,
0016 TagByKind,
0017 Newline,
0018
0019
0020 EmitNonAscii,
0021 EscapeNonAscii,
0022 EscapeAsJson,
0023
0024
0025
0026 SingleQuoted,
0027 DoubleQuoted,
0028 Literal,
0029
0030
0031 LowerNull,
0032 UpperNull,
0033 CamelNull,
0034 TildeNull,
0035
0036
0037 YesNoBool,
0038 TrueFalseBool,
0039 OnOffBool,
0040 UpperCase,
0041 LowerCase,
0042 CamelCase,
0043 LongBool,
0044 ShortBool,
0045
0046
0047 Dec,
0048 Hex,
0049 Oct,
0050
0051
0052 BeginDoc,
0053 EndDoc,
0054
0055
0056 BeginSeq,
0057 EndSeq,
0058 Flow,
0059 Block,
0060
0061
0062 BeginMap,
0063 EndMap,
0064 Key,
0065 Value,
0066
0067
0068
0069 LongKey
0070 };
0071
0072 struct _Indent {
0073 _Indent(int value_) : value(value_) {}
0074 int value;
0075 };
0076
0077 inline _Indent Indent(int value) { return _Indent(value); }
0078
0079 struct _Alias {
0080 _Alias(const std::string& content_) : content(content_) {}
0081 std::string content;
0082 };
0083
0084 inline _Alias Alias(const std::string& content) { return _Alias(content); }
0085
0086 struct _Anchor {
0087 _Anchor(const std::string& content_) : content(content_) {}
0088 std::string content;
0089 };
0090
0091 inline _Anchor Anchor(const std::string& content) { return _Anchor(content); }
0092
0093 struct _Tag {
0094 struct Type {
0095 enum value { Verbatim, PrimaryHandle, NamedHandle };
0096 };
0097
0098 explicit _Tag(const std::string& prefix_, const std::string& content_,
0099 Type::value type_)
0100 : prefix(prefix_), content(content_), type(type_) {}
0101 std::string prefix;
0102 std::string content;
0103 Type::value type;
0104 };
0105
0106 inline _Tag VerbatimTag(const std::string& content) {
0107 return _Tag("", content, _Tag::Type::Verbatim);
0108 }
0109
0110 inline _Tag LocalTag(const std::string& content) {
0111 return _Tag("", content, _Tag::Type::PrimaryHandle);
0112 }
0113
0114 inline _Tag LocalTag(const std::string& prefix, const std::string content) {
0115 return _Tag(prefix, content, _Tag::Type::NamedHandle);
0116 }
0117
0118 inline _Tag SecondaryTag(const std::string& content) {
0119 return _Tag("", content, _Tag::Type::NamedHandle);
0120 }
0121
0122 struct _Comment {
0123 _Comment(const std::string& content_) : content(content_) {}
0124 std::string content;
0125 };
0126
0127 inline _Comment Comment(const std::string& content) { return _Comment(content); }
0128
0129 struct _Precision {
0130 _Precision(int floatPrecision_, int doublePrecision_)
0131 : floatPrecision(floatPrecision_), doublePrecision(doublePrecision_) {}
0132
0133 int floatPrecision;
0134 int doublePrecision;
0135 };
0136
0137 inline _Precision FloatPrecision(int n) { return _Precision(n, -1); }
0138
0139 inline _Precision DoublePrecision(int n) { return _Precision(-1, n); }
0140
0141 inline _Precision Precision(int n) { return _Precision(n, n); }
0142 }
0143
0144 #endif