TrueReality  v0.1.1912
trUtil::JSON Namespace Reference

Classes

class  Array
 A JSON array. More...
 
class  ArrayBase
 An array base. More...
 
class  Base
 The Base class for all the JSON classes. More...
 
class  File
 A file. More...
 
class  Object
 Forward declaration. More...
 
class  Value
 Represents a JSON value. More...
 

Typedefs

using Int = int
 The int. More...
 
using UInt = unsigned int
 The int. More...
 
using Int64 = int64_t
 The fourth int 6. More...
 
using UInt64 = uint64_t
 The fourth u int 6. More...
 
using LargestInt = Int64
 The largest int. More...
 
using LargestUInt = UInt64
 The largest u int. More...
 

Enumerations

enum  ValueType {
  NullValue = 0, IntValue = 1, UintValue = 2, RealValue = 3,
  StringValue = 4, BooleanValue = 5, ArrayValue = 6, ObjectValue = 7
}
 Type of the value held by a Value object. More...
 

Functions

TR_UTIL_EXPORT std::ostream & operator<< (std::ostream &, const Value &root)
 OStream operator. More...
 
Json::ValueType ToValueType (ValueType val)
 Converts JSON::ValueType to Json::ValueType. More...
 
ValueType ToValueType (Json::ValueType val)
 Converts Json::ValueType to JSON::ValueType. More...
 

Typedef Documentation

◆ Int

using trUtil::JSON::Int = typedef int

The int.

Definition at line 55 of file Value.h.

◆ Int64

using trUtil::JSON::Int64 = typedef int64_t

The fourth int 6.

Definition at line 72 of file Value.h.

◆ LargestInt

The largest int.

Definition at line 77 of file Value.h.

◆ LargestUInt

The largest u int.

Definition at line 79 of file Value.h.

◆ UInt

using trUtil::JSON::UInt = typedef unsigned int

The int.

Definition at line 57 of file Value.h.

◆ UInt64

using trUtil::JSON::UInt64 = typedef uint64_t

The fourth u int 6.

Definition at line 74 of file Value.h.

Enumeration Type Documentation

◆ ValueType

Type of the value held by a Value object.

Author
Maxim Serebrennik
Enumerator
NullValue 
IntValue 

'null' value

UintValue 

signed integer value

RealValue 

unsigned integer value

StringValue 

double value

BooleanValue 

UTF-8 string value.

ArrayValue 

bool value

ObjectValue 

array value (ordered list)

Definition at line 89 of file Value.h.

Function Documentation

◆ operator<<()

std::ostream & trUtil::JSON::operator<< ( std::ostream &  out,
const Value root 
)

OStream operator.

Author
Maxim Serebrennik
Parameters
[in,out]parameter1The first parameter.
rootThe root.
Returns
The shifted result.

Definition at line 856 of file Value.cpp.

References trBase::operator<<().

Here is the call graph for this function:

◆ ToValueType() [1/2]

Json::ValueType trUtil::JSON::ToValueType ( ValueType  val)

Converts JSON::ValueType to Json::ValueType.

Parameters
valThe value.
Returns
Val as a Json::ValueType.

Definition at line 41 of file Value.cpp.

References ArrayValue, BooleanValue, IntValue, NullValue, ObjectValue, RealValue, StringValue, and UintValue.

Referenced by trUtil::JSON::Value::Value().

Here is the caller graph for this function:

◆ ToValueType() [2/2]

ValueType trUtil::JSON::ToValueType ( Json::ValueType  val)

Converts Json::ValueType to JSON::ValueType.

Parameters
valThe value.
Returns
Val as a ValueType.

Definition at line 84 of file Value.cpp.

References ArrayValue, BooleanValue, IntValue, NullValue, ObjectValue, RealValue, StringValue, and UintValue.