PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
JsonApiStruct Class Reference

Private Member Functions

void JsonApiStruct ()
 
void ~JsonApiStruct ()
 
void OnExpand ()
 Event when expand (unpack) process starts.
 
void OnPack ()
 Event when pack starts - you will pack your stuff here.
 
void OnBufferReady ()
 Verification event after successfull JSON packing.
 
void OnSuccess (int errorCode)
 Event called when pending store operation is finished - callback from JsonApiHandle before handle release.
 
void OnError (int errorCode)
 Event called when pending store operation is finished - callback from JsonApiHandle before handle release.
 
void OnObject (string name)
 Called when parsing object.
 
void OnInteger (string name, int value)
 Called when parsing integer value.
 
void OnFloat (string name, float value)
 Called when parsing float value.
 
void OnBoolean (string name, bool value)
 Called when parsing boolean value.
 
void OnString (string name, string value)
 Called when parsing string value.
 
void OnVector (string name, vector value)
 Called when parsing vector value.
 
void OnStartArray (string name)
 Called when parsing array.
 
void OnEndArray (int itemCount)
 Called when array end, returns count of items.
 
void OnItemObject (int index, string name)
 Called when parsing object.
 
void OnItemInteger (int index, int value)
 Called when parsing integer value.
 
void OnItemFloat (int index, float value)
 Called when parsing float value.
 
void OnItemBoolean (int index, bool value)
 Called when parsing boolean value.
 
void OnItemString (int index, string value)
 Called when parsing string value from array.
 
void OnItemVector (int index, vector value)
 Called when parsing vector value from array.
 
proto native void RegV (string name)
 Register script variable for auto-feature.
 
proto native void Push (JsonApiStruct obj)
 Push object to parse (only during parse operation)
 
proto native void StartObject (string name)
 Start object at hierarchy - !!! Be cautious and doublecheck results when using this !!!
 
proto native void EndObject ()
 End object at hierarchy - !!! Be cautious and doublecheck results when using this !!!
 
proto native void StoreObject (string name, JsonApiStruct obj)
 Add scripted object to hierarchy (calls through hierarchy)
 
proto native void StoreFloat (string name, float value)
 Add float value to hierarchy.
 
proto native void StoreInteger (string name, int value)
 Add integer value to hierarchy.
 
proto native void StoreBoolean (string name, bool value)
 Add boolean value to hierarchy.
 
proto native void StoreString (string name, string value)
 Add string value to hierarchy.
 
proto native void StoreVector (string name, vector value)
 Add vector value to hierarchy.
 
proto native void StartArray (string name)
 Start array at hierarchy - !!! Be cautious and doublecheck results when using this !!!
 
proto native void EndArray ()
 End array at hierarchy - !!! Be cautious and doublecheck results when using this !!!
 
proto native void ItemObject (JsonApiStruct obj)
 Add scripted unnamed/ array object.
 
proto native void ItemFloat (float value)
 Add unnamed/ array float value.
 
proto native void ItemInteger (int value)
 Add unnamed/ array integer value.
 
proto native void ItemBoolean (bool value)
 Add unnamed/ array boolean value.
 
proto native void ItemString (string value)
 Add unnamed/ array string value.
 
proto native void ItemVector (vector value)
 Add unnamed/ array vector value.
 
proto native void SetDone ()
 Call this when you've done packing or unpacking (interrupt operation)
 
proto native void SetFail ()
 Call this when you've done packing or unpacking + want to generate error - prevent to send invalid data etc.
 
proto native void Pack ()
 Start object packing - when it can be done (when sending remote etc.)
 
proto native void InstantPack ()
 Start object packing now - for use at main thread only!
 
proto native void ExpandFromRAW (string data)
 Start object unpacking from RAW string data.
 
proto native string AsString ()
 Get packed JSON as string (!only if you called Pack() first, it may return null)
 
proto native bool PackToFile (string FileName)
 Pack() and save JSON to file.
 
proto native bool SaveToFile (string FileName)
 Save JSON to file (only If something was loaded or recieved previously!)
 
proto native bool LoadFromFile (string FileName)
 Load JSON from file and Expand.
 

Constructor & Destructor Documentation

◆ JsonApiStruct()

void JsonApiStruct ( )
inlineprivate

◆ ~JsonApiStruct()

void ~JsonApiStruct ( )
inlineprivate

Member Function Documentation

◆ AsString()

proto native string AsString ( )
private

Get packed JSON as string (!only if you called Pack() first, it may return null)

◆ EndArray()

proto native void EndArray ( )
private

End array at hierarchy - !!! Be cautious and doublecheck results when using this !!!

◆ EndObject()

proto native void EndObject ( )
private

End object at hierarchy - !!! Be cautious and doublecheck results when using this !!!

◆ ExpandFromRAW()

proto native void ExpandFromRAW ( string  data)
private

Start object unpacking from RAW string data.

◆ InstantPack()

proto native void InstantPack ( )
private

Start object packing now - for use at main thread only!

◆ ItemBoolean()

proto native void ItemBoolean ( bool  value)
private

Add unnamed/ array boolean value.

