aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yaml-cpp/include
diff options
context:
space:
mode:
authorsobols <sobols@yandex-team.ru>2022-02-10 16:47:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:08 +0300
commit09961b69c61f471ddd594e0fd877df62a8021562 (patch)
tree54a7b60a9526a7104557a033eb0a8d70d64b604c /contrib/libs/yaml-cpp/include
parent4ce8835206f981afa4a61915a49a21fb750416ec (diff)
downloadydb-09961b69c61f471ddd594e0fd877df62a8021562.tar.gz
Restoring authorship annotation for <sobols@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/yaml-cpp/include')
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/contrib/anchordict.h14
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/contrib/graphbuilder.h4
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/dll.h12
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/emitter.h6
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/exceptions.h110
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/node/convert.h76
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/impl.h28
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/iterator.h96
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node.h14
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_data.h8
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_iterator.h78
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_ref.h6
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/node/emit.h16
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/node/impl.h6
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/node/node.h2
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/node/parse.h98
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/node/ptr.h12
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/null.h4
-rw-r--r--contrib/libs/yaml-cpp/include/yaml-cpp/parser.h84
19 files changed, 337 insertions, 337 deletions
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/contrib/anchordict.h b/contrib/libs/yaml-cpp/include/yaml-cpp/contrib/anchordict.h
index 78db9ec928..c84f892fae 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/contrib/anchordict.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/contrib/anchordict.h
@@ -12,13 +12,13 @@
#include "../anchor.h"
namespace YAML {
-/**
- * An object that stores and retrieves values correlating to {@link anchor_t}
- * values.
- *
- * <p>Efficient implementation that can make assumptions about how
- * {@code anchor_t} values are assigned by the {@link Parser} class.
- */
+/**
+ * An object that stores and retrieves values correlating to {@link anchor_t}
+ * values.
+ *
+ * <p>Efficient implementation that can make assumptions about how
+ * {@code anchor_t} values are assigned by the {@link Parser} class.
+ */
template <class T>
class AnchorDict {
public:
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/contrib/graphbuilder.h b/contrib/libs/yaml-cpp/include/yaml-cpp/contrib/graphbuilder.h
index f0a38f2887..f4af6448cc 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/contrib/graphbuilder.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/contrib/graphbuilder.h
@@ -19,8 +19,8 @@ class Parser;
// functions.
class GraphBuilderInterface {
public:
- virtual ~GraphBuilderInterface() = 0;
-
+ virtual ~GraphBuilderInterface() = 0;
+
// Create and return a new node with a null value.
virtual void *NewNull(const Mark &mark, void *pParentNode) = 0;
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/dll.h b/contrib/libs/yaml-cpp/include/yaml-cpp/dll.h
index a32c06b2e3..41e41ace8e 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/dll.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/dll.h
@@ -8,12 +8,12 @@
#endif
// The following ifdef block is the standard way of creating macros which make
-// exporting from a DLL simpler. All files within this DLL are compiled with the
-// yaml_cpp_EXPORTS symbol defined on the command line. This symbol should not
-// be defined on any project that uses this DLL. This way any other project
-// whose source files include this file see YAML_CPP_API functions as being
-// imported from a DLL, whereas this DLL sees symbols defined with this macro as
-// being exported.
+// exporting from a DLL simpler. All files within this DLL are compiled with the
+// yaml_cpp_EXPORTS symbol defined on the command line. This symbol should not
+// be defined on any project that uses this DLL. This way any other project
+// whose source files include this file see YAML_CPP_API functions as being
+// imported from a DLL, whereas this DLL sees symbols defined with this macro as
+// being exported.
#undef YAML_CPP_API
#ifdef YAML_CPP_DLL // Using or Building YAML-CPP DLL (definition defined
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/emitter.h b/contrib/libs/yaml-cpp/include/yaml-cpp/emitter.h
index ef92cc4035..ca461ca8e9 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/emitter.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/emitter.h
@@ -122,7 +122,7 @@ class YAML_CPP_API Emitter : private noncopyable {
bool CanEmitNewline() const;
private:
- std::unique_ptr<EmitterState> m_pState;
+ std::unique_ptr<EmitterState> m_pState;
ostream_wrapper m_stream;
};
@@ -162,12 +162,12 @@ inline Emitter& Emitter::WriteStreamable(T value) {
template <>
inline void Emitter::SetStreamablePrecision<float>(std::stringstream& stream) {
- stream.precision(static_cast<std::streamsize>(GetFloatPrecision()));
+ stream.precision(static_cast<std::streamsize>(GetFloatPrecision()));
}
template <>
inline void Emitter::SetStreamablePrecision<double>(std::stringstream& stream) {
- stream.precision(static_cast<std::streamsize>(GetDoublePrecision()));
+ stream.precision(static_cast<std::streamsize>(GetDoublePrecision()));
}
// overloads of insertion
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/exceptions.h b/contrib/libs/yaml-cpp/include/yaml-cpp/exceptions.h
index 9c96859b2c..261f7e303d 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/exceptions.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/exceptions.h
@@ -9,18 +9,18 @@
#include "yaml-cpp/mark.h"
#include "yaml-cpp/traits.h"
-#include <sstream>
+#include <sstream>
#include <stdexcept>
#include <string>
-// This is here for compatibility with older versions of Visual Studio
-// which don't support noexcept
-#ifdef _MSC_VER
- #define YAML_CPP_NOEXCEPT _NOEXCEPT
-#else
- #define YAML_CPP_NOEXCEPT noexcept
-#endif
-
+// This is here for compatibility with older versions of Visual Studio
+// which don't support noexcept
+#ifdef _MSC_VER
+ #define YAML_CPP_NOEXCEPT _NOEXCEPT
+#else
+ #define YAML_CPP_NOEXCEPT noexcept
+#endif
+
namespace YAML {
// error messages
namespace ErrorMsg {
@@ -97,7 +97,7 @@ const char* const BAD_FILE = "bad file";
template <typename T>
inline const std::string KEY_NOT_FOUND_WITH_KEY(
- const T&, typename disable_if<is_numeric<T>>::type* = 0) {
+ const T&, typename disable_if<is_numeric<T>>::type* = 0) {
return KEY_NOT_FOUND;
}
@@ -109,21 +109,21 @@ inline const std::string KEY_NOT_FOUND_WITH_KEY(const std::string& key) {
template <typename T>
inline const std::string KEY_NOT_FOUND_WITH_KEY(
- const T& key, typename enable_if<is_numeric<T>>::type* = 0) {
+ const T& key, typename enable_if<is_numeric<T>>::type* = 0) {
std::stringstream stream;
stream << KEY_NOT_FOUND << ": " << key;
return stream.str();
}
}
-class YAML_CPP_API Exception : public std::runtime_error {
+class YAML_CPP_API Exception : public std::runtime_error {
public:
Exception(const Mark& mark_, const std::string& msg_)
: std::runtime_error(build_what(mark_, msg_)), mark(mark_), msg(msg_) {}
- virtual ~Exception() YAML_CPP_NOEXCEPT;
-
- Exception(const Exception&) = default;
+ virtual ~Exception() YAML_CPP_NOEXCEPT;
+ Exception(const Exception&) = default;
+
Mark mark;
std::string msg;
@@ -141,47 +141,47 @@ class YAML_CPP_API Exception : public std::runtime_error {
}
};
-class YAML_CPP_API ParserException : public Exception {
+class YAML_CPP_API ParserException : public Exception {
public:
ParserException(const Mark& mark_, const std::string& msg_)
: Exception(mark_, msg_) {}
- ParserException(const ParserException&) = default;
- virtual ~ParserException() YAML_CPP_NOEXCEPT;
+ ParserException(const ParserException&) = default;
+ virtual ~ParserException() YAML_CPP_NOEXCEPT;
};
-class YAML_CPP_API RepresentationException : public Exception {
+class YAML_CPP_API RepresentationException : public Exception {
public:
RepresentationException(const Mark& mark_, const std::string& msg_)
: Exception(mark_, msg_) {}
- RepresentationException(const RepresentationException&) = default;
- virtual ~RepresentationException() YAML_CPP_NOEXCEPT;
+ RepresentationException(const RepresentationException&) = default;
+ virtual ~RepresentationException() YAML_CPP_NOEXCEPT;
};
// representation exceptions
-class YAML_CPP_API InvalidScalar : public RepresentationException {
+class YAML_CPP_API InvalidScalar : public RepresentationException {
public:
InvalidScalar(const Mark& mark_)
: RepresentationException(mark_, ErrorMsg::INVALID_SCALAR) {}
- InvalidScalar(const InvalidScalar&) = default;
- virtual ~InvalidScalar() YAML_CPP_NOEXCEPT;
+ InvalidScalar(const InvalidScalar&) = default;
+ virtual ~InvalidScalar() YAML_CPP_NOEXCEPT;
};
-class YAML_CPP_API KeyNotFound : public RepresentationException {
+class YAML_CPP_API KeyNotFound : public RepresentationException {
public:
template <typename T>
KeyNotFound(const Mark& mark_, const T& key_)
: RepresentationException(mark_, ErrorMsg::KEY_NOT_FOUND_WITH_KEY(key_)) {
}
- KeyNotFound(const KeyNotFound&) = default;
- virtual ~KeyNotFound() YAML_CPP_NOEXCEPT;
+ KeyNotFound(const KeyNotFound&) = default;
+ virtual ~KeyNotFound() YAML_CPP_NOEXCEPT;
};
template <typename T>
-class YAML_CPP_API TypedKeyNotFound : public KeyNotFound {
+class YAML_CPP_API TypedKeyNotFound : public KeyNotFound {
public:
TypedKeyNotFound(const Mark& mark_, const T& key_)
: KeyNotFound(mark_, key_), key(key_) {}
- virtual ~TypedKeyNotFound() YAML_CPP_NOEXCEPT {}
+ virtual ~TypedKeyNotFound() YAML_CPP_NOEXCEPT {}
T key;
};
@@ -192,20 +192,20 @@ inline TypedKeyNotFound<T> MakeTypedKeyNotFound(const Mark& mark,
return TypedKeyNotFound<T>(mark, key);
}
-class YAML_CPP_API InvalidNode : public RepresentationException {
+class YAML_CPP_API InvalidNode : public RepresentationException {
public:
InvalidNode()
: RepresentationException(Mark::null_mark(), ErrorMsg::INVALID_NODE) {}
- InvalidNode(const InvalidNode&) = default;
- virtual ~InvalidNode() YAML_CPP_NOEXCEPT;
+ InvalidNode(const InvalidNode&) = default;
+ virtual ~InvalidNode() YAML_CPP_NOEXCEPT;
};
-class YAML_CPP_API BadConversion : public RepresentationException {
+class YAML_CPP_API BadConversion : public RepresentationException {
public:
explicit BadConversion(const Mark& mark_)
: RepresentationException(mark_, ErrorMsg::BAD_CONVERSION) {}
- BadConversion(const BadConversion&) = default;
- virtual ~BadConversion() YAML_CPP_NOEXCEPT;
+ BadConversion(const BadConversion&) = default;
+ virtual ~BadConversion() YAML_CPP_NOEXCEPT;
};
template <typename T>
@@ -214,54 +214,54 @@ class TypedBadConversion : public BadConversion {
explicit TypedBadConversion(const Mark& mark_) : BadConversion(mark_) {}
};
-class YAML_CPP_API BadDereference : public RepresentationException {
+class YAML_CPP_API BadDereference : public RepresentationException {
public:
BadDereference()
: RepresentationException(Mark::null_mark(), ErrorMsg::BAD_DEREFERENCE) {}
- BadDereference(const BadDereference&) = default;
- virtual ~BadDereference() YAML_CPP_NOEXCEPT;
+ BadDereference(const BadDereference&) = default;
+ virtual ~BadDereference() YAML_CPP_NOEXCEPT;
};
-class YAML_CPP_API BadSubscript : public RepresentationException {
+class YAML_CPP_API BadSubscript : public RepresentationException {
public:
BadSubscript()
: RepresentationException(Mark::null_mark(), ErrorMsg::BAD_SUBSCRIPT) {}
- BadSubscript(const BadSubscript&) = default;
- virtual ~BadSubscript() YAML_CPP_NOEXCEPT;
+ BadSubscript(const BadSubscript&) = default;
+ virtual ~BadSubscript() YAML_CPP_NOEXCEPT;
};
-class YAML_CPP_API BadPushback : public RepresentationException {
+class YAML_CPP_API BadPushback : public RepresentationException {
public:
BadPushback()
: RepresentationException(Mark::null_mark(), ErrorMsg::BAD_PUSHBACK) {}
- BadPushback(const BadPushback&) = default;
- virtual ~BadPushback() YAML_CPP_NOEXCEPT;
+ BadPushback(const BadPushback&) = default;
+ virtual ~BadPushback() YAML_CPP_NOEXCEPT;
};
-class YAML_CPP_API BadInsert : public RepresentationException {
+class YAML_CPP_API BadInsert : public RepresentationException {
public:
BadInsert()
: RepresentationException(Mark::null_mark(), ErrorMsg::BAD_INSERT) {}
- BadInsert(const BadInsert&) = default;
- virtual ~BadInsert() YAML_CPP_NOEXCEPT;
+ BadInsert(const BadInsert&) = default;
+ virtual ~BadInsert() YAML_CPP_NOEXCEPT;
};
-class YAML_CPP_API EmitterException : public Exception {
+class YAML_CPP_API EmitterException : public Exception {
public:
EmitterException(const std::string& msg_)
: Exception(Mark::null_mark(), msg_) {}
- EmitterException(const EmitterException&) = default;
- virtual ~EmitterException() YAML_CPP_NOEXCEPT;
+ EmitterException(const EmitterException&) = default;
+ virtual ~EmitterException() YAML_CPP_NOEXCEPT;
};
-class YAML_CPP_API BadFile : public Exception {
+class YAML_CPP_API BadFile : public Exception {
public:
BadFile() : Exception(Mark::null_mark(), ErrorMsg::BAD_FILE) {}
- BadFile(const BadFile&) = default;
- virtual ~BadFile() YAML_CPP_NOEXCEPT;
+ BadFile(const BadFile&) = default;
+ virtual ~BadFile() YAML_CPP_NOEXCEPT;
};
}
-#undef YAML_CPP_NOEXCEPT
-
+#undef YAML_CPP_NOEXCEPT
+
#endif // EXCEPTIONS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/node/convert.h b/contrib/libs/yaml-cpp/include/yaml-cpp/node/convert.h
index 45a878ab0c..6434968f51 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/node/convert.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/node/convert.h
@@ -7,7 +7,7 @@
#pragma once
#endif
-#include <array>
+#include <array>
#include <limits>
#include <list>
#include <map>
@@ -163,7 +163,7 @@ struct convert<bool> {
// std::map
template <typename K, typename V>
-struct convert<std::map<K, V>> {
+struct convert<std::map<K, V>> {
static Node encode(const std::map<K, V>& rhs) {
Node node(NodeType::Map);
for (typename std::map<K, V>::const_iterator it = rhs.begin();
@@ -190,7 +190,7 @@ struct convert<std::map<K, V>> {
// std::vector
template <typename T>
-struct convert<std::vector<T>> {
+struct convert<std::vector<T>> {
static Node encode(const std::vector<T>& rhs) {
Node node(NodeType::Sequence);
for (typename std::vector<T>::const_iterator it = rhs.begin();
@@ -217,7 +217,7 @@ struct convert<std::vector<T>> {
// std::list
template <typename T>
-struct convert<std::list<T>> {
+struct convert<std::list<T>> {
static Node encode(const std::list<T>& rhs) {
Node node(NodeType::Sequence);
for (typename std::list<T>::const_iterator it = rhs.begin();
@@ -242,42 +242,42 @@ struct convert<std::list<T>> {
}
};
-// std::array
-template <typename T, std::size_t N>
-struct convert<std::array<T, N>> {
- static Node encode(const std::array<T, N>& rhs) {
- Node node(NodeType::Sequence);
- for (const auto& element : rhs) {
- node.push_back(element);
- }
- return node;
- }
-
- static bool decode(const Node& node, std::array<T, N>& rhs) {
- if (!isNodeValid(node)) {
- return false;
- }
-
- for (auto i = 0u; i < node.size(); ++i) {
-#if defined(__GNUC__) && __GNUC__ < 4
- // workaround for GCC 3:
- rhs[i] = node[i].template as<T>();
-#else
- rhs[i] = node[i].as<T>();
-#endif
- }
- return true;
- }
-
- private:
- static bool isNodeValid(const Node& node) {
- return node.IsSequence() && node.size() == N;
- }
-};
-
+// std::array
+template <typename T, std::size_t N>
+struct convert<std::array<T, N>> {
+ static Node encode(const std::array<T, N>& rhs) {
+ Node node(NodeType::Sequence);
+ for (const auto& element : rhs) {
+ node.push_back(element);
+ }
+ return node;
+ }
+
+ static bool decode(const Node& node, std::array<T, N>& rhs) {
+ if (!isNodeValid(node)) {
+ return false;
+ }
+
+ for (auto i = 0u; i < node.size(); ++i) {
+#if defined(__GNUC__) && __GNUC__ < 4
+ // workaround for GCC 3:
+ rhs[i] = node[i].template as<T>();
+#else
+ rhs[i] = node[i].as<T>();
+#endif
+ }
+ return true;
+ }
+
+ private:
+ static bool isNodeValid(const Node& node) {
+ return node.IsSequence() && node.size() == N;
+ }
+};
+
// std::pair
template <typename T, typename U>
-struct convert<std::pair<T, U>> {
+struct convert<std::pair<T, U>> {
static Node encode(const std::pair<T, U>& rhs) {
Node node(NodeType::Sequence);
node.push_back(rhs.first);
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/impl.h b/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/impl.h
index 09e55f838c..c730c5ca83 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/impl.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/impl.h
@@ -9,7 +9,7 @@
#include "yaml-cpp/node/detail/node.h"
#include "yaml-cpp/node/detail/node_data.h"
-#include <type_traits>
+#include <type_traits>
namespace YAML {
namespace detail {
@@ -22,9 +22,9 @@ struct get_idx {
};
template <typename Key>
-struct get_idx<Key,
- typename std::enable_if<std::is_unsigned<Key>::value &&
- !std::is_same<Key, bool>::value>::type> {
+struct get_idx<Key,
+ typename std::enable_if<std::is_unsigned<Key>::value &&
+ !std::is_same<Key, bool>::value>::type> {
static node* get(const std::vector<node*>& sequence, const Key& key,
shared_memory_holder /* pMemory */) {
return key < sequence.size() ? sequence[key] : 0;
@@ -32,7 +32,7 @@ struct get_idx<Key,
static node* get(std::vector<node*>& sequence, const Key& key,
shared_memory_holder pMemory) {
- if (key > sequence.size() || (key > 0 && !sequence[key-1]->is_defined()))
+ if (key > sequence.size() || (key > 0 && !sequence[key-1]->is_defined()))
return 0;
if (key == sequence.size())
sequence.push_back(&pMemory->create_node());
@@ -41,7 +41,7 @@ struct get_idx<Key,
};
template <typename Key>
-struct get_idx<Key, typename std::enable_if<std::is_signed<Key>::value>::type> {
+struct get_idx<Key, typename std::enable_if<std::is_signed<Key>::value>::type> {
static node* get(const std::vector<node*>& sequence, const Key& key,
shared_memory_holder pMemory) {
return key >= 0 ? get_idx<std::size_t>::get(
@@ -132,14 +132,14 @@ inline bool node_data::remove(const Key& key, shared_memory_holder pMemory) {
if (m_type != NodeType::Map)
return false;
- for (kv_pairs::iterator it = m_undefinedPairs.begin();
- it != m_undefinedPairs.end();) {
- kv_pairs::iterator jt = std::next(it);
- if (it->first->equals(key, pMemory))
- m_undefinedPairs.erase(it);
- it = jt;
- }
-
+ for (kv_pairs::iterator it = m_undefinedPairs.begin();
+ it != m_undefinedPairs.end();) {
+ kv_pairs::iterator jt = std::next(it);
+ if (it->first->equals(key, pMemory))
+ m_undefinedPairs.erase(it);
+ it = jt;
+ }
+
for (node_map::iterator it = m_map.begin(); it != m_map.end(); ++it) {
if (it->first->equals(key, pMemory)) {
m_map.erase(it);
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/iterator.h b/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/iterator.h
index deec8fb62c..1df7116cc9 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/iterator.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/iterator.h
@@ -8,71 +8,71 @@
#endif
#include "yaml-cpp/dll.h"
-#include "yaml-cpp/node/node.h"
+#include "yaml-cpp/node/node.h"
#include "yaml-cpp/node/ptr.h"
#include "yaml-cpp/node/detail/node_iterator.h"
-#include <cstddef>
-#include <iterator>
+#include <cstddef>
+#include <iterator>
namespace YAML {
namespace detail {
struct iterator_value;
template <typename V>
-class iterator_base : public std::iterator<std::forward_iterator_tag, V,
- std::ptrdiff_t, V*, V> {
-
+class iterator_base : public std::iterator<std::forward_iterator_tag, V,
+ std::ptrdiff_t, V*, V> {
+
private:
template <typename>
friend class iterator_base;
struct enabler {};
- typedef node_iterator base_type;
-
- struct proxy {
- explicit proxy(const V& x) : m_ref(x) {}
- V* operator->() { return std::addressof(m_ref); }
- operator V*() { return std::addressof(m_ref); }
-
- V m_ref;
- };
-
+ typedef node_iterator base_type;
+
+ struct proxy {
+ explicit proxy(const V& x) : m_ref(x) {}
+ V* operator->() { return std::addressof(m_ref); }
+ operator V*() { return std::addressof(m_ref); }
+
+ V m_ref;
+ };
+
public:
typedef typename iterator_base::value_type value_type;
public:
- iterator_base() : m_iterator(), m_pMemory() {}
+ iterator_base() : m_iterator(), m_pMemory() {}
explicit iterator_base(base_type rhs, shared_memory_holder pMemory)
- : m_iterator(rhs), m_pMemory(pMemory) {}
+ : m_iterator(rhs), m_pMemory(pMemory) {}
template <class W>
iterator_base(const iterator_base<W>& rhs,
- typename std::enable_if<std::is_convertible<W*, V*>::value,
- enabler>::type = enabler())
- : m_iterator(rhs.m_iterator), m_pMemory(rhs.m_pMemory) {}
-
- iterator_base<V>& operator++() {
- ++m_iterator;
- return *this;
- }
-
- iterator_base<V> operator++(int) {
- iterator_base<V> iterator_pre(*this);
- ++(*this);
- return iterator_pre;
- }
-
- template <typename W>
- bool operator==(const iterator_base<W>& rhs) const {
- return m_iterator == rhs.m_iterator;
- }
-
- template <typename W>
- bool operator!=(const iterator_base<W>& rhs) const {
- return m_iterator != rhs.m_iterator;
- }
-
- value_type operator*() const {
- const typename base_type::value_type& v = *m_iterator;
+ typename std::enable_if<std::is_convertible<W*, V*>::value,
+ enabler>::type = enabler())
+ : m_iterator(rhs.m_iterator), m_pMemory(rhs.m_pMemory) {}
+
+ iterator_base<V>& operator++() {
+ ++m_iterator;
+ return *this;
+ }
+
+ iterator_base<V> operator++(int) {
+ iterator_base<V> iterator_pre(*this);
+ ++(*this);
+ return iterator_pre;
+ }
+
+ template <typename W>
+ bool operator==(const iterator_base<W>& rhs) const {
+ return m_iterator == rhs.m_iterator;
+ }
+
+ template <typename W>
+ bool operator!=(const iterator_base<W>& rhs) const {
+ return m_iterator != rhs.m_iterator;
+ }
+
+ value_type operator*() const {
+ const typename base_type::value_type& v = *m_iterator;
if (v.pNode)
return value_type(Node(*v, m_pMemory));
if (v.first && v.second)
@@ -80,10 +80,10 @@ class iterator_base : public std::iterator<std::forward_iterator_tag, V,
return value_type();
}
- proxy operator->() const { return proxy(**this); }
-
+ proxy operator->() const { return proxy(**this); }
+
private:
- base_type m_iterator;
+ base_type m_iterator;
shared_memory_holder m_pMemory;
};
}
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node.h b/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node.h
index 8a776f62a9..a573991cfa 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node.h
@@ -16,11 +16,11 @@
namespace YAML {
namespace detail {
-class node {
+class node {
public:
node() : m_pRef(new node_ref) {}
- node(const node&) = delete;
- node& operator=(const node&) = delete;
+ node(const node&) = delete;
+ node& operator=(const node&) = delete;
bool is(const node& rhs) const { return m_pRef == rhs.m_pRef; }
const node_ref* ref() const { return m_pRef.get(); }
@@ -66,7 +66,7 @@ class node {
m_pRef->set_data(*rhs.m_pRef);
}
- void set_mark(const Mark& mark) { m_pRef->set_mark(mark); }
+ void set_mark(const Mark& mark) { m_pRef->set_mark(mark); }
void set_type(NodeType::value type) {
if (type != NodeType::Undefined)
@@ -106,9 +106,9 @@ class node {
node_iterator end() { return m_pRef->end(); }
// sequence
- void push_back(node& input, shared_memory_holder pMemory) {
- m_pRef->push_back(input, pMemory);
- input.add_dependency(*this);
+ void push_back(node& input, shared_memory_holder pMemory) {
+ m_pRef->push_back(input, pMemory);
+ input.add_dependency(*this);
}
void insert(node& key, node& value, shared_memory_holder pMemory) {
m_pRef->insert(key, value, pMemory);
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_data.h b/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_data.h
index 50bcd74352..bdbd58a7cd 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_data.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_data.h
@@ -27,11 +27,11 @@ class node;
namespace YAML {
namespace detail {
-class YAML_CPP_API node_data {
+class YAML_CPP_API node_data {
public:
node_data();
- node_data(const node_data&) = delete;
- node_data& operator=(const node_data&) = delete;
+ node_data(const node_data&) = delete;
+ node_data& operator=(const node_data&) = delete;
void mark_defined();
void set_mark(const Mark& mark);
@@ -114,7 +114,7 @@ class YAML_CPP_API node_data {
mutable std::size_t m_seqSize;
// map
- typedef std::vector<std::pair<node*, node*>> node_map;
+ typedef std::vector<std::pair<node*, node*>> node_map;
node_map m_map;
typedef std::pair<node*, node*> kv_pair;
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_iterator.h b/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_iterator.h
index 088090fe74..5b94ae6c7b 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_iterator.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_iterator.h
@@ -9,9 +9,9 @@
#include "yaml-cpp/dll.h"
#include "yaml-cpp/node/ptr.h"
-#include <cstddef>
-#include <iterator>
-#include <memory>
+#include <cstddef>
+#include <iterator>
+#include <memory>
#include <map>
#include <utility>
#include <vector>
@@ -19,7 +19,7 @@
namespace YAML {
namespace detail {
struct iterator_type {
- enum value { NoneType, Sequence, Map };
+ enum value { NoneType, Sequence, Map };
};
template <typename V>
@@ -37,7 +37,7 @@ struct node_iterator_value : public std::pair<V*, V*> {
};
typedef std::vector<node*> node_seq;
-typedef std::vector<std::pair<node*, node*>> node_map;
+typedef std::vector<std::pair<node*, node*>> node_map;
template <typename V>
struct node_iterator_type {
@@ -53,27 +53,27 @@ struct node_iterator_type<const V> {
template <typename V>
class node_iterator_base
- : public std::iterator<std::forward_iterator_tag, node_iterator_value<V>,
- std::ptrdiff_t, node_iterator_value<V>*,
- node_iterator_value<V>> {
+ : public std::iterator<std::forward_iterator_tag, node_iterator_value<V>,
+ std::ptrdiff_t, node_iterator_value<V>*,
+ node_iterator_value<V>> {
private:
struct enabler {};
- struct proxy {
- explicit proxy(const node_iterator_value<V>& x) : m_ref(x) {}
- node_iterator_value<V>* operator->() { return std::addressof(m_ref); }
- operator node_iterator_value<V>*() { return std::addressof(m_ref); }
-
- node_iterator_value<V> m_ref;
- };
-
+ struct proxy {
+ explicit proxy(const node_iterator_value<V>& x) : m_ref(x) {}
+ node_iterator_value<V>* operator->() { return std::addressof(m_ref); }
+ operator node_iterator_value<V>*() { return std::addressof(m_ref); }
+
+ node_iterator_value<V> m_ref;
+ };
+
public:
typedef typename node_iterator_type<V>::seq SeqIter;
typedef typename node_iterator_type<V>::map MapIter;
typedef node_iterator_value<V> value_type;
node_iterator_base()
- : m_type(iterator_type::NoneType), m_seqIt(), m_mapIt(), m_mapEnd() {}
+ : m_type(iterator_type::NoneType), m_seqIt(), m_mapIt(), m_mapEnd() {}
explicit node_iterator_base(SeqIter seqIt)
: m_type(iterator_type::Sequence),
m_seqIt(seqIt),
@@ -89,8 +89,8 @@ class node_iterator_base
template <typename W>
node_iterator_base(const node_iterator_base<W>& rhs,
- typename std::enable_if<std::is_convertible<W*, V*>::value,
- enabler>::type = enabler())
+ typename std::enable_if<std::is_convertible<W*, V*>::value,
+ enabler>::type = enabler())
: m_type(rhs.m_type),
m_seqIt(rhs.m_seqIt),
m_mapIt(rhs.m_mapIt),
@@ -100,12 +100,12 @@ class node_iterator_base
friend class node_iterator_base;
template <typename W>
- bool operator==(const node_iterator_base<W>& rhs) const {
+ bool operator==(const node_iterator_base<W>& rhs) const {
if (m_type != rhs.m_type)
return false;
switch (m_type) {
- case iterator_type::NoneType:
+ case iterator_type::NoneType:
return true;
case iterator_type::Sequence:
return m_seqIt == rhs.m_seqIt;
@@ -115,14 +115,14 @@ class node_iterator_base
return true;
}
- template <typename W>
- bool operator!=(const node_iterator_base<W>& rhs) const {
- return !(*this == rhs);
- }
-
- node_iterator_base<V>& operator++() {
+ template <typename W>
+ bool operator!=(const node_iterator_base<W>& rhs) const {
+ return !(*this == rhs);
+ }
+
+ node_iterator_base<V>& operator++() {
switch (m_type) {
- case iterator_type::NoneType:
+ case iterator_type::NoneType:
break;
case iterator_type::Sequence:
++m_seqIt;
@@ -132,18 +132,18 @@ class node_iterator_base
m_mapIt = increment_until_defined(m_mapIt);
break;
}
- return *this;
- }
-
- node_iterator_base<V> operator++(int) {
- node_iterator_base<V> iterator_pre(*this);
- ++(*this);
- return iterator_pre;
+ return *this;
}
- value_type operator*() const {
+ node_iterator_base<V> operator++(int) {
+ node_iterator_base<V> iterator_pre(*this);
+ ++(*this);
+ return iterator_pre;
+ }
+
+ value_type operator*() const {
switch (m_type) {
- case iterator_type::NoneType:
+ case iterator_type::NoneType:
return value_type();
case iterator_type::Sequence:
return value_type(**m_seqIt);
@@ -153,8 +153,8 @@ class node_iterator_base
return value_type();
}
- proxy operator->() const { return proxy(**this); }
-
+ proxy operator->() const { return proxy(**this); }
+
MapIter increment_until_defined(MapIter it) {
while (it != m_mapEnd && !is_defined(it))
++it;
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_ref.h b/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_ref.h
index d8a94f8b80..a54e5e1129 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_ref.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/node/detail/node_ref.h
@@ -14,11 +14,11 @@
namespace YAML {
namespace detail {
-class node_ref {
+class node_ref {
public:
node_ref() : m_pData(new node_data) {}
- node_ref(const node_ref&) = delete;
- node_ref& operator=(const node_ref&) = delete;
+ node_ref(const node_ref&) = delete;
+ node_ref& operator=(const node_ref&) = delete;
bool is_defined() const { return m_pData->is_defined(); }
const Mark& mark() const { return m_pData->mark(); }
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/node/emit.h b/contrib/libs/yaml-cpp/include/yaml-cpp/node/emit.h
index 032268c5d0..d344da9759 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/node/emit.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/node/emit.h
@@ -16,17 +16,17 @@ namespace YAML {
class Emitter;
class Node;
-/**
- * Emits the node to the given {@link Emitter}. If there is an error in writing,
- * {@link Emitter#good} will return false.
- */
+/**
+ * Emits the node to the given {@link Emitter}. If there is an error in writing,
+ * {@link Emitter#good} will return false.
+ */
YAML_CPP_API Emitter& operator<<(Emitter& out, const Node& node);
-
-/** Emits the node to the given output stream. */
+
+/** Emits the node to the given output stream. */
YAML_CPP_API std::ostream& operator<<(std::ostream& out, const Node& node);
-/** Converts the node to a YAML string. */
+/** Converts the node to a YAML string. */
YAML_CPP_API std::string Dump(const Node& node);
-} // namespace YAML
+} // namespace YAML
#endif // NODE_EMIT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/node/impl.h b/contrib/libs/yaml-cpp/include/yaml-cpp/node/impl.h
index 20c487a687..e73fb44d5f 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/node/impl.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/node/impl.h
@@ -103,7 +103,7 @@ struct as_if<std::string, S> {
explicit as_if(const Node& node_) : node(node_) {}
const Node& node;
- std::string operator()(const S& fallback) const {
+ std::string operator()(const S& fallback) const {
if (node.Type() != NodeType::Scalar)
return fallback;
return node.Scalar();
@@ -115,7 +115,7 @@ struct as_if<T, void> {
explicit as_if(const Node& node_) : node(node_) {}
const Node& node;
- T operator()() const {
+ T operator()() const {
if (!node.m_pNode)
throw TypedBadConversion<T>(node.Mark());
@@ -131,7 +131,7 @@ struct as_if<std::string, void> {
explicit as_if(const Node& node_) : node(node_) {}
const Node& node;
- std::string operator()() const {
+ std::string operator()() const {
if (node.Type() != NodeType::Scalar)
throw TypedBadConversion<std::string>(node.Mark());
return node.Scalar();
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/node/node.h b/contrib/libs/yaml-cpp/include/yaml-cpp/node/node.h
index 1ded7d27b7..0f52f0896b 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/node/node.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/node/node.h
@@ -58,7 +58,7 @@ class YAML_CPP_API Node {
bool IsMap() const { return Type() == NodeType::Map; }
// bool conversions
- YAML_CPP_OPERATOR_BOOL()
+ YAML_CPP_OPERATOR_BOOL()
bool operator!() const { return !IsDefined(); }
// access
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/node/parse.h b/contrib/libs/yaml-cpp/include/yaml-cpp/node/parse.h
index 7745fd7245..6984c0f05d 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/node/parse.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/node/parse.h
@@ -16,63 +16,63 @@
namespace YAML {
class Node;
-/**
- * Loads the input string as a single YAML document.
- *
- * @throws {@link ParserException} if it is malformed.
- */
+/**
+ * Loads the input string as a single YAML document.
+ *
+ * @throws {@link ParserException} if it is malformed.
+ */
YAML_CPP_API Node Load(const std::string& input);
-
-/**
- * Loads the input string as a single YAML document.
- *
- * @throws {@link ParserException} if it is malformed.
- */
+
+/**
+ * Loads the input string as a single YAML document.
+ *
+ * @throws {@link ParserException} if it is malformed.
+ */
YAML_CPP_API Node Load(const char* input);
-
-/**
- * Loads the input stream as a single YAML document.
- *
- * @throws {@link ParserException} if it is malformed.
- */
+
+/**
+ * Loads the input stream as a single YAML document.
+ *
+ * @throws {@link ParserException} if it is malformed.
+ */
YAML_CPP_API Node Load(std::istream& input);
-
-/**
- * Loads the input file as a single YAML document.
- *
- * @throws {@link ParserException} if it is malformed.
- * @throws {@link BadFile} if the file cannot be loaded.
- */
+
+/**
+ * Loads the input file as a single YAML document.
+ *
+ * @throws {@link ParserException} if it is malformed.
+ * @throws {@link BadFile} if the file cannot be loaded.
+ */
YAML_CPP_API Node LoadFile(const std::string& filename);
-/**
- * Loads the input string as a list of YAML documents.
- *
- * @throws {@link ParserException} if it is malformed.
- */
+/**
+ * Loads the input string as a list of YAML documents.
+ *
+ * @throws {@link ParserException} if it is malformed.
+ */
YAML_CPP_API std::vector<Node> LoadAll(const std::string& input);
-
-/**
- * Loads the input string as a list of YAML documents.
- *
- * @throws {@link ParserException} if it is malformed.
- */
+
+/**
+ * Loads the input string as a list of YAML documents.
+ *
+ * @throws {@link ParserException} if it is malformed.
+ */
YAML_CPP_API std::vector<Node> LoadAll(const char* input);
-
-/**
- * Loads the input stream as a list of YAML documents.
- *
- * @throws {@link ParserException} if it is malformed.
- */
+
+/**
+ * Loads the input stream as a list of YAML documents.
+ *
+ * @throws {@link ParserException} if it is malformed.
+ */
YAML_CPP_API std::vector<Node> LoadAll(std::istream& input);
-
-/**
- * Loads the input file as a list of YAML documents.
- *
- * @throws {@link ParserException} if it is malformed.
- * @throws {@link BadFile} if the file cannot be loaded.
- */
+
+/**
+ * Loads the input file as a list of YAML documents.
+ *
+ * @throws {@link ParserException} if it is malformed.
+ * @throws {@link BadFile} if the file cannot be loaded.
+ */
YAML_CPP_API std::vector<Node> LoadAllFromFile(const std::string& filename);
-} // namespace YAML
+} // namespace YAML
#endif // VALUE_PARSE_H_62B23520_7C8E_11DE_8A39_0800200C9A66
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/node/ptr.h b/contrib/libs/yaml-cpp/include/yaml-cpp/node/ptr.h
index ce085dd5cd..5fbed4be9d 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/node/ptr.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/node/ptr.h
@@ -8,7 +8,7 @@
#endif
#include "yaml-cpp/dll.h"
-#include <memory>
+#include <memory>
namespace YAML {
namespace detail {
@@ -18,11 +18,11 @@ class node_data;
class memory;
class memory_holder;
-typedef std::shared_ptr<node> shared_node;
-typedef std::shared_ptr<node_ref> shared_node_ref;
-typedef std::shared_ptr<node_data> shared_node_data;
-typedef std::shared_ptr<memory_holder> shared_memory_holder;
-typedef std::shared_ptr<memory> shared_memory;
+typedef std::shared_ptr<node> shared_node;
+typedef std::shared_ptr<node_ref> shared_node_ref;
+typedef std::shared_ptr<node_data> shared_node_data;
+typedef std::shared_ptr<memory_holder> shared_memory_holder;
+typedef std::shared_ptr<memory> shared_memory;
}
}
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/null.h b/contrib/libs/yaml-cpp/include/yaml-cpp/null.h
index b9521d488a..ecfe1524bd 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/null.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/null.h
@@ -8,7 +8,7 @@
#endif
#include "yaml-cpp/dll.h"
-#include <string>
+#include <string>
namespace YAML {
class Node;
@@ -18,7 +18,7 @@ inline bool operator==(const _Null&, const _Null&) { return true; }
inline bool operator!=(const _Null&, const _Null&) { return false; }
YAML_CPP_API bool IsNull(const Node& node); // old API only
-YAML_CPP_API bool IsNullString(const std::string& str);
+YAML_CPP_API bool IsNullString(const std::string& str);
extern YAML_CPP_API _Null Null;
}
diff --git a/contrib/libs/yaml-cpp/include/yaml-cpp/parser.h b/contrib/libs/yaml-cpp/include/yaml-cpp/parser.h
index ceac22d026..2f71a03b1f 100644
--- a/contrib/libs/yaml-cpp/include/yaml-cpp/parser.h
+++ b/contrib/libs/yaml-cpp/include/yaml-cpp/parser.h
@@ -20,66 +20,66 @@ class Scanner;
struct Directives;
struct Token;
-/**
- * A parser turns a stream of bytes into one stream of "events" per YAML
- * document in the input stream.
- */
+/**
+ * A parser turns a stream of bytes into one stream of "events" per YAML
+ * document in the input stream.
+ */
class YAML_CPP_API Parser : private noncopyable {
public:
- /** Constructs an empty parser (with no input. */
+ /** Constructs an empty parser (with no input. */
Parser();
-
- /**
- * Constructs a parser from the given input stream. The input stream must
- * live as long as the parser.
- */
- explicit Parser(std::istream& in);
-
+
+ /**
+ * Constructs a parser from the given input stream. The input stream must
+ * live as long as the parser.
+ */
+ explicit Parser(std::istream& in);
+
~Parser();
- /** Evaluates to true if the parser has some valid input to be read. */
- explicit operator bool() const;
+ /** Evaluates to true if the parser has some valid input to be read. */
+ explicit operator bool() const;
- /**
- * Resets the parser with the given input stream. Any existing state is
- * erased.
- */
+ /**
+ * Resets the parser with the given input stream. Any existing state is
+ * erased.
+ */
void Load(std::istream& in);
-
- /**
- * Handles the next document by calling events on the {@code eventHandler}.
- *
- * @throw a ParserException on error.
- * @return false if there are no more documents
- */
+
+ /**
+ * Handles the next document by calling events on the {@code eventHandler}.
+ *
+ * @throw a ParserException on error.
+ * @return false if there are no more documents
+ */
bool HandleNextDocument(EventHandler& eventHandler);
void PrintTokens(std::ostream& out);
private:
- /**
- * Reads any directives that are next in the queue, setting the internal
- * {@code m_pDirectives} state.
- */
+ /**
+ * Reads any directives that are next in the queue, setting the internal
+ * {@code m_pDirectives} state.
+ */
void ParseDirectives();
-
+
void HandleDirective(const Token& token);
-
- /**
- * Handles a "YAML" directive, which should be of the form 'major.minor' (like
- * a version number).
- */
+
+ /**
+ * Handles a "YAML" directive, which should be of the form 'major.minor' (like
+ * a version number).
+ */
void HandleYamlDirective(const Token& token);
-
- /**
- * Handles a "TAG" directive, which should be of the form 'handle prefix',
- * where 'handle' is converted to 'prefix' in the file.
- */
+
+ /**
+ * Handles a "TAG" directive, which should be of the form 'handle prefix',
+ * where 'handle' is converted to 'prefix' in the file.
+ */
void HandleTagDirective(const Token& token);
private:
- std::unique_ptr<Scanner> m_pScanner;
- std::unique_ptr<Directives> m_pDirectives;
+ std::unique_ptr<Scanner> m_pScanner;
+ std::unique_ptr<Directives> m_pDirectives;
};
}