|
TrueReality
v0.1.1912
|
#include <Array.h>


Public Member Functions | |
| Array () | |
| ctor. More... | |
| Array (const Value &Array) | |
| ctor that takes a JSON Value of an Array type as input. More... | |
| ~Array () | |
| dtor. More... | |
| Value | operator[] (int index) |
| Access an array element (zero based index ). More... | |
| void | SetComment (const std::string &comment) |
| Sets a comment. More... | |
| bool | HasComment () const |
| Checks if the internal value has a comment. More... | |
| std::string | GetComment () const |
| Returns the internal comment. More... | |
| int | Size () |
| Get the size of the array. More... | |
| void | Resize (int newSize) |
| Change the size of the array to the new passed in size. More... | |
| void | Clear () override |
| Clears the internal JSON Root node. More... | |
| bool | RemoveIndex (int index, Value *removedVal) |
| Removes a given element of the array. More... | |
| virtual Value & | GetJSONRoot () override |
| Returns a reference to the internal JSON Root node. More... | |
| virtual void | PrintJSONRoot () override |
| Prints out to the screen the whole JSON Root content. More... | |
| virtual bool | IsNull (int &index) const override |
| Checks if the value stored at the specific index is a NULL. More... | |
| virtual void | AddNull () override |
| Add a NULL Value to the Array. More... | |
| virtual bool | IsBool (int &index) const override |
| Checks if the value stored at the specific index is a Boolean. More... | |
| virtual bool | GetBool (int &index) const override |
| Returns the Boolean value stored at the given index. More... | |
| virtual void | AddBool (const bool &value) override |
| Adds a Boolean to the Array. More... | |
| virtual bool | IsTrue (int &index) const override |
| Checks if the value stored at the specific index is True. More... | |
| virtual bool | IsFalse (int &index) const override |
| Checks if the value stored at the specific index is False. More... | |
| virtual bool | IsNumber (int &index) const override |
| Checks if the value stored at the specific index is a Number. More... | |
| virtual bool | IsInt (int &index) const override |
| Checks if the value stored at the specific index is an Integer. More... | |
| virtual int | GetInt (int &index) const override |
| Returns the Integer value stored at the given index. More... | |
| virtual void | AddInt (const int &value) override |
| Adds the Integer value to the Array. More... | |
| virtual bool | IsDouble (int &index) const override |
| Checks if the value stored at the specific index is a Double. More... | |
| virtual double | GetDouble (int &index) const override |
| Returns the Double value stored at the given index. More... | |
| virtual void | AddDouble (const double &value) override |
| Adds the Double value to the Array. More... | |
| virtual bool | IsUInt (int &index) const override |
| Checks if the value stored at the specific index is an Unsigned Integer. More... | |
| virtual unsigned int | GetUInt (int &index) const override |
| Returns the Unsigned Integer value stored at the given index. More... | |
| virtual void | AddUInt (const unsigned int &value) override |
| Adds the Unsigned Integer value the Array. More... | |
| virtual bool | IsInt64 (int &index) const override |
| Checks if the value stored at the specific index is a 64bit Integer. More... | |
| virtual Int64 | GetInt64 (int &index) const override |
| Returns the 64bit Integer value stored at the given index. More... | |
| virtual void | AddInt64 (const Int64 &value) override |
| Adds the 64bit Integer value to the Array. More... | |
| virtual bool | IsUInt64 (int &index) const override |
| Checks if the value stored at the specific index is a 64bit Integer. More... | |
| virtual UInt64 | GetUInt64 (int &index) const override |
| Returns the 64bit Integer value stored at the given index. More... | |
| virtual void | AddUInt64 (const UInt64 &value) override |
| Adds the 64bit Integer value to the Array. More... | |
| virtual bool | IsFloat (int &index) const override |
| Checks if the value stored at the specific index is a float. More... | |
| virtual float | GetFloat (int &index) const override |
| Returns the float value stored at the given index. More... | |
| virtual void | AddFloat (const float &value) override |
| Adds the float value to the Array. More... | |
| virtual bool | IsString (int &index) const override |
| Checks if the value stored at the specific index is a String. More... | |
| virtual const std::string | GetString (int &index) const override |
| Returns the String value stored at the given index. More... | |
| virtual void | AddString (const std::string &value) override |
| Adds the String to the Array. More... | |
| virtual bool | IsArray (int &index) const override |
| Checks if the value stored at the specific index is an Array. More... | |
| virtual Array | GetArray (int &index) const override |
| Returns the Array value stored at the given index. More... | |
| virtual void | AddArray (Array &Array) override |
| Adds the Array to the Array. More... | |
| virtual bool | IsObject (int &index) const override |
| Checks if the value stored at the specific index is an Object. More... | |
| virtual Object | GetObject (int &index) const override |
| Returns the Object value stored at the given index. More... | |
| virtual void | AddObject (Object &Object) override |
| Adds the Object to the Array. More... | |
Private Attributes | |
| Value | mRoot = Value(ValueType::ArrayValue) |
| The root. More... | |
Additional Inherited Members |
| trUtil::JSON::Array::Array | ( | ) |
| trUtil::JSON::Array::Array | ( | const Value & | Array | ) |
|
overridevirtual |
| [in,out] | Array | The array. |
Implements trUtil::JSON::ArrayBase.
Definition at line 312 of file Array.cpp.
References trUtil::JSON::Value::Append(), GetJSONRoot(), and mRoot.

