11 #ifndef __UT_JSONValueMap__
12 #define __UT_JSONValueMap__
73 {
return myArray.entries(); }
75 {
return myArray.entries(); }
108 {
return myArray(i); }
111 {
return myArray(i); }
163 template <
typename... ARGS>
190 template <
typename T>
198 {
return !(*
this == arr); }
218 if (myIndex < myObj->myArray.entries())
238 bool operator==(
const iterator &other)
const {
return (myObj == other.myObj) && (myIndex == other.myIndex);}
242 return *myObj->getItemAt_(myIndex);
246 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.
GLsizei const GLfloat * value
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
typename set_type::value_type value_type
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