BRE12
memory.h
1 #ifndef VALUE_DETAIL_MEMORY_H_62B23520_7C8E_11DE_8A39_0800200C9A66
2 #define VALUE_DETAIL_MEMORY_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3 
4 #if defined(_MSC_VER) || \
5  (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
6  (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
7 #pragma once
8 #endif
9 
10 #include <set>
11 
12 #include "yaml-cpp/dll.h"
13 #include "yaml-cpp/node/ptr.h"
14 
15 namespace YAML {
16 namespace detail {
17 class node;
18 } // namespace detail
19 } // namespace YAML
20 
21 namespace YAML {
22 namespace detail {
23 class YAML_CPP_API memory {
24  public:
25  node& create_node();
26  void merge(const memory& rhs);
27 
28  private:
29  typedef std::set<shared_node> Nodes;
30  Nodes m_nodes;
31 };
32 
33 class YAML_CPP_API memory_holder {
34  public:
35  memory_holder() : m_pMemory(new memory) {}
36 
37  node& create_node() { return m_pMemory->create_node(); }
38  void merge(memory_holder& rhs);
39 
40  private:
41  shared_memory m_pMemory;
42 };
43 }
44 }
45 
46 #endif // VALUE_DETAIL_MEMORY_H_62B23520_7C8E_11DE_8A39_0800200C9A66
Definition: memory.h:23
Definition: memory.h:33
Definition: node.h:19
Definition: DrawableObjectLoader.h:10