DayZ 1.24
Loading...
Searching...
No Matches
JsonApiStruct Class Reference
Inheritance diagram for JsonApiStruct:
[legend]
Collaboration diagram for JsonApiStruct:
[legend]

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.
 
- Private Member Functions inherited from Managed
void IntroSceneCharacter ()
 
void ~IntroSceneCharacter ()
 
bool IsDefaultCharacter ()
 
void SetToDefaultCharacter ()
 
void SetCharacterID (int char_id)
 
int GetCharacterID ()
 
PlayerBase GetCharacterObj ()
 
TStringArray GetCharGenderList ()
 
TStringArray GetCharList (ECharGender gender)
 
TStringArray GetCharShirtsList ()
 
TStringArray GetCharPantsList ()
 
TStringArray GetCharShoesList ()
 
void SetCharacterGender (ECharGender gender)
 
bool IsCharacterFemale ()
 
ECharGender GetCharacterGender ()
 
vector GetPosition ()
 
int GetNextCharacterID ()
 
int GetPrevCharacterID ()
 
void CreateNewCharacterRandom ()
 
void CreateNewCharacterById (int character_id)
 
void CreateNewCharacterByName (string character_name, bool randomize_equip=true)
 
void CreateDefaultCharacter ()
 
void GetLastPlayedServer (int characterID, out string address, out string name, out int port)
 
void CreateNewCharacter ()
 
void LoadCharacterData (vector char_pos, vector char_rot, bool default_char=false)
 Generates random equip for the new IntroSceneCharacter, whatever is defined in 'cfgCharacterCreation'.
 
void CharacterUnload ()
 
void CharacterLoad (int character_id, vector char_pos, vector char_rot)
 
void SetupPlayerName (bool new_name)
 
void SetAttachment (string type, int slot)
 
string GetCharacterNameById (int char_id)
 
string GetCharacterName ()
 
void SaveCharName (string name)
 
void SaveDefaultCharacter ()
 
void TransferValues (PlayerBase player)
 
void Init ()
 
void OnScheduledTick (float deltatime)
 
void CheckValues ()
 
float GetBlood ()
 
float GetHealth ()
 
void CheckHealth ()
 
void CheckBlood ()
 
void SendInitValues ()
 Sends values on object creation.
 
void SendValue (int value_type, float value)
 
void ReceiveValue (int value_type, float value)
 
void OnRPC (ParamsReadContext ctx)
 
void ShowDebugValues (bool show)
 
void BleedingIndicator (int source_ID, int severity, GameplayEffectsDataBleeding parent)
 
void InitIndicator (vector position)
 
void StopIndicator (bool instant=false)
 
void StartRunningDrops ()
 
bool IsRunningDrops ()
 Are any drops currently being animated?
 
void TrySpawnNextDrop ()
 
void ResetSequence ()
 
void ResetIndicator ()
 
void Update (float timeSlice)
 
bool GetEndNow ()
 
int GetSeverity ()
 
void GameplayEffectsData (array< ref Widget > input, int type, int user_override=-1)
 
void Init (array< ref Widget > input, int type, Widget layout_root, int user_override=-1)
 
array< ref WidgetGetWidgetSet ()
 
int GetWidgetSetType ()
 
int GetWidgetSetID ()
 
bool HasDefinedHandle ()
 Returns 'true' if this class contains update info.
 
bool DataInitialized ()
 
void UpdateVisibility (bool state)
 
void RegisterData (Param p)
 
void Update (float timeSlice=0, Param p=null, int handle=-1)
 
void ForceStop ()
 

Additional Inherited Members

- Private Attributes inherited from Managed
int m_CharacterId
 
string m_CharacterType
 
MenuData m_CharacterDta
 
PlayerBase m_CharacterObj
 
vector m_CharacterPos
 
vector m_CharacterRot
 
ref TStringArray m_CharGenderList = new TStringArray
 
ref TStringArray m_CharShirtList = new TStringArray
 
ref TStringArray m_CharPantsList = new TStringArray
 
ref TStringArray m_CharShoesList = new TStringArray
 
ref map< ECharGender, ref array< string > > m_Characters = new map<ECharGender, ref array<string>>
 
ECharGender m_CharGender
 
bool m_InitialSyncSent
 
bool m_Initialized
 
bool m_Terminating = false
 
bool m_EndNow = false
 
bool m_IsRunning = false
 
int m_DropSpawnsQueued
 
int m_ActiveDropsCount
 
int m_Severity
 
