11 #ifndef __UT_JSONValueMap__
12 #define __UT_JSONValueMap__
72 {
return myArray.entries(); }
74 {
return myArray.entries(); }
107 {
return myArray(i); }
110 {
return myArray(i); }
162 template <
typename... ARGS>
189 template <
typename T>
197 {
return !(*
this == arr); }
217 if (myIndex < myObj->myArray.entries())
237 bool operator==(
const iterator &other)
const {
return (myObj == other.myObj) && (myIndex == other.myIndex);}
241 return *myObj->getItemAt_(myIndex);
245 return myObj->getItemAt_(myIndex);
const_iterator begin() const
void bumpRef(int d)
Reference count (for shared maps).
UT_JSONValueMap stores a map/dictionary of UT_JSONValue objects.
SYS_NO_DISCARD_RESULT const UT_JSONValue * operator()(int64 i) const
Access const entry by index.
SYS_NO_DISCARD_RESULT UT_JSONValue * operator[](const UT_StringRef &k)
Access entry by name (may be NULL pointer if k is not a key)
SYS_NO_DISCARD_RESULT int64 entries() const
Return the number of entries in the map.
BaseMap::value_type value_type
SYS_NO_DISCARD_RESULT UT_JSONValue * operator[](int64 i)
Access entry by index.
UT_JSONValueArray stores a list of UT_JSONValue objects.
SYS_NO_DISCARD_RESULT bool operator!=(const UT_JSONValueMap &arr) const
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
std::size_t SYS_HashType
Define the type for hash values.
Class which writes ASCII or binary JSON streams.
**But if you need a result
UT_JSONValue * value() const
BaseMap::value_type * operator->()
SYS_NO_DISCARD_RESULT const UT_JSONValue * operator[](const UT_StringRef &k) const
Access const entry by name (may be NULL pointer if k is not a key)
OIIO_FORCEINLINE vbool4 insert(const vbool4 &a, bool val)
Helper: substitute val for a[i].
bool operator==(const iterator &other) const
bool operator!=(const iterator &other) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
SYS_NO_DISCARD_RESULT const UT_JSONValue * operator[](int64 i) const
Access const entry by index.
BaseMap::value_type & operator*()
#define SYS_NO_DISCARD_RESULT
iterator(exint _num, UT_JSONValueMap *_obj)
SYS_NO_DISCARD_RESULT const UT_JSONValue * operator()(const UT_StringRef &k) const
Access const entry by name (may be NULL pointer if k is not a key)
SYS_NO_DISCARD_RESULT UT_JSONValue * operator()(int64 i)
Access entry by index.
SYS_NO_DISCARD_RESULT UT_JSONValue * operator()(const UT_StringRef &k)
Access entry by name (may be NULL pointer if k is not a key)
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
UT_JSONValue * operator->()
std::forward_iterator_tag iterator_category
SYS_NO_DISCARD_RESULT int getRef() const
Get the number of references to this map.
Class to store JSON objects as C++ objects.
**If you just want to fire and args
SYS_NO_DISCARD_RESULT int64 size() const
UT_JSONValue & operator*()
InsertResult emplace(const UT_StringHolder &key, ARGS &&...args)
Emplace a value into the map.
const_iterator end() const