|
overridevirtual |
Adds a Boolean to the Array.
| value | The value. |
Implements trUtil::JSON::ArrayBase.
Definition at line 136 of file Array.cpp.
References trUtil::JSON::Value::Append(), and mRoot.

|
overridevirtual |
Adds the Double value to the Array.
| value | The value. |
Implements trUtil::JSON::ArrayBase.
Definition at line 204 of file Array.cpp.
References trUtil::JSON::Value::Append(), and mRoot.

|
overridevirtual |
Adds the float value to the Array.
| value | The value. |
Implements trUtil::JSON::ArrayBase.
Definition at line 276 of file Array.cpp.
References trUtil::JSON::Value::Append(), and mRoot.

|
overridevirtual |
Adds the Integer value to the Array.
| value | The value. |
Implements trUtil::JSON::ArrayBase.
Definition at line 186 of file Array.cpp.
References trUtil::JSON::Value::Append(), and mRoot.

|
overridevirtual |
Adds the 64bit Integer value to the Array.
| value | The value. |
Implements trUtil::JSON::ArrayBase.
Definition at line 240 of file Array.cpp.
References trUtil::JSON::Value::Append(), and mRoot.

|
overridevirtual |
Add a NULL Value to the Array.
Implements trUtil::JSON::ArrayBase.
Definition at line 118 of file Array.cpp.
References trUtil::JSON::Value::Append(), and mRoot.

|
overridevirtual |
| [in,out] | Object | The object. |
Implements trUtil::JSON::ArrayBase.
Definition at line 330 of file Array.cpp.
References trUtil::JSON::Value::Append(), trUtil::JSON::Object::GetJSONRoot(), and mRoot.

|
overridevirtual |
Adds the String to the Array.
| value | The value. |
Implements trUtil::JSON::ArrayBase.
Definition at line 294 of file Array.cpp.
References trUtil::JSON::Value::Append(), and mRoot.

|
overridevirtual |
Adds the Unsigned Integer value the Array.
| value | The value. |
Implements trUtil::JSON::ArrayBase.
Definition at line 222 of file Array.cpp.
References trUtil::JSON::Value::Append(), and mRoot.

|
overridevirtual |
Adds the 64bit Integer value to the Array.
| value | The value. |
Implements trUtil::JSON::ArrayBase.
Definition at line 258 of file Array.cpp.
References trUtil::JSON::Value::Append(), and mRoot.

|
overridevirtual |
Clears the internal JSON Root node.
Implements trUtil::JSON::ArrayBase.
Definition at line 88 of file Array.cpp.
References trUtil::JSON::Value::Clear(), and mRoot.

|
overridevirtual |
Returns the Array value stored at the given index.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 306 of file Array.cpp.
References trUtil::JSON::Value::GetArray(), and mRoot.

|
overridevirtual |
Returns the Boolean value stored at the given index.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 130 of file Array.cpp.
References trUtil::JSON::Value::GetBool(), and mRoot.
Referenced by IsFalse(), and IsTrue().


| std::string trUtil::JSON::Array::GetComment | ( | ) | const |
Returns the internal comment.
Definition at line 71 of file Array.cpp.
References trUtil::JSON::Value::GetComment(), and mRoot.

|
overridevirtual |
Returns the Double value stored at the given index.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 198 of file Array.cpp.
References trUtil::JSON::Value::GetDouble(), and mRoot.

|
overridevirtual |
Returns the float value stored at the given index.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 270 of file Array.cpp.
References trUtil::JSON::Value::GetFloat(), and mRoot.

|
overridevirtual |
Returns the Integer value stored at the given index.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 180 of file Array.cpp.
References trUtil::JSON::Value::GetInt(), and mRoot.

|
overridevirtual |
Returns the 64bit Integer value stored at the given index.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 234 of file Array.cpp.
References trUtil::JSON::Value::GetInt64(), and mRoot.

|
overridevirtual |
Returns a reference to the internal JSON Root node.
Implements trUtil::JSON::ArrayBase.
Definition at line 100 of file Array.cpp.
References mRoot.
Referenced by AddArray(), and trUtil::JSON::Value::SetArray().

|
overridevirtual |
Returns the Object value stored at the given index.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 324 of file Array.cpp.
References trUtil::JSON::Value::GetObject(), and mRoot.

|
overridevirtual |
Returns the String value stored at the given index.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 288 of file Array.cpp.
References trUtil::JSON::Value::GetString(), and mRoot.

|
overridevirtual |
Returns the Unsigned Integer value stored at the given index.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 216 of file Array.cpp.
References trUtil::JSON::Value::GetUInt(), and mRoot.

|
overridevirtual |
Returns the 64bit Integer value stored at the given index.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 252 of file Array.cpp.
References trUtil::JSON::Value::GetUInt64(), and mRoot.