int m_SourceID
 
GameplayEffectsDataBleeding m_ParentMetaData
 
array< floatm_DropProbabilityArray
 
float m_AverageFrequency
 
float m_SequenceTick
 
float m_SequenceDuration
 
float m_TimeElapsedTotal
 
float m_TimeElapsedSequence
 
float m_LastDropSpawnTime
 
float m_DropSpawnMinDelay
 
float m_DropSpawnMaxDelay
 
int m_CurrentDropProbabilityStep
 
int m_DropProbabilityRollsCount
 
vector m_BasePosition
 
ref set< ref BleedingIndicatorDropDatam_ActiveDrops
 
ref set< intm_CleanupQueue
 
ref array< ref Widgetm_WidgetArray
 
int m_Type
 
int m_WidgetSetIdentifier
 
Widget m_LayoutRoot
 

Detailed Description

Definition at line 8 of file JsonApiStruct.c.

Constructor & Destructor Documentation

◆ JsonApiStruct()

void JsonApiStruct::JsonApiStruct ( )
inlineprivate

Definition at line 11 of file JsonApiStruct.c.

12 {
13 }

◆ ~JsonApiStruct()

void JsonApiStruct::~JsonApiStruct ( )
inlineprivate

Definition at line 15 of file JsonApiStruct.c.

16 {
17 }

Member Function Documentation

◆ AsString()

proto native string JsonApiStruct::AsString ( )
private

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

◆ EndArray()

proto native void JsonApiStruct::EndArray ( )
private

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

◆ EndObject()

proto native void JsonApiStruct::EndObject ( )
private

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

◆ ExpandFromRAW()

proto native void JsonApiStruct::ExpandFromRAW ( string data)
private

Start object unpacking from RAW string data.

◆ InstantPack()

proto native void JsonApiStruct::InstantPack ( )
private

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

◆ ItemBoolean()

proto native void JsonApiStruct::ItemBoolean ( bool value)
private

Add unnamed/ array boolean value.

◆ ItemFloat()

proto native void JsonApiStruct::ItemFloat ( float value)
private

Add unnamed/ array float value.

◆ ItemInteger()

proto native void JsonApiStruct::ItemInteger ( int value)
private

Add unnamed/ array integer value.

◆ ItemObject()

proto native void JsonApiStruct::ItemObject ( JsonApiStruct obj)
private

Add scripted unnamed/ array object.

◆ ItemString()

proto native void JsonApiStruct::ItemString ( string value)
private

Add unnamed/ array string value.

◆ ItemVector()

proto native void JsonApiStruct::ItemVector ( vector value)
private

Add unnamed/ array vector value.

◆ LoadFromFile()

proto native bool JsonApiStruct::LoadFromFile ( string FileName)
private

Load JSON from file and Expand.

◆ OnBoolean()

void JsonApiStruct::OnBoolean ( string name,
bool value )
inlineprivate

Called when parsing boolean value.

Definition at line 84 of file JsonApiStruct.c.

85 {
86 Print("OnBoolean: " + value);
87 }
proto void Print(void var)
Prints content of variable to console/log.

References Print().

◆ OnBufferReady()

void JsonApiStruct::OnBufferReady ( )
inlineprivate

Verification event after successfull JSON packing.

Definition at line 37 of file JsonApiStruct.c.

38 {
39 }

◆ OnEndArray()

void JsonApiStruct::OnEndArray ( int itemCount)
inlineprivate

Called when array end, returns count of items.

Definition at line 116 of file JsonApiStruct.c.

117 {
118 Print("OnEndArray: " + itemCount);
119 }

References Print().

◆ OnError()

void JsonApiStruct::OnError ( int errorCode)
inlineprivate

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

Definition at line 52 of file JsonApiStruct.c.

53 {
54 // errorCode is EJsonApiError
55 }

◆ OnExpand()

void JsonApiStruct::OnExpand ( )
inlineprivate

Event when expand (unpack) process starts.

Definition at line 22 of file JsonApiStruct.c.

23 {
24 }

◆ OnFloat()

void JsonApiStruct::OnFloat ( string name,
float value )
inlineprivate

Called when parsing float value.

Definition at line 76 of file JsonApiStruct.c.

77 {
78 Print("OnFloat: " + value);
79 }

References Print().

◆ OnInteger()

void JsonApiStruct::OnInteger ( string name,
int value )
inlineprivate

Called when parsing integer value.

Definition at line 68 of file JsonApiStruct.c.

