SPT JSON API  1.0.0
Developed by Sans Pareil Technologies, Inc. (SPT)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
spt::json::Value Struct Reference

Abstract base class that represents a valid JSON value. More...

#include <Value.h>

+ Inheritance diagram for spt::json::Value:

Public Types

enum  Type : int8_t {
  Type::String, Type::Number, Type::Object, Type::Array,
  Type::Boolean, Type::Null
}
 Enumeration of JSON data types. More...
 
typedef std::unique_ptr< ValuePtr
 Unique pointer that holds a value instance. More...
 

Public Member Functions

virtual ~Value ()
 Virtual DTOR for sub-classes. More...
 
 Value (Value &&rhs)
 Move CTOR. More...
 
Valueoperator= (Value &&rhs)
 Move assignment operator. More...
 
 Value (const Value &)=delete
 Copy CTOR. Deleted. More...
 
Valueoperator= (Value &)=delete
 Copy assignment operator deleted. More...
 
Type getType () const
 Return the type of data that is represented by this instance. More...
 

Protected Member Functions

 Value (Type t)
 CTOR with specified type. More...
 

Detailed Description

Abstract base class that represents a valid JSON value.

Date
Created 2013/05/02 18:39
Author
Rakesh Vidyadharan
Version
Id
Value.h 5680 2014-10-27 16:52:08Z rakesh

Member Typedef Documentation

typedef std::unique_ptr<Value> spt::json::Value::Ptr

Unique pointer that holds a value instance.

Member Enumeration Documentation

enum spt::json::Value::Type : int8_t
strong

Enumeration of JSON data types.

Enumerator
String 

A JSON string value.

Number 

A JSON numeric value. Both integral and floating types.

Object 

Represents JSON data of type object.

Array 

Represents JSON data of type array.

Boolean 

Represents the JSON true/false values.

Null 

Represents the JSON null value.

Constructor & Destructor Documentation

virtual spt::json::Value::~Value ( )
inlinevirtual

Virtual DTOR for sub-classes.

spt::json::Value::Value ( Value &&  rhs)
inline

Move CTOR.

spt::json::Value::Value ( const Value )
delete

Copy CTOR. Deleted.

spt::json::Value::Value ( Type  t)
inlineexplicitprotected

CTOR with specified type.

Member Function Documentation

Type spt::json::Value::getType ( ) const
inline

Return the type of data that is represented by this instance.

This is used primarily to allow run-time querying of the type of JSON data (that was parsed usually).

Returns
The JSON data type.
Value& spt::json::Value::operator= ( Value &&  rhs)
inline

Move assignment operator.

Value& spt::json::Value::operator= ( Value )
delete

Copy assignment operator deleted.


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