| bool trUtil::JSON::Array::HasComment | ( | ) | const |
Checks if the internal value has a comment.
Definition at line 65 of file Array.cpp.
References trUtil::JSON::Value::HasComment(), and mRoot.

|
overridevirtual |
Checks if the value stored at the specific index is an Array.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 300 of file Array.cpp.
References trUtil::JSON::Value::IsArray(), and mRoot.

|
overridevirtual |
Checks if the value stored at the specific index is a Boolean.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 124 of file Array.cpp.
References trUtil::JSON::Value::IsBool(), and mRoot.

|
overridevirtual |
Checks if the value stored at the specific index is a Double.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 192 of file Array.cpp.
References trUtil::JSON::Value::IsDouble(), and mRoot.

|
overridevirtual |
Checks if the value stored at the specific index is False.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 155 of file Array.cpp.
References GetBool().

|
overridevirtual |
Checks if the value stored at the specific index is a float.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 264 of file Array.cpp.
References trUtil::JSON::Value::IsFloat(), and mRoot.

|
overridevirtual |
Checks if the value stored at the specific index is an Integer.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 174 of file Array.cpp.
References trUtil::JSON::Value::IsInt(), and mRoot.

|
overridevirtual |
Checks if the value stored at the specific index is a 64bit Integer.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 228 of file Array.cpp.
References trUtil::JSON::Value::IsInt64(), and mRoot.

|
overridevirtual |
Checks if the value stored at the specific index is a NULL.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 112 of file Array.cpp.
References trUtil::JSON::Value::IsNull(), and mRoot.

|
overridevirtual |
Checks if the value stored at the specific index is a Number.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 168 of file Array.cpp.
References trUtil::JSON::Value::IsNumber(), and mRoot.

|
overridevirtual |
Checks if the value stored at the specific index is an Object.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 318 of file Array.cpp.
References trUtil::JSON::Value::IsObject(), and mRoot.

|
overridevirtual |
Checks if the value stored at the specific index is a String.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 282 of file Array.cpp.
References trUtil::JSON::Value::IsString(), and mRoot.

|
overridevirtual |
Checks if the value stored at the specific index is True.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 142 of file Array.cpp.
References GetBool().

|
overridevirtual |
Checks if the value stored at the specific index is an Unsigned Integer.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 210 of file Array.cpp.
References trUtil::JSON::Value::IsUInt(), and mRoot.

|
overridevirtual |
Checks if the value stored at the specific index is a 64bit Integer.
| [in,out] | index | Zero-based index of the. |
Implements trUtil::JSON::ArrayBase.
Definition at line 246 of file Array.cpp.
References trUtil::JSON::Value::IsUInt64(), and mRoot.

| Value trUtil::JSON::Array::operator[] | ( | int | index | ) |
Access an array element (zero based index ).
The return is by value, but the internal json object is stored by reference.
| index | Zero-based index of the. |
Definition at line 49 of file Array.cpp.
References trUtil::JSON::Value::Index(), LOG_E, and mRoot.

|
overridevirtual |
Prints out to the screen the whole JSON Root content.
Implements trUtil::JSON::ArrayBase.
Definition at line 106 of file Array.cpp.
References mRoot.
| bool trUtil::JSON::Array::RemoveIndex | ( | int | index, |
| Value * | removedVal | ||
| ) |
Removes a given element of the array.
Passes back the removed value though the pointer and sets the return to TRUE.
| index | Zero-based index of the. | |
| [in,out] | removedVal | If non-null, the removed value. |
Definition at line 94 of file Array.cpp.
References mRoot, and trUtil::JSON::Value::RemoveIndex().

| void trUtil::JSON::Array::Resize | ( | int | newSize | ) |
Change the size of the array to the new passed in size.
| newSize | Size of the new. |
Definition at line 82 of file Array.cpp.
References mRoot, and trUtil::JSON::Value::Resize().

| void trUtil::JSON::Array::SetComment | ( | const std::string & | comment | ) |
Sets a comment.
| comment | The comment. |
Definition at line 59 of file Array.cpp.
References mRoot, and trUtil::JSON::Value::SetComment().

| int trUtil::JSON::Array::Size | ( | ) |
Get the size of the array.
Definition at line 76 of file Array.cpp.
References mRoot, and trUtil::JSON::Value::Size().

The root.
Definition at line 533 of file Array.h.
Referenced by AddArray(), AddBool(), AddDouble(), AddFloat(), AddInt(), AddInt64(), AddNull(), AddObject(), AddString(), AddUInt(), AddUInt64(), Array(), Clear(), GetArray(), GetBool(), GetComment(), GetDouble(), GetFloat(), GetInt(), GetInt64(), GetJSONRoot(), GetObject(), GetString(), GetUInt(), GetUInt64(), HasComment(), IsArray(), IsBool(), IsDouble(), IsFloat(), IsInt(), IsInt64(), IsNull(), IsNumber(), IsObject(), IsString(), IsUInt(), IsUInt64(), operator[](), PrintJSONRoot(), RemoveIndex(), Resize(), SetComment(), and Size().