69 {
70 Print("OnInteger: " + value);
71 }

References Print().

◆ OnItemBoolean()

void JsonApiStruct::OnItemBoolean ( int index,
bool value )
inlineprivate

Called when parsing boolean value.

Definition at line 148 of file JsonApiStruct.c.

149 {
150 Print("OnItemBoolean: " + value);
151 }

References Print().

◆ OnItemFloat()

void JsonApiStruct::OnItemFloat ( int index,
float value )
inlineprivate

Called when parsing float value.

Definition at line 140 of file JsonApiStruct.c.

141 {
142 Print("OnItemFloat: " + value);
143 }

References Print().

◆ OnItemInteger()

void JsonApiStruct::OnItemInteger ( int index,
int value )
inlineprivate

Called when parsing integer value.

Definition at line 132 of file JsonApiStruct.c.

133 {
134 Print("OnItemInteger: " + value);
135 }

References Print().

◆ OnItemObject()

void JsonApiStruct::OnItemObject ( int index,
string name )
inlineprivate

Called when parsing object.

Definition at line 124 of file JsonApiStruct.c.

125 {
126 Print("OnItemObject: " + name);
127 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo

References name, and Print().

◆ OnItemString()

void JsonApiStruct::OnItemString ( int index,
string value )
inlineprivate

Called when parsing string value from array.

Definition at line 156 of file JsonApiStruct.c.

157 {
158 Print("OnItemString: " + value);
159 }

References Print().

◆ OnItemVector()

void JsonApiStruct::OnItemVector ( int index,
vector value )
inlineprivate

Called when parsing vector value from array.

Definition at line 164 of file JsonApiStruct.c.

165 {
166 Print("OnItemVector: " + value);
167 }

References Print().

◆ OnObject()

void JsonApiStruct::OnObject ( string name)
inlineprivate

Called when parsing object.

Definition at line 60 of file JsonApiStruct.c.

61 {
62 Print("OnObject: " + name);
63 }

References name, and Print().

◆ OnPack()

void JsonApiStruct::OnPack ( )
inlineprivate

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

Definition at line 29 of file JsonApiStruct.c.

30 {
31 Print("OnPack() ");
32 }

References Print().

◆ OnStartArray()

void JsonApiStruct::OnStartArray ( string name)
inlineprivate

Called when parsing array.

Definition at line 108 of file JsonApiStruct.c.

109 {
110 Print("OnStartArray: " + name);
111 }

References name, and Print().

◆ OnString()

void JsonApiStruct::OnString ( string name,
string value )
inlineprivate

Called when parsing string value.

Definition at line 92 of file JsonApiStruct.c.

93 {
94 Print("OnString: " + value);
95 }

References Print().

◆ OnSuccess()

void JsonApiStruct::OnSuccess ( int errorCode)
inlineprivate

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

Definition at line 44 of file JsonApiStruct.c.

45 {
46 // errorCode is EJsonApiError
47 }

◆ OnVector()

void JsonApiStruct::OnVector ( string name,
vector value )
inlineprivate

Called when parsing vector value.

Definition at line 100 of file JsonApiStruct.c.

101 {
102 Print("OnVector: " + value);
103 }

References Print().

◆ Pack()

proto native void JsonApiStruct::Pack ( )
private

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

◆ PackToFile()

proto native bool JsonApiStruct::PackToFile ( string FileName)
private

Pack() and save JSON to file.

◆ Push()

proto native void JsonApiStruct::Push ( JsonApiStruct obj)
private

Push object to parse (only during parse operation)

◆ RegV()

proto native void JsonApiStruct::RegV ( string name)
private

Register script variable for auto-feature.

◆ SaveToFile()

proto native bool JsonApiStruct::SaveToFile ( string FileName)
private

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

◆ SetDone()

proto native void JsonApiStruct::SetDone ( )
private

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

◆ SetFail()

proto native void JsonApiStruct::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 JsonApiStruct::StartArray ( string name)
private

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

◆ StartObject()

proto native void JsonApiStruct::StartObject ( string name)
private

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

◆ StoreBoolean()

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

Add boolean value to hierarchy.

◆ StoreFloat()

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

Add float value to hierarchy.

◆ StoreInteger()

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

Add integer value to hierarchy.

◆ StoreObject()

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

Add scripted object to hierarchy (calls through hierarchy)

◆ StoreString()

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

Add string value to hierarchy.

◆ StoreVector()

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

Add vector value to hierarchy.


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