11 |
12 | #include "../anchor.h"
13 |
14 | namespace YAML {
15 | /**
16 | * An object that stores and retrieves values correlating to {@link anchor_t}
17 | * values.
18 | *
19 | * Efficient implementation that can make assumptions about how
20 | * {@code anchor_t} values are assigned by the {@link Parser} class.
21 | */
22 | template
23 | class AnchorDict {
24 | public:
25 | AnchorDict() : m_data{} {}
26 | void Register(anchor_t anchor, T value) {
27 | if (anchor > m_data.size()) {
28 | m_data.resize(anchor);
29 | }
30 | m_data[anchor - 1] = value;
31 | }
32 |
33 | T Get(anchor_t anchor) const { return m_data[anchor - 1]; }
34 |
35 | private:
36 | std::vector m_data;
37 | };
38 | } // namespace YAML
39 |
40 | #endif // ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
41 |
--------------------------------------------------------------------------------
/src/yaml-cpp/include/yaml-cpp/node/detail/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
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 | memory() : m_nodes{} {}
26 | node& create_node();
27 | void merge(const memory& rhs);
28 |
29 | private:
30 | using Nodes = std::set;
31 | Nodes m_nodes;
32 | };
33 |
34 | class YAML_CPP_API memory_holder {
35 | public:
36 | memory_holder() : m_pMemory(new memory) {}
37 |
38 | node& create_node() { return m_pMemory->create_node(); }
39 | void merge(memory_holder& rhs);
40 |
41 | private:
42 | shared_memory m_pMemory;
43 | };
44 | } // namespace detail
45 | } // namespace YAML
46 |
47 | #endif // VALUE_DETAIL_MEMORY_H_62B23520_7C8E_11DE_8A39_0800200C9A66
48 |
--------------------------------------------------------------------------------
/src/yaml-cpp/include/yaml-cpp/node/iterator.h:
--------------------------------------------------------------------------------
1 | #ifndef VALUE_ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66
2 | #define VALUE_ITERATOR_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 "yaml-cpp/dll.h"
11 | #include "yaml-cpp/node/node.h"
12 | #include "yaml-cpp/node/detail/iterator_fwd.h"
13 | #include "yaml-cpp/node/detail/iterator.h"
14 | #include
15 | #include
16 | #include
17 |
18 | // Assert in place so gcc + libc++ combination properly builds
19 | static_assert(std::is_constructible::value, "Node must be copy constructable");
20 |
21 | namespace YAML {
22 | namespace detail {
23 | struct iterator_value : public Node, std::pair {
24 | iterator_value() = default;
25 | explicit iterator_value(const Node& rhs)
26 | : Node(rhs),
27 | std::pair(Node(Node::ZombieNode), Node(Node::ZombieNode)) {}
28 | explicit iterator_value(const Node& key, const Node& value)
29 | : Node(Node::ZombieNode), std::pair(key, value) {}
30 | };
31 | }
32 | }
33 |
34 | #endif // VALUE_ITERATOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66
35 |
--------------------------------------------------------------------------------
/src/yaml-cpp/include/yaml-cpp/stlemitter.h:
--------------------------------------------------------------------------------
1 | #ifndef STLEMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
2 | #define STLEMITTER_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
11 | #include
12 | #include
13 | #include