◆ ItemFloat()

proto native void ItemFloat ( float  value)
private

Add unnamed/ array float value.

◆ ItemInteger()

proto native void ItemInteger ( int  value)
private

Add unnamed/ array integer value.

◆ ItemObject()

proto native void ItemObject ( JsonApiStruct  obj)
private

Add scripted unnamed/ array object.

◆ ItemString()

proto native void ItemString ( string  value)
private

Add unnamed/ array string value.

◆ ItemVector()

proto native void ItemVector ( vector  value)
private

Add unnamed/ array vector value.

◆ LoadFromFile()

proto native bool LoadFromFile ( string  FileName)
private

Load JSON from file and Expand.

◆ OnBoolean()

void OnBoolean ( string  name,
bool  value 
)
inlineprivate

Called when parsing boolean value.

References Print().

◆ OnBufferReady()

void OnBufferReady ( )
inlineprivate

Verification event after successfull JSON packing.

◆ OnEndArray()

void OnEndArray ( int  itemCount)
inlineprivate

Called when array end, returns count of items.

References Print().

◆ OnError()

void OnError ( int  errorCode)
inlineprivate

Event called when pending store operation is finished - callback from JsonApiHandle before handle release.

◆ OnExpand()

void OnExpand ( )
inlineprivate

Event when expand (unpack) process starts.

◆ OnFloat()

void OnFloat ( string  name,
float  value 
)
inlineprivate

Called when parsing float value.

References Print().

◆ OnInteger()

void OnInteger ( string  name,
int  value 
)
inlineprivate

Called when parsing integer value.

References Print().

◆ OnItemBoolean()

void OnItemBoolean ( int  index,
bool  value 
)
inlineprivate

Called when parsing boolean value.

References Print().

◆ OnItemFloat()

void OnItemFloat ( int  index,
float  value 
)
inlineprivate

Called when parsing float value.

References Print().

◆ OnItemInteger()

void OnItemInteger ( int  index,
int  value 
)
inlineprivate

Called when parsing integer value.

References Print().

◆ OnItemObject()

void OnItemObject ( int  index,
string  name 
)
inlineprivate

Called when parsing object.

References name, and Print().

◆ OnItemString()

void OnItemString ( int  index,
string  value 
)
inlineprivate

Called when parsing string value from array.

References Print().

◆ OnItemVector()

void OnItemVector ( int  index,
vector  value 
)
inlineprivate

Called when parsing vector value from array.

References Print().

◆ OnObject()

void OnObject ( string  name)
inlineprivate

Called when parsing object.

References name, and Print().

◆ OnPack()

void OnPack ( )
inlineprivate

Event when pack starts - you will pack your stuff here.

References Print().

◆ OnStartArray()

void OnStartArray ( string  name)
inlineprivate

Called when parsing array.

References name, and Print().

◆ OnString()

void OnString ( string  name,
string  value 
)
inlineprivate

Called when parsing string value.

References Print().

◆ OnSuccess()

void OnSuccess ( int  errorCode)
inlineprivate

Event called when pending store operation is finished - callback from JsonApiHandle before handle release.

◆ OnVector()

void OnVector ( string  name,
vector  value 
)
inlineprivate

Called when parsing vector value.

References Print().

◆ Pack()

proto native void Pack ( )
private

Start object packing - when it can be done (when sending remote etc.)

◆ PackToFile()

proto native bool PackToFile ( string  FileName)
private

Pack() and save JSON to file.

◆ Push()

proto native void Push ( JsonApiStruct  obj)
private

Push object to parse (only during parse operation)

◆ RegV()

proto native void RegV ( string  name)
private

Register script variable for auto-feature.

◆ SaveToFile()

proto native bool SaveToFile ( string  FileName)
private

Save JSON to file (only If something was loaded or recieved previously!)

◆ SetDone()

proto native void SetDone ( )
private

Call this when you've done packing or unpacking (interrupt operation)

◆ SetFail()

proto native void SetFail ( )
private

Call this when you've done packing or unpacking + want to generate error - prevent to send invalid data etc.

◆ StartArray()

proto native void StartArray ( string  name)
private

Start array at hierarchy - !!! Be cautious and doublecheck results when using this !!!

◆ StartObject()

proto native void StartObject ( string  name)
private

Start object at hierarchy - !!! Be cautious and doublecheck results when using this !!!

◆ StoreBoolean()

proto native void StoreBoolean ( string  name,
bool  value 
)
private

Add boolean value to hierarchy.

◆ StoreFloat()

proto native void StoreFloat ( string  name,
float  value 
)
private

Add float value to hierarchy.

◆ StoreInteger()

proto native void StoreInteger ( string  name,
int  value 
)
private

Add integer value to hierarchy.

◆ StoreObject()

proto native void StoreObject ( string  name,
JsonApiStruct  obj 
)
private

Add scripted object to hierarchy (calls through hierarchy)

◆ StoreString()

proto native void StoreString ( string  name,
string  value 
)
private

Add string value to hierarchy.

◆ StoreVector()

proto native void StoreVector ( string  name,
vector  value 
)
private

Add vector value to hierarchy.


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