Go to the documentation of this file.00001 #ifndef SCANSCALAR_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
00002 #define SCANSCALAR_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
00003
00004 #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
00005 #pragma once
00006 #endif
00007
00008
00009 #include <string>
00010 #include "regex.h"
00011 #include "stream.h"
00012
00013 namespace YAML_PM
00014 {
00015 enum CHOMP { STRIP = -1, CLIP, KEEP };
00016 enum ACTION { NONE, BREAK, THROW };
00017 enum FOLD { DONT_FOLD, FOLD_BLOCK, FOLD_FLOW };
00018
00019 struct ScanScalarParams {
00020 ScanScalarParams(): eatEnd(false), indent(0), detectIndent(false), eatLeadingWhitespace(0), escape(0), fold(DONT_FOLD),
00021 trimTrailingSpaces(0), chomp(CLIP), onDocIndicator(NONE), onTabInIndentation(NONE), leadingSpaces(false) {}
00022
00023
00024 RegEx end;
00025 bool eatEnd;
00026 int indent;
00027 bool detectIndent;
00028 bool eatLeadingWhitespace;
00029 char escape;
00030 FOLD fold;
00031 bool trimTrailingSpaces;
00032 CHOMP chomp;
00033
00034 ACTION onDocIndicator;
00035 ACTION onTabInIndentation;
00036
00037
00038 bool leadingSpaces;
00039 };
00040
00041 std::string ScanScalar(Stream& INPUT, ScanScalarParams& info);
00042 }
00043
00044 #endif // SCANSCALAR_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
00045