SmartFoxServer 2X C++ API
|
#include <ISFSArray.h>
Public Member Functions | |
virtual bool | Contains (boost::shared_ptr< void > obj)=0 |
Returns true if the passed object is contained in the Array More... | |
virtual boost::shared_ptr< void > | GetElementAt (long int index)=0 |
Returns the element at the specified index More... | |
virtual boost::shared_ptr< void > | RemoveElementAt (unsigned long int index)=0 |
Remove the element at the specified index More... | |
virtual long int | Size ()=0 |
Return the number of elements in the Array More... | |
virtual boost::shared_ptr< ByteArray > | ToBinary ()=0 |
Return the binary form of the object More... | |
virtual boost::shared_ptr< string > | GetDump (bool format)=0 |
Return a formatted dump of the object that can logged or traced in the console for debugging purposes. More... | |
virtual boost::shared_ptr< string > | GetDump ()=0 |
Return a formatted dump of the object that can logged or traced in the console for debugging purposes. More... | |
virtual boost::shared_ptr< string > | GetHexDump ()=0 |
Returns a detailed hex-dump of the object that can logged or traced in the console for debugging purposes. More... | |
virtual void | AddNull ()=0 |
Add a null element More... | |
virtual void | AddBool (boost::shared_ptr< bool > val)=0 |
Add a Boolean value More... | |
virtual void | AddBool (bool val)=0 |
Add a Boolean value More... | |
virtual void | AddByte (boost::shared_ptr< unsigned char > val)=0 |
Add a byte value (8 bit) More... | |
virtual void | AddByte (unsigned char val)=0 |
Add a byte value (8 bit) More... | |
virtual void | AddShort (boost::shared_ptr< short int > val)=0 |
Add a short int value (16 bit) More... | |
virtual void | AddShort (short int val)=0 |
Add a short int value (16 bit) More... | |
virtual void | AddInt (boost::shared_ptr< long int > val)=0 |
Add an int value (32 bit) More... | |
virtual void | AddInt (long int val)=0 |
Add an int value (32 bit) More... | |
virtual void | AddLong (boost::shared_ptr< long long > val)=0 |
Add a long int value (64 bit) More... | |
virtual void | AddLong (long long val)=0 |
Add a long int value (64 bit) More... | |
virtual void | AddFloat (boost::shared_ptr< float > val)=0 |
Add a float value (32 bit) More... | |
virtual void | AddFloat (float val)=0 |
Add a float value (32 bit) More... | |
virtual void | AddDouble (boost::shared_ptr< double > val)=0 |
Add a dobule value (64 bit) More... | |
virtual void | AddDouble (double val)=0 |
Add a dobule value (64 bit) More... | |
virtual void | AddUtfString (boost::shared_ptr< string > val)=0 |
Appends a UTF-8 string (with max length of 32 KBytes) value to the end of this array. More... | |
virtual void | AddUtfString (string val)=0 |
Appends a UTF-8 string (with max length of 32 KBytes) value to the end of this array. More... | |
virtual void | AddText (boost::shared_ptr< string > val)=0 |
Appends a UTF-8 string (with max length of 2 GBytes) value to the end of this array. More... | |
virtual void | AddText (string val)=0 |
Appends a UTF-8 string (with max length of 2 GBytes) value to the end of this array. More... | |
virtual void | AddBoolArray (boost::shared_ptr< vector< boost::shared_ptr< bool > > > val)=0 |
Add an array of Booleans More... | |
virtual void | AddByteArray (boost::shared_ptr< ByteArray > val)=0 |
Add an array of bytes More... | |
virtual void | AddShortArray (boost::shared_ptr< vector< boost::shared_ptr< short int > > > val)=0 |
Add an array of short ints More... | |
virtual void | AddIntArray (boost::shared_ptr< vector< boost::shared_ptr< long int > > > val)=0 |
Add an array of ints More... | |
virtual void | AddLongArray (boost::shared_ptr< vector< boost::shared_ptr< long long > > > val)=0 |
Add an array of long ints More... | |
virtual void | AddFloatArray (boost::shared_ptr< vector< boost::shared_ptr< float > > > val)=0 |
Add an array of floats More... | |
virtual void | AddDoubleArray (boost::shared_ptr< vector< boost::shared_ptr< double > > > val)=0 |
Add an array of doubles More... | |
virtual void | AddUtfStringArray (boost::shared_ptr< vector< boost::shared_ptr< string > > > val)=0 |
Add an array of UTF-8 String More... | |
virtual void | AddSFSArray (boost::shared_ptr< ISFSArray > val)=0 |
Add an SFSArray More... | |
virtual void | AddSFSObject (boost::shared_ptr< ISFSObject > val)=0 |
Add an SFSObject More... | |
virtual void | AddClass (boost::shared_ptr< void > val)=0 |
Add an instance of a custom Class. More... | |
virtual bool | IsNull (unsigned long int index)=0 |
Checks if a certain element in the Array is null More... | |
virtual bool | GetBool (unsigned long int index)=0 |
Get a Boolean element at the provided index More... | |
virtual unsigned char | GetByte (unsigned long int index)=0 |
Get a byte element at the provided index More... | |
virtual short int | GetShort (unsigned long int index)=0 |
Get a short int element at the provided index More... | |
virtual long int | GetInt (unsigned long int index)=0 |
Get an int element at the provided index More... | |
virtual long long | GetLong (unsigned long int index)=0 |
Get a long int element at the provided index More... | |
virtual float | GetFloat (unsigned long int index)=0 |
Get a float element at the provided index More... | |
virtual double | GetDouble (unsigned long int index)=0 |
Get a double element at the provided index More... | |
virtual boost::shared_ptr< string > | GetUtfString (unsigned long int index)=0 |
Returns the element at the specified position as an UTF-8 string, with max length of 32 KBytes. More... | |
virtual boost::shared_ptr< string > | GetText (unsigned long int index)=0 |
Returns the element at the specified position as an UTF-8 string, with max length of 2 GBytes. More... | |
virtual boost::shared_ptr< vector< bool > > | GetBoolArray (unsigned long int index)=0 |
Get a Boolean Array element at the provided index More... | |
virtual boost::shared_ptr< ByteArray > | GetByteArray (unsigned long int index)=0 |
Get a byte Array element at the provided index More... | |
virtual boost::shared_ptr< vector< short int > > | GetShortArray (unsigned long int index)=0 |
Get a short Array element at the provided index More... | |
virtual boost::shared_ptr< vector< long int > > | GetIntArray (unsigned long int index)=0 |
Get a int Array element at the provided index More... | |
virtual boost::shared_ptr< vector< long long > > | GetLongArray (unsigned long int index)=0 |
Get a lomg Array element at the provided index More... | |
virtual boost::shared_ptr< vector< float > > | GetFloatArray (unsigned long int index)=0 |
Get a float Array element at the provided index More... | |
virtual boost::shared_ptr< vector< double > > | GetDoubleArray (unsigned long int index)=0 |
Get a double Array element at the provided index More... | |
virtual boost::shared_ptr< vector< string > > | GetUtfStringArray (unsigned long int index)=0 |
Get a String Array element at the provided index More... | |
virtual boost::shared_ptr< ISFSArray > | GetSFSArray (unsigned long int index)=0 |
Get an SFSArray element at the provided index More... | |
virtual boost::shared_ptr< ISFSObject > | GetSFSObject (unsigned long int index)=0 |
Get an SFSObject element at the provided index More... | |
virtual boost::shared_ptr< void > | GetClass (unsigned long int index)=0 |
Get a class instance at the provided index. More... | |
SFSArray interface
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Add a byte value (8 bit)
val | An unsigned char |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Add a byte value (8 bit)
val | An unsigned char |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Add an array of bytes
val | Pointer to a ByteArray instance |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Add an instance of a custom Class.
This is an advanced feature that allows to transmit object instances between Actionscript and Java provided that both classes are definined under the same package name.
This is an example of the same class on the server and client side:
Server Java code:
Client AS3 code:
A SpaceShip instance from server side is sent to the client. This is how you get it:
val | A void pointer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Add an int value (32 bit)
val | A long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Add an int value (32 bit)
val | A long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Add a null element
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Add an SFSArray
val | Pointer to a ISFSArray instance |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Add an SFSObject
val | Pointer to a ISFSObject instance |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Add a short int value (16 bit)
val | A short integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Add a short int value (16 bit)
val | A short integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
|
pure virtual |
Appends a UTF-8 string (with max length of 2 GBytes) value to the end of this array.
val | The value to be appended to this array. |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Appends a UTF-8 string (with max length of 2 GBytes) value to the end of this array.
val | The value to be appended to this array. |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Appends a UTF-8 string (with max length of 32 KBytes) value to the end of this array.
val | A string pointer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Appends a UTF-8 string (with max length of 32 KBytes) value to the end of this array.
val | A string pointer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Add an array of UTF-8 String
val | A string[] |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Returns true if the passed object is contained in the Array
obj | A void pointer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a Boolean element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a Boolean Array element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a byte element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a byte Array element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a class instance at the provided index.
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a double element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a double Array element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Return a formatted dump of the object that can logged or traced in the console for debugging purposes.
format | turns the "pretty print" on/off |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Return a formatted dump of the object that can logged or traced in the console for debugging purposes.
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Returns the element at the specified index
index | A long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a float element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a float Array element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Returns a detailed hex-dump of the object that can logged or traced in the console for debugging purposes.
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get an int element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a int Array element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a long int element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a lomg Array element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get an SFSArray element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get an SFSObject element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a short int element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a short Array element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Returns the element at the specified position as an UTF-8 string, with max length of 2 GBytes.
index | The position of the element to return. |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Returns the element at the specified position as an UTF-8 string, with max length of 32 KBytes.
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Get a String Array element at the provided index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Checks if a certain element in the Array is null
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Remove the element at the specified index
index | An unsigned long integer |
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Return the number of elements in the Array
Implemented in Sfs2X::Entities::Data::SFSArray.
|
pure virtual |
Return the binary form of the object
Implemented in Sfs2X::Entities::Data::SFSArray.