25#include <unordered_map>
35#if defined(NLOHMANN_JSON_HPP) && !defined(JSON_DISABLE_ENUM_SERIALIZATION)
36#error "nlohmann/json.hpp included before mnxdom without JSON_DISABLE_ENUM_SERIALIZATION=1"
39#ifndef JSON_DISABLE_ENUM_SERIALIZATION
40#define JSON_DISABLE_ENUM_SERIALIZATION 1
43#ifdef NLOHMANN_JSON_SYSTEM
44#include <nlohmann/json.hpp>
46#include "nlohmann/json.hpp"
48#include "BoilerplateMacros.h"
67using json = nlohmann::json;
74template <
typename T>
class Array;
98class SemanticValidator;
101#ifndef DOXYGEN_SHOULD_IGNOR_THIS
114template <
typename T, auto MakeFunc>
118template <
typename T,
typename R,
typename... Args, R(*MakeFunc)(Args...)>
127 return static_cast<Array<T>&
>(*this).template appendImpl<T>(std::forward<Args>(args)...);
132template <
typename Derived,
typename T>
139 template <
typename U = T,
typename... Args,
140 std::enable_if_t<std::is_base_of_v<Base, U>,
int> = 0>
143 return static_cast<Derived&
>(*this).template appendImpl<U>(std::forward<Args>(args)...);
147template <
typename Derived,
typename T,
typename =
void>
150template <
typename Derived,
typename T>
160template <
typename T, auto MakeFunc>
164template <
typename T,
typename R,
typename... Args, R(*MakeFunc)(Args...)>
171 T
append(std::string_view key, Args... args)
173 return static_cast<Dictionary<T>&
>(*this).template appendImpl<T>(key, std::forward<Args>(args)...);
178template <
typename Derived,
typename T>
185 template <
typename U = T,
typename... Args,
186 std::enable_if_t<std::is_base_of_v<Base, U>,
int> = 0>
187 U
append(std::string_view key, Args&&... args)
189 return static_cast<Derived&
>(*this).template appendImpl<U>(key, std::forward<Args>(args)...);
193template <
typename Derived,
typename T,
typename =
void>
196template <
typename Derived,
typename T>
214 virtual ~Base() =
default;
217 Base(
const Base& src) : m_root(src.m_root), m_pointer(src.m_pointer)
222 m_pointer(std::move(src.m_pointer))
229 if (m_root != src.m_root) {
230 throw std::logic_error(
"Assignment from a different JSON document is not allowed.");
232 m_pointer = src.m_pointer;
241 if (m_root != src.m_root) {
242 throw std::logic_error(
"Assignment from a different JSON document is not allowed.");
244 m_pointer = std::move(src.m_pointer);
251 [[nodiscard]] std::string
dump(
int indents = -1)
const
253 return ref().dump(indents);
259 template <
typename T>
262 static_assert(std::is_base_of_v<Base, T>,
"Template type mush be derived from Base.");
263 return T(m_root, m_pointer.parent_pointer());
270 template <
typename T,
typename Scope = scope::Default>
280 [[nodiscard]]
bool empty()
const {
return ref().empty(); }
288 [[nodiscard]]
json&
ref()
const {
return resolve_pointer(); }
294 [[nodiscard]]
json&
ref() {
return resolve_pointer(); }
297 [[nodiscard]]
const std::shared_ptr<json>&
root()
const {
return m_root; }
314 : m_root(
parent.m_root), m_pointer(
parent.m_pointer / std::string(key))
316 (*m_root)[m_pointer] = std::move(jsonRef);
326 template <
typename T>
327 [[nodiscard]] T
getChild(std::string_view key)
const
329 static_assert(std::is_base_of_v<Base, T>,
"template type must be derived from Base");
331 json_pointer childPointer = m_pointer / std::string(key);
332 if (!checkKeyIsValid<T>(childPointer)) {
333 throw std::out_of_range(
"Child node not found: " + std::string(key));
336 return T(m_root, childPointer);
346 template <
typename T>
349 static_assert(std::is_base_of_v<Base, T>,
"template type must be derived from Base");
351 json_pointer childPointer = m_pointer / std::string(key);
352 (*m_root)[childPointer] = value.ref();
353 return T(m_root, childPointer);
363 template <
typename T>
366 static_assert(std::is_base_of_v<Base, T>,
"template type must be derived from Base");
368 json_pointer childPointer = m_pointer / std::string(key);
369 if (!checkKeyIsValid<T>(childPointer)) {
373 return T(m_root, childPointer);
384 template <
typename T>
387 if (!(*m_root).contains(
pointer)) {
393 if constexpr (std::is_base_of_v<Object, T>) {
394 if (!node.is_object()) {
395 throw std::runtime_error(
"Expected an object for: " +
pointer.to_string());
397 }
else if constexpr (std::is_base_of_v<Array<typename T::value_type>, T>) {
398 if (!node.is_array()) {
399 throw std::runtime_error(
"Expected an array for: " +
pointer.to_string());
411 [[nodiscard]]
json& resolve_pointer()
const
413 return (*m_root).at(m_pointer);
416 const std::shared_ptr<json> m_root;
419 friend class validation::SemanticValidator;
440 if (!
ref().is_object()) {
441 throw std::invalid_argument(
"mnx::Object must wrap a JSON object.");
458 auto extensions = ensure__x();
459 extensions.ref()[key] = value;
463 [[nodiscard]] std::optional<json>
getExtension(
const std::string_view key)
const
465 if (
auto extensions = _x()) {
466 const auto it = extensions->ref().find(key);
467 if (it != extensions->ref().end()) {
477 if (
auto extensions = _x()) {
478 extensions->ref().erase(key);
479 if (extensions->empty()) {
488template <
typename T, std::enable_if_t<!std::is_base_of_v<Base, T>,
int> = 0>
491 static_assert(std::is_arithmetic_v<T> || std::is_same_v<T, std::string>,
"This template is for simple JSON classes");
506 return ref().template get<T>();
520 return src ==
ref().template get<T>();
524class ArrayElementObject;
532 static_assert(std::is_arithmetic_v<T> || std::is_same_v<T, std::string> ||
533 std::is_base_of_v<ArrayElementObject, T>,
"Invalid MNX array element type.");
536 template<
typename ArrayType>
541 mutable size_t m_idx;
544 using iterator_category = std::input_iterator_tag;
546 using difference_type = std::ptrdiff_t;
547 using pointer = void;
550 iter(ArrayType* ptr,
size_t idx) : m_ptr(ptr), m_idx(idx) {}
551 T operator*()
const {
return (*m_ptr)[m_idx]; }
552 iter& operator++() { ++m_idx;
return *
this; }
553 bool operator!=(
const iter& o)
const {
return m_idx != o.m_idx; }
572 if (!
ref().is_array()) {
573 throw std::invalid_argument(
"mnx::Array must wrap a JSON array.");
584 [[nodiscard]]
size_t size()
const {
return ref().size(); }
587 [[nodiscard]]
bool empty()
const {
return ref().empty(); }
593 [[nodiscard]] T
at(
size_t index)
const
601 [[nodiscard]] T
front()
const {
return (*
this)[0]; }
606 [[nodiscard]] T
back()
const {
return (*
this)[
size() - 1]; }
612 if constexpr (std::is_base_of_v<Base, T>) {
613 return getChild<T>(std::to_string(index));
615 return getChild<SimpleType<T>>(std::to_string(index));
623 if constexpr (std::is_base_of_v<Base, T>) {
624 return getChild<T>(std::to_string(index));
626 return getChild<SimpleType<T>>(std::to_string(index));
631 template <
typename U = T>
632 std::enable_if_t<!std::is_base_of_v<Base, U>,
void>
635 ref().push_back(value);
639 template <
typename InputIt,
typename U = T>
640 std::enable_if_t<!std::is_base_of_v<Base, U>,
void>
643 ref() = json::array();
644 for (; first != last; ++first) {
645 ref().push_back(*first);
650 template <
typename U = T>
651 std::enable_if_t<!std::is_base_of_v<Base, U>,
void>
654 assign(values.begin(), values.end());
668 template <
typename U = T>
669 std::enable_if_t<!std::is_base_of_v<Base, U>, std::vector<U>>
671 {
return std::vector<U>(
begin(),
end()); }
692 throw std::out_of_range(
"Index out of range");
697 template <
typename U,
typename... Args>
698 U appendImpl(Args&&... args)
700 static_assert(std::is_base_of_v<Base, U>,
"Array::appendImpl requires a Base-derived element type.");
701 if constexpr (std::is_base_of_v<Object, U>) {
702 ref().push_back(json::object());
704 ref().push_back(json::array());
706 return U(*
this, std::to_string(
ref().
size() - 1), std::forward<Args>(args)...);
709 template <
typename, auto>
710 friend struct detail::ArrayAppendFromMake;
711 template <
typename,
typename>
712 friend struct detail::ArrayAppendBase;
726 return std::stoul(
pointer().back());
733 template <
typename ContainerType>
737template <
typename BaseContentT>
740template <
typename BaseContentT>
744 virtual std::string_view defaultType()
const {
return ""; };
745 using ArrayElementObject::ArrayElementObject;
751 template <
typename T, std::enable_if_t<std::is_base_of_v<BaseContentT, T>,
int> = 0>
752 [[nodiscard]] T
get()
const
754 if (type() != T::ContentTypeValue) {
755 throw std::invalid_argument(
"Type mismatch: expected " + std::string(T::ContentTypeValue) +
764template <
typename ContainerType>
767 if constexpr (std::is_base_of_v<ContentObject<ContainerType>, ContainerType>) {
768 const auto obj = parent<Array<ArrayElementObject>>().
template parent<ContainerType>();
769 if constexpr (std::is_same_v<ContainerType, ContentObject<ContainerType>>
770 || std::is_same_v<ContainerType, sequence::SequenceContentObject>
771 || std::is_same_v<ContainerType, layout::LayoutContentObject>
772 || std::is_same_v<ContainerType, text::TextContentObject>
773 || std::is_same_v<ContainerType, part::DynamicGroupBase>) {
776 MNX_ASSERT_IF(obj.type() != ContainerType::ContentTypeValue) {
777 throw std::invalid_argument(
778 "container(): requested type does not match underlying content object type");
780 return obj.template get<ContainerType>();
783 return parent<Array<ArrayElementObject>>().
template parent<ContainerType>();
791template <
typename E,
typename = std::enable_if_t<std::is_enum_v<E>>>
799 static const std::unordered_map<E, std::string> reverseMap = []() {
800 std::unordered_map<E, std::string> result;
802 result.emplace(element.second, element.first);
817 static_assert(std::is_arithmetic_v<T> || std::is_same_v<T, std::string> ||
818 std::is_base_of_v<ArrayElementObject, T>,
"Invalid MNX dictionary element type.");
821 template <
typename DictionaryType,
typename IteratorType>
824 using value_type = std::pair<const std::string, T>;
825 using difference_type = std::ptrdiff_t;
826 using iterator_category = std::forward_iterator_tag;
831 DictionaryType* m_ptr {};
832 IteratorType m_it {};
833 mutable std::optional<value_type> m_pair;
835 void update_pair()
const
838 if (m_it != m_ptr->ref().end()) {
839 m_pair.emplace(m_it.key(), m_ptr->valueForKey(m_it.key()));
844 iter(DictionaryType* ptr, IteratorType it)
845 : m_ptr(ptr), m_it(it)
850 [[nodiscard]] reference operator*()
const {
return *m_pair; }
851 [[nodiscard]] pointer operator->()
const {
return &*m_pair; }
853 iter& operator++() { ++m_it; update_pair();
return *
this; }
854 iter operator++(
int) { iter tmp(*
this); ++(*this);
return tmp; }
856 [[nodiscard]]
bool operator!=(
const iter& o)
const {
return m_it != o.m_it; }
857 [[nodiscard]]
bool operator==(
const iter& o)
const {
return m_it == o.m_it; }
882 [[nodiscard]]
size_t size()
const {
return ref().size(); }
885 [[nodiscard]]
bool empty()
const {
return ref().empty(); }
893 [[nodiscard]] T
at(std::string_view key)
const
894 {
return valueForKey(key); }
897 template <
typename U = T>
898 std::enable_if_t<!std::is_base_of_v<Base, U>,
void>
913 [[nodiscard]]
auto find(std::string_view key)
915 auto it =
ref().find(key);
922 [[nodiscard]]
auto find(std::string_view key)
const
924 auto it =
ref().find(key);
930 [[nodiscard]]
bool contains(std::string_view key)
const
947 [[nodiscard]] T valueForKey(std::string_view key)
const
949 if constexpr (std::is_base_of_v<Base, T>) {
950 return getChild<T>(key);
952 return getChild<SimpleType<T>>(key);
956 template <
typename U,
typename... Args>
957 U appendImpl(std::string_view key, Args&&... args)
959 static_assert(std::is_base_of_v<Base, U>,
"Dictionary::appendImpl requires a Base-derived element type.");
960 if constexpr (std::is_base_of_v<Object, U>) {
961 ref()[key] = json::object();
963 ref()[key] = json::array();
965 return U(*
this, key, std::forward<Args>(args)...);
968 template <
typename, auto>
969 friend struct detail::DictionaryAppendFromMake;
970 template <
typename,
typename>
971 friend struct detail::DictionaryAppendBase;
976#ifndef DOXYGEN_SHOULD_IGNORE_THIS
983template<
typename EnumType>
984struct adl_serializer<EnumType, std::enable_if_t<std::is_enum_v<EnumType>>>
986 template<
typename BasicJsonType>
987 static EnumType from_json(
const BasicJsonType& j)
991 auto it = map.find(j.template get<std::string>());
992 if (it != map.end()) {
999 template<
typename BasicJsonType>
1000 static void to_json(BasicJsonType& j,
const EnumType& value)
1003 auto it = map.find(value);
1004 if (it == map.end()) {
1006 j = BasicJsonType();
1016template<
typename BasicJsonType,
typename EnumType,
1017 std::enable_if_t<std::is_enum<EnumType>::value,
int> = 0>
1018inline void from_json(
const BasicJsonType& j, EnumType& value)
1022 auto it = map.find(j.template get<std::string>());
1023 if (it != map.end()) {
1031template<
typename BasicJsonType,
typename EnumType,
1032 std::enable_if_t<std::is_enum<EnumType>::value,
int> = 0>
1033inline void to_json(BasicJsonType& j, EnumType value)
noexcept
1036 auto it = map.find(value);
1037 if (it != map.end()) {
1041 j = BasicJsonType();
Represents an MNX object that is included as an array element.
Definition BaseTypes.h:719
ContainerType container() const
Returns the object that owns the content array this element belongs to wrapped as the specified templ...
Definition BaseTypes.h:765
size_t calcArrayIndex() const
Calculates the array index of the current instance within the array.
Definition BaseTypes.h:724
Represents an MNX array, encapsulating property access.
Definition BaseTypes.h:531
std::enable_if_t<!std::is_base_of_v< Base, U >, void > assign(const std::vector< U > &values)
Replace all elements with values from a vector. (Available only for primitive types)
Definition BaseTypes.h:652
T front() const
Access the first element.
Definition BaseTypes.h:601
void checkIndex(size_t index) const
validates that an index is not out of range
Definition BaseTypes.h:688
std::enable_if_t<!std::is_base_of_v< Base, U >, void > assign(InputIt first, InputIt last)
Replace all elements with values from an iterator range. (Available only for primitive types)
Definition BaseTypes.h:641
auto begin()
Returns an iterator to the beginning of the array.
Definition BaseTypes.h:674
size_t size() const
Get the size of the array.
Definition BaseTypes.h:584
bool empty() const
Check if the array is empty.
Definition BaseTypes.h:587
iter< Array > iterator
non-const iterator type
Definition BaseTypes.h:560
iter< const Array > const_iterator
const iterator type
Definition BaseTypes.h:561
T value_type
The type for elements in this Array.
Definition BaseTypes.h:558
auto operator[](size_t index) const
const operator[]
Definition BaseTypes.h:609
Array(Base &parent, std::string_view key)
Creates a new Array class as a child of a JSON node.
Definition BaseTypes.h:580
auto begin() const
Returns a const iterator to the beginning of the array.
Definition BaseTypes.h:680
void erase(size_t index)
Remove an element at a given index.
Definition BaseTypes.h:658
std::enable_if_t<!std::is_base_of_v< Base, U >, std::vector< U > > toStdVector() const
Converts the Array to an owning std::vector.
Definition BaseTypes.h:670
auto end()
Returns an iterator to the end of the array.
Definition BaseTypes.h:677
T back() const
Access the last element.
Definition BaseTypes.h:606
Array()
Constructor for detached array instance.
Definition BaseTypes.h:564
void clear()
Clear all elements.
Definition BaseTypes.h:590
Array(const std::shared_ptr< json > &root, json_pointer pointer)
Wraps an Array class around an existing JSON array node.
Definition BaseTypes.h:570
std::enable_if_t<!std::is_base_of_v< Base, U >, void > push_back(const U &value)
Append a new value to the array. (Available only for primitive types)
Definition BaseTypes.h:633
T at(size_t index) const
Direct getter for a particular element.
Definition BaseTypes.h:593
auto end() const
Returns a const iterator to the end of the array.
Definition BaseTypes.h:683
auto operator[](size_t index)
non-const operator[]
Definition BaseTypes.h:620
Base class wrapper for all MNX JSON nodes.
Definition BaseTypes.h:212
json & ref() const
Convert this node for retrieval.
Definition BaseTypes.h:288
Base(json &&jsonRef, Base &parent, std::string_view key)
Construct a Base reference as a child inside a parent node.
Definition BaseTypes.h:313
json_pointer pointer() const
Returns the json_pointer for this node.
Definition BaseTypes.h:274
Base(const std::shared_ptr< json > &root, json_pointer pointer)
Wrap a Base instance around a specific JSON reference using a json_pointer.
Definition BaseTypes.h:304
T parent() const
Returns the parent object for this node.
Definition BaseTypes.h:260
T getChild(std::string_view key) const
Retrieves and validates a required child node.
Definition BaseTypes.h:327
json & ref()
Access the JSON node for modification.
Definition BaseTypes.h:294
std::optional< T > getOptionalChild(std::string_view key) const
Retrieves an optional child node.
Definition BaseTypes.h:364
std::optional< T > getEnclosingElement() const
Returns the enclosing array element for this instance. If T is a type that can be nested (e....
Definition Implementations.cpp:70
T setChild(std::string_view key, const T &value)
Sets a child node.
Definition BaseTypes.h:347
bool empty() const
Returns true if the object is empty.
Definition BaseTypes.h:280
Base(const Base &src)
Copy constructor.
Definition BaseTypes.h:217
Base & operator=(const Base &src)
Copy assignment operator.
Definition BaseTypes.h:226
Base(Base &&src) noexcept
Move constructor.
Definition BaseTypes.h:221
Base & operator=(Base &&src)
Move assignment operator.
Definition BaseTypes.h:238
std::string dump(int indents=-1) const
Dumps the branch to a string. Useful in debugging.
Definition BaseTypes.h:251
Document document() const
Returns the document root.
Definition Implementations.cpp:121
const std::shared_ptr< json > & root() const
Returns the root.
Definition BaseTypes.h:297
Class for content arrays.
Definition ContentArray.h:49
Base class for objects that are elements of content arrays.
Definition BaseTypes.h:742
MNX_OPTIONAL_PROPERTY_WITH_DEFAULT(std::string, type, std::string(defaultType()))
determines our type in the JSON
T get() const
Constructs an object of type T if its type matches the JSON type.
Definition BaseTypes.h:752
Represents an MNX dictionary, where each key is a user-defined string.
Definition BaseTypes.h:816
iter< Dictionary, json::iterator > iterator
non-const iterator type
Definition BaseTypes.h:864
size_t size() const
Get the size of the array.
Definition BaseTypes.h:882
auto end() const
Returns a const iterator to the end of the dictionary.
Definition BaseTypes.h:943
auto begin() const
Returns a const iterator to the beginning of the dictionary.
Definition BaseTypes.h:940
std::enable_if_t<!std::is_base_of_v< Base, U >, void > emplace(std::string_view key, const U &value)
Add a new value to the dictonary. (Available only for primitive types)
Definition BaseTypes.h:899
auto find(std::string_view key)
Finds an element by key and returns an iterator.
Definition BaseTypes.h:913
Dictionary(Base &parent, std::string_view key)
Creates a new Dictionary class as a child of a JSON node.
Definition BaseTypes.h:878
iter< const Dictionary, json::const_iterator > const_iterator
const iterator type
Definition BaseTypes.h:865
T value_type
The type for elements in this Array.
Definition BaseTypes.h:862
auto begin()
Returns an iterator to the beginning of the dictionary.
Definition BaseTypes.h:934
bool empty() const
Check if the array is empty.
Definition BaseTypes.h:885
auto find(std::string_view key) const
Finds an element by key and returns a const iterator.
Definition BaseTypes.h:922
void erase(std::string_view key)
Remove an element at a given key.
Definition BaseTypes.h:905
Dictionary(const std::shared_ptr< json > &root, json_pointer pointer)
Wraps an Dictionary class around an existing JSON node.
Definition BaseTypes.h:870
T at(std::string_view key) const
Direct getter for a particular element.
Definition BaseTypes.h:893
auto end()
Returns an iterator to the end of the dictionary.
Definition BaseTypes.h:937
bool contains(std::string_view key) const
Returns true if the key exists in in the dictionary.
Definition BaseTypes.h:930
void clear()
Clear all elements.
Definition BaseTypes.h:888
Represents an MNX document and provides methods for loading and saving.
Definition Document.h:134
Represents an MNX object, encapsulating property access.
Definition BaseTypes.h:429
void clearExtension(const std::string_view key)
Removes a vendor extension value from _x, if it exists.
Definition BaseTypes.h:475
MNX_OPTIONAL_PROPERTY(std::string, _c)
An optional comment. This serves a similar function as XML or HTML comments.
Object(const std::shared_ptr< json > &root, json_pointer pointer)
Wraps an Object class around an existing JSON object node.
Definition BaseTypes.h:438
void setExtension(const std::string_view key, const json &value)
Sets a vendor extension value in _x, creating _x when needed.
Definition BaseTypes.h:456
Object()
Constructor fresh document or detached instance.
Definition BaseTypes.h:432
MNX_OPTIONAL_CHILD(Object, _x)
Vendor-defined dictionary.
std::optional< json > getExtension(const std::string_view key) const
Gets a vendor extension value from _x.
Definition BaseTypes.h:463
MNX_OPTIONAL_PROPERTY(std::string, id)
Uniquely identifies the object.
Object(Base &parent, std::string_view key)
Creates a new Object class as a child of a JSON node.
Definition BaseTypes.h:448
Allows access to a fundamental type (number, boolean, string) in a JSON node.
Definition BaseTypes.h:490
SimpleType(const std::shared_ptr< json > &root, json_pointer pointer)
Wraps a SimpleType class around an existing JSON object node.
Definition BaseTypes.h:499
bool operator==(const T &src) const
Equality comparison with value type.
Definition BaseTypes.h:518
T value_type
value type of this SimpleType
Definition BaseTypes.h:494
SimpleType & operator=(const T &src)
Allow assignment to underlying json reference.
Definition BaseTypes.h:511
Base class for dynamics.
Definition Dynamics.h:41
Represents a musical event within a sequence.
Definition Sequence.h:445
Represents a multi-note tremolo sequence within a sequence.
Definition Sequence.h:592
Occupies metric space without showing anything.
Definition Sequence.h:520
Represents a tuplet sequence within a sequence.
Definition Sequence.h:643
Base class for formatted-text content objects.
Definition FormattedText.h:50
object model for MNX format
nlohmann::json json
JSON class for MNX.
Definition BaseTypes.h:67
std::function< void(const std::string &message, const Base &location)> ErrorHandler
Error handler type for reporting errors.
Definition BaseTypes.h:423
json::json_pointer json_pointer
JSON pointer class for MNX.
Definition BaseTypes.h:68
const int MNX_VERSION
The MNX version for files generated by the DOM.
Definition BaseTypes.h:65
const std::string & getMnxSchemaId()
Returns the MNX schema id from the embedded schema.
Definition SchemaValidate.cpp:76
int getMnxSchemaVersion()
Returns the MNX version extracted from the trailing segment of schema $id.
Definition SchemaValidate.cpp:81
Supplies enum string mappings to nlohmann json's serializer.
Definition BaseTypes.h:793
static const std::unordered_map< E, std::string > enumToString()
maps enum values to strings
Definition BaseTypes.h:797
static const std::unordered_map< std::string, E > stringToEnum()
maps strings to enum values
Base append implementation for arrays of Base-derived types.
Definition BaseTypes.h:134
U append(Args &&... args)
Append a new element at the end of the array. (Available only for Base types)
Definition BaseTypes.h:141
T append(Args... args)
Append a new element at the end of the array. (Available only for Base types)
Definition BaseTypes.h:125
Adds an append(...) overload that mirrors a type's static make(...) signature for arrays.
Definition BaseTypes.h:115
Definition BaseTypes.h:148
Base append implementation for dictionaries of Base-derived types.
Definition BaseTypes.h:180
U append(std::string_view key, Args &&... args)
Append a new element at the end of the array. (Available only for Base types)
Definition BaseTypes.h:187
T append(std::string_view key, Args... args)
Create a new element using the input key. (Available only for Base types)
Definition BaseTypes.h:171
Adds an append(key, ...) overload that mirrors a type's static make(...) signature for dictionaries.
Definition BaseTypes.h:161
Definition BaseTypes.h:194
Definition BaseTypes.h:104
Definition BaseTypes.h:106
Definition BaseTypes.h:105