File indexing completed on 2025-01-18 10:15:44
0001 #ifndef EVENTHANDLER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
0002 #define EVENTHANDLER_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 #include "yaml-cpp/anchor.h"
0013 #include "yaml-cpp/emitterstyle.h"
0014
0015 namespace YAML {
0016 struct Mark;
0017
0018 class EventHandler {
0019 public:
0020 virtual ~EventHandler() = default;
0021
0022 virtual void OnDocumentStart(const Mark& mark) = 0;
0023 virtual void OnDocumentEnd() = 0;
0024
0025 virtual void OnNull(const Mark& mark, anchor_t anchor) = 0;
0026 virtual void OnAlias(const Mark& mark, anchor_t anchor) = 0;
0027 virtual void OnScalar(const Mark& mark, const std::string& tag,
0028 anchor_t anchor, const std::string& value) = 0;
0029
0030 virtual void OnSequenceStart(const Mark& mark, const std::string& tag,
0031 anchor_t anchor, EmitterStyle::value style) = 0;
0032 virtual void OnSequenceEnd() = 0;
0033
0034 virtual void OnMapStart(const Mark& mark, const std::string& tag,
0035 anchor_t anchor, EmitterStyle::value style) = 0;
0036 virtual void OnMapEnd() = 0;
0037
0038 virtual void OnAnchor(const Mark& ,
0039 const std::string& ) {
0040
0041 }
0042 };
0043 }
0044
0045 #endif