HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_JSONValueArray Class Reference

UT_JSONValueArray stores a list of UT_JSONValue objects. More...

#include <UT_JSONValueArray.h>

Public Member Functions

 UT_JSONValueArray ()
 
 ~UT_JSONValueArray ()
 
void bumpRef (int d)
 Reference count (for shared arrays). More...
 
SYS_FORCE_INLINE int getRef () const
 Get the number of references to this array. More...
 
bool save (UT_JSONWriter &os) const
 Save to an output stream. More...
 
void dump () const
 Dump to stdout (same as save to std::cout) More...
 
SYS_FORCE_INLINE int64 size () const
 Return size of the array. More...
 
SYS_FORCE_INLINE int64 entries () const
 Return the number of entries in the array. More...
 
SYS_FORCE_INLINE const
UT_JSONValue
operator() (int64 i) const
 Access a const entry by index. More...
 
SYS_FORCE_INLINE UT_JSONValueoperator() (int64 i)
 Access an entry by index. More...
 
SYS_FORCE_INLINE const
UT_JSONValue
operator[] (int64 i) const
 Access a const entry by index. More...
 
SYS_FORCE_INLINE UT_JSONValueoperator[] (int64 i)
 Access an entry by index. More...
 
SYS_FORCE_INLINE const
UT_JSONValue
get (int64 i) const
 Access a const entry by index. More...
 
SYS_FORCE_INLINE UT_JSONValueget (int64 i)
 Access an entry by index. More...
 
bool import (int64 *result, int64 size) const
 
bool import (fpreal64 *result, int64 size) const
 
bool import (UT_Array< int64 > &array) const
 
bool import (UT_Array< fpreal64 > &array) const
 
bool import (UT_StringArray &array) const
 
int64 append (UT_JSONValue *v)
 Add an element to the array. More...
 
void remove (int64 index)
 Remove and delete an element by index. More...
 
void remove (UT_JSONValue *v)
 Remove and delete an element. More...
 
void removeLast ()
 Remove and delete the last added element. More...
 
void clear ()
 Remove and delete all elements. More...
 
void insertBefore (UT_JSONValue *v, UT_JSONValue *after_value)
 Inserts a value v before the given element after_value. More...
 
UT_JSONValueArrayappendArrayChild ()
 Adds a new array child to this map. More...
 
UT_JSONValueMapappendMapChild ()
 Adds a new map child to this map. More...
 

Detailed Description

UT_JSONValueArray stores a list of UT_JSONValue objects.

UT_JSONValueArray stores a list of UT_JSONValue objects.

See Also
UT_JSONValue, UT_JSONValueMap

Definition at line 30 of file UT_JSONValueArray.h.

Constructor & Destructor Documentation

UT_JSONValueArray::UT_JSONValueArray ( )
UT_JSONValueArray::~UT_JSONValueArray ( )

Member Function Documentation

int64 UT_JSONValueArray::append ( UT_JSONValue v)
inline

Add an element to the array.

Definition at line 88 of file UT_JSONValueArray.h.

UT_JSONValueArray* UT_JSONValueArray::appendArrayChild ( )

Adds a new array child to this map.

UT_JSONValueMap* UT_JSONValueArray::appendMapChild ( )

Adds a new map child to this map.

void UT_JSONValueArray::bumpRef ( int  d)
inline

Reference count (for shared arrays).

Definition at line 36 of file UT_JSONValueArray.h.

void UT_JSONValueArray::clear ( )

Remove and delete all elements.

void UT_JSONValueArray::dump ( ) const

Dump to stdout (same as save to std::cout)

SYS_FORCE_INLINE int64 UT_JSONValueArray::entries ( void  ) const
inline

Return the number of entries in the array.

Definition at line 53 of file UT_JSONValueArray.h.

SYS_FORCE_INLINE const UT_JSONValue* UT_JSONValueArray::get ( int64  i) const
inline

Access a const entry by index.

Definition at line 64 of file UT_JSONValueArray.h.

SYS_FORCE_INLINE UT_JSONValue* UT_JSONValueArray::get ( int64  i)
inline

Access an entry by index.

Definition at line 66 of file UT_JSONValueArray.h.

SYS_FORCE_INLINE int UT_JSONValueArray::getRef ( ) const
inline

Get the number of references to this array.

Definition at line 42 of file UT_JSONValueArray.h.

bool UT_JSONValueArray::import ( int64 result,
int64  size 
) const

Import an array of integer values (fails if the array size is too small or if one of the elements of the array cannot be interpreted as an integer).

bool UT_JSONValueArray::import ( fpreal64 result,
int64  size 
) const

Import an array of float values (fails if the array size is too small or if one of the elements of the array cannot be interpreted as an integer).

bool UT_JSONValueArray::import ( UT_Array< int64 > &  array) const

Import an array of integer values (fails if the elements of the array cannot be interpreted as an integer).

bool UT_JSONValueArray::import ( UT_Array< fpreal64 > &  array) const

Import an array of real values (fails if the elements of the array cannot be interpreted as such).

bool UT_JSONValueArray::import ( UT_StringArray array) const

Import an array of string values (fails if the elements of the array cannot be interpreted as such).

void UT_JSONValueArray::insertBefore ( UT_JSONValue v,
UT_JSONValue after_value 
)

Inserts a value v before the given element after_value.

SYS_FORCE_INLINE const UT_JSONValue* UT_JSONValueArray::operator() ( int64  i) const
inline

Access a const entry by index.

Definition at line 55 of file UT_JSONValueArray.h.

SYS_FORCE_INLINE UT_JSONValue* UT_JSONValueArray::operator() ( int64  i)
inline

Access an entry by index.

Definition at line 57 of file UT_JSONValueArray.h.

SYS_FORCE_INLINE const UT_JSONValue* UT_JSONValueArray::operator[] ( int64  i) const
inline

Access a const entry by index.

Definition at line 59 of file UT_JSONValueArray.h.

SYS_FORCE_INLINE UT_JSONValue* UT_JSONValueArray::operator[] ( int64  i)
inline

Access an entry by index.

Definition at line 61 of file UT_JSONValueArray.h.

void UT_JSONValueArray::remove ( int64  index)

Remove and delete an element by index.

void UT_JSONValueArray::remove ( UT_JSONValue v)

Remove and delete an element.

void UT_JSONValueArray::removeLast ( )

Remove and delete the last added element.

bool UT_JSONValueArray::save ( UT_JSONWriter os) const

Save to an output stream.

SYS_FORCE_INLINE int64 UT_JSONValueArray::size ( void  ) const
inline

Return size of the array.

Definition at line 51 of file UT_JSONValueArray.h.


The documentation for this class was generated from the following file: