vitasdk
Documentation of the vitasdk
|
Exports for User.
Include the header file in your project:
Link the library to the executable:
Load the required module:
Functions | |
sce::Json::MemAllocator::MemAllocator () | |
virtual | sce::Json::MemAllocator::~MemAllocator () |
virtual void * | sce::Json::MemAllocator::allocateMemory (SceSize size, void *userData)=0 |
Virtual Function for memory allocation. More... | |
virtual void | sce::Json::MemAllocator::freeMemory (void *ptr, void *userData)=0 |
Virtual Function for memory deallocation. More... | |
virtual void | sce::Json::MemAllocator::notifyError (int errorCode, SceSize size, void *userData) |
The base class definition prints an error to sceClibPrintf. More... | |
sce::Json::Initializer::Initializer () | |
sce::Json::Initializer::~Initializer () | |
int | sce::Json::Initializer::initialize (const InitParameter *initParams) |
Initialise the library. More... | |
int | sce::Json::Initializer::terminate () |
Terminate the library. More... | |
sce::Json::Array::iterator::iterator () | |
sce::Json::Array::iterator::iterator (const iterator &iter) | |
sce::Json::Array::iterator::~iterator () | |
void | sce::Json::Array::iterator::advance (SceSize adv) |
Advance the iterator by adv. More... | |
iterator & | sce::Json::Array::iterator::operator= (const iterator &iter) |
Assignment operator. More... | |
void | sce::Json::Array::iterator::operator++ (int adv) |
Advance the iterator by adv. More... | |
void | sce::Json::Array::iterator::operator++ () |
Increment the iterator. More... | |
Value & | sce::Json::Array::iterator::operator* () const |
Dereference the iterator. More... | |
bool | sce::Json::Array::iterator::operator!= (iterator iter) const |
Compare to another iterator. More... | |
Value * | sce::Json::Array::iterator::operator-> () const |
Access the Value being pointed to. More... | |
sce::Json::Array::Array () | |
sce::Json::Array::Array (const Array &arr) | |
sce::Json::Array::~Array () | |
iterator | sce::Json::Array::begin () const |
Get an iterator pointing to the start of the Array. More... | |
iterator | sce::Json::Array::end () const |
Get an iterator pointing to after the end of the Array. More... | |
iterator | sce::Json::Array::insert (const iterator &pos, const Value &val) |
Insert a Value at pos. More... | |
iterator | sce::Json::Array::erase (const iterator &pos) |
Erase the Value at pos. More... | |
Value & | sce::Json::Array::back () const |
Returns a reference to the last element in the Array. More... | |
void | sce::Json::Array::clear () |
Will empty the Array, removing all child valus. More... | |
void | sce::Json::Array::push_back (const Value &val) |
Adds val to the end of the Array. More... | |
void | sce::Json::Array::pop_back () |
Removes the last child value. More... | |
SceSize | sce::Json::Array::size () const |
Get the size of the array. More... | |
bool | sce::Json::Array::empty () const |
Is the array empty. More... | |
Array & | sce::Json::Array::operator= (const Array &arr) |
Assignment Operator. More... | |
sce::Json::String::String () | |
sce::Json::String::String (const char *s) | |
sce::Json::String::String (const String &str) | |
sce::Json::String::~String () | |
String & | sce::Json::String::append (const char *s) |
Append string s to the end. More... | |
String & | sce::Json::String::append (const char *s, SceSize pos) |
Append string s to position pos. More... | |
String & | sce::Json::String::append (const String &str) |
Append string str. More... | |
String | sce::Json::String::substr (SceSize pos=0, SceSize len=npos) const |
Returns a newly constructed string object with its value initialized to a copy of a substring of this object. More... | |
char | sce::Json::String::at (SceSize pos) const |
Returns the character found at pos. More... | |
SceSize | sce::Json::String::find (const char *s, SceSize pos) const |
Searches the string for the first instance of a sequence. More... | |
SceSize | sce::Json::String::find (const char *s, SceSize pos, SceSize n) const |
Searches the string for the first instance of a sequence. More... | |
SceSize | sce::Json::String::find (const String &str, SceSize pos) const |
Searches the string for the first instance of a sequence. More... | |
SceSize | sce::Json::String::find (char c, SceSize pos) const |
Searches the string for the first instance of a sequence. More... | |
SceSize | sce::Json::String::rfind (const char *s, SceSize pos) const |
Searches the string for the last instance of a sequence. More... | |
SceSize | sce::Json::String::rfind (const char *s, SceSize pos, SceSize n) const |
Searches the string for the last instance of a sequence. More... | |
SceSize | sce::Json::String::rfind (const String &str, SceSize pos) const |
Searches the string for the last instance of a sequence. More... | |
SceSize | sce::Json::String::rfind (char c, SceSize pos) const |
Searches the string for the last instance of a sequence. More... | |
void | sce::Json::String::clear () |
Clears the string's contents. More... | |
bool | sce::Json::String::empty () const |
Returns whether the string is empty or not. More... | |
SceSize | sce::Json::String::size () const |
Returns the length of the String in bytes. More... | |
SceSize | sce::Json::String::length () const |
Returns the length of the String in bytes. More... | |
const char * | sce::Json::String::c_str () const |
Returns a C style string buffer of the String. More... | |
void | sce::Json::String::resize (SceSize n) |
Resizes the string to a length of n characters. More... | |
bool | sce::Json::String::compare (const char *s) const |
Compares the string to s. More... | |
bool | sce::Json::String::compare (const String &str) const |
Compares the string to str. More... | |
String & | sce::Json::String::operator+= (const char *s) |
Appends s to the string. More... | |
String & | sce::Json::String::operator+= (unsigned char c) |
Appends c to the string. More... | |
bool | sce::Json::String::operator== (const char *s) const |
Compares the string to s. More... | |
bool | sce::Json::String::operator== (const String &str) const |
Compares the string to str. More... | |
String & | sce::Json::String::operator= (const String &str) |
Assignment Operator. More... | |
sce::Json::Value::Value () | |
sce::Json::Value::Value (ValueType type) | |
sce::Json::Value::Value (SceBool value) | |
sce::Json::Value::Value (SceInt64 value) | |
sce::Json::Value::Value (SceUInt64 value) | |
sce::Json::Value::Value (double value) | |
sce::Json::Value::Value (const String &value) | |
sce::Json::Value::Value (const Array &value) | |
sce::Json::Value::Value (const Object &value) | |
sce::Json::Value::Value (const Value &value) | |
sce::Json::Value::~Value () | |
void | sce::Json::Value::toString (String &s) const |
Sets s to be a string representation of the value. More... | |
void | sce::Json::Value::swap (Value &val) |
Swaps the value with another Value. More... | |
void | sce::Json::Value::clear () |
Clears the value by setting to null. More... | |
SceSize | sce::Json::Value::count () const |
Returns number of children. More... | |
ValueType | sce::Json::Value::getType () const |
Returns the ValueType of the value. More... | |
void | sce::Json::Value::set (ValueType type) |
Set the type. More... | |
void | sce::Json::Value::set (SceBool value) |
Set the value to a boolean. More... | |
void | sce::Json::Value::set (SceInt64 value) |
Set the value to a long integer(64 bits) More... | |
void | sce::Json::Value::set (SceUInt64 value) |
Set the value to an unsigned long integer(64 bits) More... | |
void | sce::Json::Value::set (double value) |
Set the value to a double precision float. More... | |
void | sce::Json::Value::set (const String &value) |
Set the value to a String. More... | |
void | sce::Json::Value::set (const Array &value) |
Set the value to an Array. More... | |
void | sce::Json::Value::set (const Object &value) |
Set the value to an Object. More... | |
void | sce::Json::Value::set (const Value &value) |
Set the value. More... | |
int | sce::Json::Value::setNullAccessCallback (NullAccessCallback cb, void *userData) |
Set the Value's NullAccessCallback. More... | |
Value & | sce::Json::Value::getRoot () const |
Returns a reference to the root Value. More... | |
const SceBool & | sce::Json::Value::getBoolean () const |
Returns a constant reference to the value. More... | |
const SceInt64 & | sce::Json::Value::getInteger () const |
Returns a constant reference to the value. More... | |
const SceUInt64 & | sce::Json::Value::getUInteger () const |
Returns a constant reference to the value. More... | |
const SceDouble & | sce::Json::Value::getReal () const |
Returns a constant reference to the value. More... | |
const String & | sce::Json::Value::getString () const |
Returns a constant reference to the string. More... | |
const Array & | sce::Json::Value::getArray () const |
Returns a constant reference to the array. More... | |
const Object & | sce::Json::Value::getObject () const |
Returns a constant reference to the object. More... | |
const Value & | sce::Json::Value::getValue (SceSize pos) const |
Returns a constant reference to the value. More... | |
const Value & | sce::Json::Value::getValue (const String &key) const |
Returns a constant reference to the value. More... | |
SceBool * | sce::Json::Value::referBoolean () |
Returns a pointer to the value. More... | |
SceInt64 * | sce::Json::Value::referInteger () |
Returns a pointer to the value. More... | |
SceUInt64 * | sce::Json::Value::referUInteger () |
Returns a pointer to the value. More... | |
SceDouble * | sce::Json::Value::referReal () |
Returns a pointer to the value. More... | |
String * | sce::Json::Value::referString () |
Returns a pointer to the string. More... | |
Array * | sce::Json::Value::referArray () |
Returns a pointer to the array. More... | |
Object * | sce::Json::Value::referObject () |
Returns a pointer to the object. More... | |
Value * | sce::Json::Value::referValue (SceSize pos) |
Returns a pointer to the value. More... | |
Value * | sce::Json::Value::referValue (const String &key) |
Returns a pointer to the value. More... | |
int | sce::Json::Value::serialize (String &s) |
Serializes the data into a string in JSON format. More... | |
int | sce::Json::Value::serialize (String &str, SerializeCallback cb, void *userData) |
Serializes the values into a string in JSON format. More... | |
const Value & | sce::Json::Value::operator[] (const String &key) const |
Returns constant reference of the Value of key. More... | |
const Value & | sce::Json::Value::operator[] (const char *key) const |
Returns constant reference of the Value of key. More... | |
const Value & | sce::Json::Value::operator[] (SceSize pos) const |
Returns constant reference of the Value at pos. More... | |
Value & | sce::Json::Value::operator= (const Value &value) |
Assignment Operator. More... | |
sce::Json::Value::operator bool () const | |
sce::Json::Object::Pair::Pair () | |
sce::Json::Object::Pair::Pair (const String &name, const Value &value) | |
sce::Json::Object::Pair::~Pair () | |
sce::Json::Object::iterator::iterator () | |
sce::Json::Object::iterator::iterator (const iterator &iter) | |
sce::Json::Object::iterator::~iterator () | |
void | sce::Json::Object::iterator::advance (SceSize adv) |
Advance the iterator. More... | |
iterator & | sce::Json::Object::iterator::operator++ (int adv) |
Increment the iterator. More... | |
iterator & | sce::Json::Object::iterator::operator++ () |
Increment the iterator. More... | |
Pair & | sce::Json::Object::iterator::operator* () const |
Dereference the iterator. More... | |
bool | sce::Json::Object::iterator::operator== (iterator iter) const |
Compare to another iterator. More... | |
bool | sce::Json::Object::iterator::operator!= (iterator iter) const |
Compare to another iterator. More... | |
Pair * | sce::Json::Object::iterator::operator-> () const |
Access the Pair the iterator is pointing to. More... | |
iterator & | sce::Json::Object::iterator::operator= (const iterator &iter) |
Assignment Operator. More... | |
sce::Json::Object::Object () | |
sce::Json::Object::Object (const Object &obj) | |
sce::Json::Object::~Object () | |
iterator | sce::Json::Object::begin () const |
Returns an iterator to the first child element. More... | |
iterator | sce::Json::Object::end () const |
Returns an iterator to after the last child element. More... | |
iterator | sce::Json::Object::insert (const Pair &p) |
Inserts a pair into the Object. More... | |
iterator | sce::Json::Object::find (const String &key) |
Finds a Pair with a matching key. More... | |
void | sce::Json::Object::clear () |
Empty the object. More... | |
void | sce::Json::Object::erase (const String &str) |
Remove the Pair with the key str. More... | |
SceSize | sce::Json::Object::size () const |
Gets the number of child Pairs. More... | |
bool | sce::Json::Object::empty () const |
Is the object empty? More... | |
Value & | sce::Json::Object::operator[] (const String &str) |
Searches for a pair with a key matching str. More... | |
Object & | sce::Json::Object::operator= (const Object &obj) |
Assignment Operator. More... | |
static int | sce::Json::Parser::parse (Value &val, ParseCallback cb, void *userData) |
Parses user defined data using characters from a user defined callback function. More... | |
static int | sce::Json::Parser::parse (Value &val, const char *buf, SceSize size) |
Parses a string buffer. More... | |
static int | sce::Json::Parser::parse (Value &val, const char *path) |
Parse a JSON file. More... | |
Typedefs | |
typedef int(* | sce::Json::Value::SerializeCallback) (String &str, void *userData) |
Callback for serialization. More... | |
typedef Value const &(* | sce::Json::Value::NullAccessCallback) (ValueType type, const Value *parent, void *userData) |
Callback for NullValue access. More... | |
typedef int(* | sce::Json::Parser::ParseCallback) (char &ch, void *userData) |
Callback for outputing a character to parse. More... | |
class sce::Json::MemAllocator |
Base class for reimplementation of memory allocation.
This class must be derived from.
Public Member Functions | |
MemAllocator () | |
virtual | ~MemAllocator () |
virtual void * | allocateMemory (SceSize size, void *userData)=0 |
Virtual Function for memory allocation. More... | |
virtual void | freeMemory (void *ptr, void *userData)=0 |
Virtual Function for memory deallocation. More... | |
virtual void | notifyError (int errorCode, SceSize size, void *userData) |
The base class definition prints an error to sceClibPrintf. More... | |
class sce::Json::InitParameter |
Utility Data Structure to pass on initialisation parameters.
Data Fields | ||
---|---|---|
MemAllocator * | allocator |
Pointer to a MemAllocator object for internal memory allocations. Required field. |
void * | userData | User defined data sent to overriden MemAllocator functions. |
SceSize | bufSize |
Size of the buffer used for reading JSON file data in Parser::parse(Value&, const char*). Does not have to be the size of the file, but a smaller buffer size will result in more IO calls. |
class sce::Json::Initializer |
Utility class for initialising and terminating the library.
Public Member Functions | |
Initializer () | |
~Initializer () | |
int | initialize (const InitParameter *initParams) |
Initialise the library. More... | |
int | terminate () |
Terminate the library. More... | |
class sce::Json::Array |
Class for JSON arrays.
Public Member Functions | |
Array () | |
Array (const Array &arr) | |
~Array () | |
iterator | begin () const |
Get an iterator pointing to the start of the Array. More... | |
iterator | end () const |
Get an iterator pointing to after the end of the Array. More... | |
iterator | insert (const iterator &pos, const Value &val) |
Insert a Value at pos. More... | |
iterator | erase (const iterator &pos) |
Erase the Value at pos. More... | |
Value & | back () const |
Returns a reference to the last element in the Array. More... | |
void | clear () |
Will empty the Array, removing all child valus. More... | |
void | push_back (const Value &val) |
Adds val to the end of the Array. More... | |
void | pop_back () |
Removes the last child value. More... | |
SceSize | size () const |
Get the size of the array. More... | |
bool | empty () const |
Is the array empty. More... | |
Array & | operator= (const Array &arr) |
Assignment Operator. More... | |
Private Attributes | |
void * | implData |
Pointer to internal implementation data. More... | |
class sce::Json::Array::iterator |
Class for iterating over Array members.
Public Member Functions | |
iterator () | |
iterator (const iterator &iter) | |
~iterator () | |
void | advance (SceSize adv) |
Advance the iterator by adv. More... | |
iterator & | operator= (const iterator &iter) |
Assignment operator. More... | |
void | operator++ (int adv) |
Advance the iterator by adv. More... | |
void | operator++ () |
Increment the iterator. More... | |
Value & | operator* () const |
Dereference the iterator. More... | |
bool | operator!= (iterator iter) const |
Compare to another iterator. More... | |
Value * | operator-> () const |
Access the Value being pointed to. More... | |
Private Attributes | |
void * | implData |
Pointer to internal implementation data. More... | |
class sce::Json::String |
Class for JSON strings.
Public Member Functions | |
String () | |
String (const char *s) | |
String (const String &str) | |
~String () | |
String & | append (const char *s) |
Append string s to the end. More... | |
String & | append (const char *s, SceSize pos) |
Append string s to position pos. More... | |
String & | append (const String &str) |
Append string str. More... | |
String | substr (SceSize pos=0, SceSize len=npos) const |
Returns a newly constructed string object with its value initialized to a copy of a substring of this object. More... | |
char | at (SceSize pos) const |
Returns the character found at pos. More... | |
SceSize | find (const char *s, SceSize pos) const |
Searches the string for the first instance of a sequence. More... | |
SceSize | find (const char *s, SceSize pos, SceSize n) const |
Searches the string for the first instance of a sequence. More... | |
SceSize | find (const String &str, SceSize pos) const |
Searches the string for the first instance of a sequence. More... | |
SceSize | find (char c, SceSize pos) const |
Searches the string for the first instance of a sequence. More... | |
SceSize | rfind (const char *s, SceSize pos) const |
Searches the string for the last instance of a sequence. More... | |
SceSize | rfind (const char *s, SceSize pos, SceSize n) const |
Searches the string for the last instance of a sequence. More... | |
SceSize | rfind (const String &str, SceSize pos) const |
Searches the string for the last instance of a sequence. More... | |
SceSize | rfind (char c, SceSize pos) const |
Searches the string for the last instance of a sequence. More... | |
void | clear () |
Clears the string's contents. More... | |
bool | empty () const |
Returns whether the string is empty or not. More... | |
SceSize | size () const |
Returns the length of the String in bytes. More... | |
SceSize | length () const |
Returns the length of the String in bytes. More... | |
const char * | c_str () const |
Returns a C style string buffer of the String. More... | |
void | resize (SceSize n) |
Resizes the string to a length of n characters. More... | |
bool | compare (const char *s) const |
Compares the string to s. More... | |
bool | compare (const String &str) const |
Compares the string to str. More... | |
String & | operator+= (const char *s) |
Appends s to the string. More... | |
String & | operator+= (unsigned char c) |
Appends c to the string. More... | |
bool | operator== (const char *s) const |
Compares the string to s. More... | |
bool | operator== (const String &str) const |
Compares the string to str. More... | |
String & | operator= (const String &str) |
Assignment Operator. More... | |
Static Public Attributes | |
static const SceSize | npos = -1 |
Private Attributes | |
void * | implData |
Pointer to internal implementation data. More... | |
class sce::Json::Value |
Class for value of JSON property.
Public Types | |
typedef int(* | SerializeCallback) (String &str, void *userData) |
Callback for serialization. More... | |
typedef Value const &(* | NullAccessCallback) (ValueType type, const Value *parent, void *userData) |
Callback for NullValue access. More... | |
Public Member Functions | |
Value () | |
Value (ValueType type) | |
Value (SceBool value) | |
Value (SceInt64 value) | |
Value (SceUInt64 value) | |
Value (double value) | |
Value (const String &value) | |
Value (const Array &value) | |
Value (const Object &value) | |
Value (const Value &value) | |
~Value () | |
void | toString (String &s) const |
Sets s to be a string representation of the value. More... | |
void | swap (Value &val) |
Swaps the value with another Value. More... | |
void | clear () |
Clears the value by setting to null. More... | |
SceSize | count () const |
Returns number of children. More... | |
ValueType | getType () const |
Returns the ValueType of the value. More... | |
void | set (ValueType type) |
Set the type. More... | |
void | set (SceBool value) |
Set the value to a boolean. More... | |
void | set (SceInt64 value) |
Set the value to a long integer(64 bits) More... | |
void | set (SceUInt64 value) |
Set the value to an unsigned long integer(64 bits) More... | |
void | set (double value) |
Set the value to a double precision float. More... | |
void | set (const String &value) |
Set the value to a String. More... | |
void | set (const Array &value) |
Set the value to an Array. More... | |
void | set (const Object &value) |
Set the value to an Object. More... | |
void | set (const Value &value) |
Set the value. More... | |
int | setNullAccessCallback (NullAccessCallback cb, void *userData) |
Set the Value's NullAccessCallback. More... | |
Value & | getRoot () const |
Returns a reference to the root Value. More... | |
const SceBool & | getBoolean () const |
Returns a constant reference to the value. More... | |
const SceInt64 & | getInteger () const |
Returns a constant reference to the value. More... | |
const SceUInt64 & | getUInteger () const |
Returns a constant reference to the value. More... | |
const SceDouble & | getReal () const |
Returns a constant reference to the value. More... | |
const String & | getString () const |
Returns a constant reference to the string. More... | |
const Array & | getArray () const |
Returns a constant reference to the array. More... | |
const Object & | getObject () const |
Returns a constant reference to the object. More... | |
const Value & | getValue (SceSize pos) const |
Returns a constant reference to the value. More... | |
const Value & | getValue (const String &key) const |
Returns a constant reference to the value. More... | |
SceBool * | referBoolean () |
Returns a pointer to the value. More... | |
SceInt64 * | referInteger () |
Returns a pointer to the value. More... | |
SceUInt64 * | referUInteger () |
Returns a pointer to the value. More... | |
SceDouble * | referReal () |
Returns a pointer to the value. More... | |
String * | referString () |
Returns a pointer to the string. More... | |
Array * | referArray () |
Returns a pointer to the array. More... | |
Object * | referObject () |
Returns a pointer to the object. More... | |
Value * | referValue (SceSize pos) |
Returns a pointer to the value. More... | |
Value * | referValue (const String &key) |
Returns a pointer to the value. More... | |
int | serialize (String &s) |
Serializes the data into a string in JSON format. More... | |
int | serialize (String &str, SerializeCallback cb, void *userData) |
Serializes the values into a string in JSON format. More... | |
const Value & | operator[] (const String &key) const |
Returns constant reference of the Value of key. More... | |
const Value & | operator[] (const char *key) const |
Returns constant reference of the Value of key. More... | |
const Value & | operator[] (SceSize pos) const |
Returns constant reference of the Value at pos. More... | |
Value & | operator= (const Value &value) |
Assignment Operator. More... | |
operator bool () const | |
Private Attributes | |
Value * | parent |
Pointer to the value's parent. More... | |
NullAccessCallback | cb |
The value's NullAccessCallback. More... | |
union { | |
SceBool | boolean |
SceInt64 | integer |
SceUInt64 | uinteger |
SceDouble | real |
String * | string |
Array * | array |
Object * | object |
} | value |
Union of different value types. More... | |
char | unused [4] |
Unused. More... | |
ValueType | type |
The type of the value. More... | |
class sce::Json::Object |
Class for JSON objects.
Public Member Functions | |
Object () | |
Object (const Object &obj) | |
~Object () | |
iterator | begin () const |
Returns an iterator to the first child element. More... | |
iterator | end () const |
Returns an iterator to after the last child element. More... | |
iterator | insert (const Pair &p) |
Inserts a pair into the Object. More... | |
iterator | find (const String &key) |
Finds a Pair with a matching key. More... | |
void | clear () |
Empty the object. More... | |
void | erase (const String &str) |
Remove the Pair with the key str. More... | |
SceSize | size () const |
Gets the number of child Pairs. More... | |
bool | empty () const |
Is the object empty? More... | |
Value & | operator[] (const String &str) |
Searches for a pair with a key matching str. More... | |
Object & | operator= (const Object &obj) |
Assignment Operator. More... | |
Private Attributes | |
void * | implData |
Pointer to internal implementation data. More... | |
class sce::Json::Object::Pair |
class sce::Json::Object::iterator |
Class for iterating over Object members.
Public Member Functions | |
iterator () | |
iterator (const iterator &iter) | |
~iterator () | |
void | advance (SceSize adv) |
Advance the iterator. More... | |
iterator & | operator++ (int adv) |
Increment the iterator. More... | |
iterator & | operator++ () |
Increment the iterator. More... | |
Pair & | operator* () const |
Dereference the iterator. More... | |
bool | operator== (iterator iter) const |
Compare to another iterator. More... | |
bool | operator!= (iterator iter) const |
Compare to another iterator. More... | |
Pair * | operator-> () const |
Access the Pair the iterator is pointing to. More... | |
iterator & | operator= (const iterator &iter) |
Assignment Operator. More... | |
Private Attributes | |
void * | implData |
Pointer to internal implementation data. More... | |
class sce::Json::Parser |
Static Class for parsing.
Public Types | |
typedef int(* | ParseCallback) (char &ch, void *userData) |
Callback for outputing a character to parse. More... | |
Static Public Member Functions | |
static int | parse (Value &val, ParseCallback cb, void *userData) |
Parses user defined data using characters from a user defined callback function. More... | |
static int | parse (Value &val, const char *buf, SceSize size) |
Parses a string buffer. More... | |
static int | parse (Value &val, const char *path) |
Parse a JSON file. More... | |
typedef int(* sce::Json::Value::SerializeCallback) (String &str, void *userData) |
Callback for serialization.
It is called at certain points in the serialization process.
[in,out] | str | - The current state of the parser output. |
[in] | userData | - User defined data for the function. |
typedef Value const&(* sce::Json::Value::NullAccessCallback) (ValueType type, const Value *parent, void *userData) |
Callback for NullValue access.
It is called when the type of the Value is ValueType::NullValue and the Value is accessed.
[in] | type | - The type of value requested. |
[in] | parent | - A pointer to the parent of the Value accessed. |
[in] | userData | - User defined data for the function. |
typedef int(* sce::Json::Parser::ParseCallback) (char &ch, void *userData) |
Callback for outputing a character to parse.
[out] | ch | - The character to be sent back to the parser. |
[in] | userData | - User defined data for the function. |
enum SceJsonErrorCode |
Enumerator of different errors in this library.
|
strong |
Strongly typed Enumerator of different types of Values.
sce::Json::MemAllocator::MemAllocator | ( | ) |
|
virtual |
|
pure virtual |
Virtual Function for memory allocation.
[in] | size | - Size of the allocated memory |
[in] | data | - User defined data for the function. |
|
pure virtual |
Virtual Function for memory deallocation.
[in] | ptr | - Pointer to memory. |
[in] | data | - User defined data for the function. |
|
virtual |
The base class definition prints an error to sceClibPrintf.
sce::Json::Initializer::Initializer | ( | ) |
sce::Json::Initializer::~Initializer | ( | ) |
int sce::Json::Initializer::initialize | ( | const InitParameter * | initParams | ) |
Initialise the library.
[in] | initParams | - Initialisation parameters for the library. |
int sce::Json::Initializer::terminate | ( | ) |
Terminate the library.
sce::Json::Array::iterator::iterator | ( | ) |
sce::Json::Array::iterator::iterator | ( | const iterator & | iter | ) |
sce::Json::Array::iterator::~iterator | ( | ) |
void sce::Json::Array::iterator::advance | ( | SceSize | adv | ) |
Advance the iterator by adv.
void sce::Json::Array::iterator::operator++ | ( | int | adv | ) |
Advance the iterator by adv.
void sce::Json::Array::iterator::operator++ | ( | ) |
Increment the iterator.
Value& sce::Json::Array::iterator::operator* | ( | ) | const |
Dereference the iterator.
bool sce::Json::Array::iterator::operator!= | ( | iterator | iter | ) | const |
Compare to another iterator.
[in] | iter | - The iterator to compare to. |
sce::Json::Array::Array | ( | ) |
sce::Json::Array::Array | ( | const Array & | arr | ) |
sce::Json::Array::~Array | ( | ) |
iterator sce::Json::Array::begin | ( | ) | const |
Get an iterator pointing to the start of the Array.
iterator sce::Json::Array::end | ( | ) | const |
Get an iterator pointing to after the end of the Array.
Value& sce::Json::Array::back | ( | ) | const |
Returns a reference to the last element in the Array.
void sce::Json::Array::clear | ( | ) |
Will empty the Array, removing all child valus.
void sce::Json::Array::pop_back | ( | ) |
Removes the last child value.
SceSize sce::Json::Array::size | ( | ) | const |
Get the size of the array.
bool sce::Json::Array::empty | ( | ) | const |
Is the array empty.
sce::Json::String::String | ( | ) |
sce::Json::String::String | ( | const char * | s | ) |
sce::Json::String::String | ( | const String & | str | ) |
sce::Json::String::~String | ( | ) |
String& sce::Json::String::append | ( | const char * | s | ) |
Append string s to the end.
[in] | s | - Pointer to the C string to append. |
Append string s to position pos.
[in] | s | - Pointer to the C string to append. |
[in] | pos | - Position in the String to append to. |
Returns a newly constructed string object with its value initialized to a copy of a substring of this object.
[in] | pos | - The starting position of the sub-string. |
[in] | len | - The length of the sub-string. |
char sce::Json::String::at | ( | SceSize | pos | ) | const |
Returns the character found at pos.
[in] | pos | - The position of the desired character. |
Searches the string for the first instance of a sequence.
[in] | s | - The sequence to search for. |
[in] | pos | - Position to start searching from. |
Searches the string for the first instance of a sequence.
[in] | s | - The sequence to search for. |
[in] | pos | - Position to start searching from. |
[in] | n | - Length of the sequence. |
Searches the string for the first instance of a sequence.
[in] | str | - The sequence to search for. |
[in] | pos | - Position to start searching from. |
Searches the string for the first instance of a sequence.
[in] | c | - The sequence to search for. |
[in] | pos | - Position to start searching from. |
Searches the string for the last instance of a sequence.
[in] | s | - The sequence to search for. |
[in] | pos | - Position to start searching from. |
Searches the string for the last instance of a sequence.
[in] | s | - The sequence to search for. |
[in] | pos | - Position to start searching from. |
[in] | n | - Length of the sequence. |
Searches the string for the last instance of a sequence.
[in] | str | - The sequence to search for. |
[in] | pos | - Position to start searching from. |
Searches the string for the last instance of a sequence.
[in] | c | - The sequence to search for. |
[in] | pos | - Position to start searching from. |
void sce::Json::String::clear | ( | ) |
Clears the string's contents.
bool sce::Json::String::empty | ( | ) | const |
Returns whether the string is empty or not.
SceSize sce::Json::String::size | ( | ) | const |
Returns the length of the String in bytes.
SceSize sce::Json::String::length | ( | ) | const |
Returns the length of the String in bytes.
const char* sce::Json::String::c_str | ( | ) | const |
Returns a C style string buffer of the String.
void sce::Json::String::resize | ( | SceSize | n | ) |
Resizes the string to a length of n characters.
bool sce::Json::String::compare | ( | const char * | s | ) | const |
Compares the string to s.
bool sce::Json::String::compare | ( | const String & | str | ) | const |
Compares the string to str.
String& sce::Json::String::operator+= | ( | const char * | s | ) |
Appends s to the string.
String& sce::Json::String::operator+= | ( | unsigned char | c | ) |
Appends c to the string.
bool sce::Json::String::operator== | ( | const char * | s | ) | const |
Compares the string to s.
bool sce::Json::String::operator== | ( | const String & | str | ) | const |
Compares the string to str.
sce::Json::Value::Value | ( | ) |
sce::Json::Value::Value | ( | ValueType | type | ) |
sce::Json::Value::Value | ( | SceBool | value | ) |
sce::Json::Value::Value | ( | SceInt64 | value | ) |
sce::Json::Value::Value | ( | SceUInt64 | value | ) |
sce::Json::Value::Value | ( | double | value | ) |
sce::Json::Value::Value | ( | const String & | value | ) |
sce::Json::Value::Value | ( | const Array & | value | ) |
sce::Json::Value::Value | ( | const Object & | value | ) |
sce::Json::Value::Value | ( | const Value & | value | ) |
sce::Json::Value::~Value | ( | ) |
void sce::Json::Value::toString | ( | String & | s | ) | const |
Sets s to be a string representation of the value.
[out] | s | - The resultant string |
void sce::Json::Value::swap | ( | Value & | val | ) |
void sce::Json::Value::clear | ( | ) |
Clears the value by setting to null.
SceSize sce::Json::Value::count | ( | ) | const |
Returns number of children.
ValueType sce::Json::Value::getType | ( | ) | const |
Returns the ValueType of the value.
void sce::Json::Value::set | ( | ValueType | type | ) |
Set the type.
[in] | type | - The type to set the value to. |
void sce::Json::Value::set | ( | SceBool | value | ) |
Set the value to a boolean.
[in] | value | - New value |
void sce::Json::Value::set | ( | SceInt64 | value | ) |
Set the value to a long integer(64 bits)
[in] | value | - New value |
void sce::Json::Value::set | ( | SceUInt64 | value | ) |
Set the value to an unsigned long integer(64 bits)
[in] | value | - new value |
void sce::Json::Value::set | ( | double | value | ) |
Set the value to a double precision float.
[in] | value | - New value |
void sce::Json::Value::set | ( | const String & | value | ) |
void sce::Json::Value::set | ( | const Array & | value | ) |
void sce::Json::Value::set | ( | const Object & | value | ) |
void sce::Json::Value::set | ( | const Value & | value | ) |
Set the value.
[in] | value | - Value to copy from. |
int sce::Json::Value::setNullAccessCallback | ( | NullAccessCallback | cb, |
void * | userData | ||
) |
Set the Value's NullAccessCallback.
[in] | cb | - The callback. |
[in] | data | - Data to pass to the callback function. |
Value& sce::Json::Value::getRoot | ( | ) | const |
Returns a reference to the root Value.
const SceBool& sce::Json::Value::getBoolean | ( | ) | const |
Returns a constant reference to the value.
const SceInt64& sce::Json::Value::getInteger | ( | ) | const |
Returns a constant reference to the value.
const SceUInt64& sce::Json::Value::getUInteger | ( | ) | const |
Returns a constant reference to the value.
const SceDouble& sce::Json::Value::getReal | ( | ) | const |
Returns a constant reference to the value.
const String& sce::Json::Value::getString | ( | ) | const |
Returns a constant reference to the string.
Only constant functions can be used, and the string cannot be altered.
referString() is the alternative function for altering the string.
const Array& sce::Json::Value::getArray | ( | ) | const |
Returns a constant reference to the array.
Only constant functions can be used, and the array and its members cannot be altered.
referArray() is the alternative function for altering the array.
const Object& sce::Json::Value::getObject | ( | ) | const |
Returns a constant reference to the object.
Only constant functions can be used, and the object and its members cannot be altered.
referObject() is the alternative function for altering the array.
Returns a constant reference to the value.
Only constant functions can be used, and the value cannot be altered.
referValue(SceSize) is the alternative function for altering the value.
[in] | pos | - The position of the value. |
Returns a constant reference to the value.
Only constant functions can be used, and the value cannot be altered.
referValue(const String&) is the alternative function for altering the value.
[in] | key | - The key of the value. |
SceBool* sce::Json::Value::referBoolean | ( | ) |
Returns a pointer to the value.
SceInt64* sce::Json::Value::referInteger | ( | ) |
Returns a pointer to the value.
SceUInt64* sce::Json::Value::referUInteger | ( | ) |
Returns a pointer to the value.
SceDouble* sce::Json::Value::referReal | ( | ) |
Returns a pointer to the value.
String* sce::Json::Value::referString | ( | ) |
Returns a pointer to the string.
getString() is the alternative function for only reading the string.
Array* sce::Json::Value::referArray | ( | ) |
Returns a pointer to the array.
getArray() is the alternative function for only reading the array.
Object* sce::Json::Value::referObject | ( | ) |
Returns a pointer to the object.
getObject() is the alternative function for only reading the object.
Returns a pointer to the value.
getValue(SceSize) is the alternative function for only reading the Value.
[in] | pos | - The position of the value. |
Returns a pointer to the value.
getValue(String&) is the alternative function for only reading the Value.
[in] | key | - The key of the value. |
int sce::Json::Value::serialize | ( | String & | s | ) |
Serializes the data into a string in JSON format.
[out] | s | - The resulting string, can be written to a file or parsed. |
int sce::Json::Value::serialize | ( | String & | str, |
SerializeCallback | cb, | ||
void * | userData | ||
) |
Serializes the values into a string in JSON format.
Allows for a callback for the different stages in the serialization.
[in,out] | s | - The resulting string, can be written to a file or parsed again. |
[in] | cb | - Callback for the internal serialization. Can be used to format the output string, as the string is not formatted internally. |
[in] | userData | - User defined data passed to the SerializeCallback |
const Value& sce::Json::Value::operator[] | ( | const char * | key | ) | const |
sce::Json::Value::operator bool | ( | ) | const |
sce::Json::Object::Pair::Pair | ( | ) |
sce::Json::Object::Pair::~Pair | ( | ) |
sce::Json::Object::iterator::iterator | ( | ) |
sce::Json::Object::iterator::iterator | ( | const iterator & | iter | ) |
sce::Json::Object::iterator::~iterator | ( | ) |
void sce::Json::Object::iterator::advance | ( | SceSize | adv | ) |
Advance the iterator.
[in] | adv | - Number by which to advance. |
iterator& sce::Json::Object::iterator::operator++ | ( | int | adv | ) |
Increment the iterator.
[in] | adv | - The amount to increment it by. |
iterator& sce::Json::Object::iterator::operator++ | ( | ) |
Increment the iterator.
Pair& sce::Json::Object::iterator::operator* | ( | ) | const |
Dereference the iterator.
bool sce::Json::Object::iterator::operator== | ( | iterator | iter | ) | const |
Compare to another iterator.
bool sce::Json::Object::iterator::operator!= | ( | iterator | iter | ) | const |
Compare to another iterator.
Pair* sce::Json::Object::iterator::operator-> | ( | ) | const |
Access the Pair the iterator is pointing to.
sce::Json::Object::Object | ( | ) |
sce::Json::Object::Object | ( | const Object & | obj | ) |
sce::Json::Object::~Object | ( | ) |
iterator sce::Json::Object::begin | ( | ) | const |
Returns an iterator to the first child element.
iterator sce::Json::Object::end | ( | ) | const |
Returns an iterator to after the last child element.
void sce::Json::Object::clear | ( | ) |
Empty the object.
void sce::Json::Object::erase | ( | const String & | str | ) |
SceSize sce::Json::Object::size | ( | ) | const |
Gets the number of child Pairs.
bool sce::Json::Object::empty | ( | ) | const |
Is the object empty?
Searches for a pair with a key matching str.
|
static |
Parses user defined data using characters from a user defined callback function.
[out] | val | - Reference to the value the data is written to. |
[in] | cb | - The callback function which gives the current character. |
[in] | data | - Data to pass to the callback function |