diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-01-03 10:10:21 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-01-03 10:10:21 +0300 |
commit | ea8d749587ddf1108429f19eea89b9f0c2af3ee4 (patch) | |
tree | 37e700a67ebbc0da6ad9025fc8f1b89a65e25ec3 /source/blender/blenlib/BLI_serialize.hh | |
parent | 180b66ae8a1ffc0a1bb7d3993028240b4c7f7246 (diff) |
Cleanup: Rename ObjectValue to DictionaryValue (Serialization).
ObjectValue was to confusing as it is the term from JSON.
Diffstat (limited to 'source/blender/blenlib/BLI_serialize.hh')
-rw-r--r-- | source/blender/blenlib/BLI_serialize.hh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenlib/BLI_serialize.hh b/source/blender/blenlib/BLI_serialize.hh index 051731ab801..b1002b07fd3 100644 --- a/source/blender/blenlib/BLI_serialize.hh +++ b/source/blender/blenlib/BLI_serialize.hh @@ -36,7 +36,7 @@ * - DoubleValue: for double precision floating point numbers * - BooleanValue: for boolean values * - ArrayValue: An array of any supported value. - * - ObjectValue: A key value pair where keys are std::string. + * - DictionaryValue: A key value pair where keys are std::string. * - NullValue: for null values. * * # Basic usage @@ -97,7 +97,7 @@ enum class eValueType { class Value; class StringValue; -class ObjectValue; +class DictionaryValue; template<typename T, eValueType V> class PrimitiveValue; using IntValue = PrimitiveValue<int64_t, eValueType::Int>; using DoubleValue = PrimitiveValue<double, eValueType::Double>; @@ -122,7 +122,7 @@ using ArrayValue = ContainerValue<Vector<std::shared_ptr<Value>>, eValueType::Ar * - `NullValue`: represents nothing (null pointer or optional). * - `BooleanValue`: contains a boolean (true/false). * - `DoubleValue`: contains a double precision floating point number. - * - `ObjectValue`: represents an object (key value pairs where keys are strings and values can be + * - `DictionaryValue`: represents an object (key value pairs where keys are strings and values can be * of different types. * */ @@ -174,10 +174,10 @@ class Value { const ArrayValue *as_array_value() const; /** - * Casts to an ObjectValue. + * Casts to an DictionaryValue. * Will return nullptr when it is a different type. */ - const ObjectValue *as_object_value() const; + const DictionaryValue *as_object_value() const; }; /** @@ -228,7 +228,7 @@ class StringValue : public Value { /** * Template for arrays and objects. * - * Both ArrayValue and ObjectValue store their values in an array. + * Both ArrayValue and DictionaryValue store their values in an array. */ template< /** The container type where the elements are stored in. */ @@ -264,10 +264,10 @@ class ContainerValue : public Value { }; /** - * Internal storage type for ObjectValue. + * Internal storage type for DictionaryValue. * * The elements are stored as an key value pair. The value is a shared pointer so it can be shared - * when using `ObjectValue::create_lookup`. + * when using `DictionaryValue::create_lookup`. */ using ObjectElementType = std::pair<std::string, std::shared_ptr<Value>>; @@ -275,7 +275,7 @@ using ObjectElementType = std::pair<std::string, std::shared_ptr<Value>>; * Object is a key-value container where the key must be a std::string. * Internally it is stored in a blender::Vector to ensure the order of keys. */ -class ObjectValue : public ContainerValue<Vector<ObjectElementType>, eValueType::Object> { +class DictionaryValue : public ContainerValue<Vector<ObjectElementType>, eValueType::Object> { public: using LookupValue = std::shared_ptr<Value>; using Lookup = Map<std::string, LookupValue>; |