SmartFoxServer 2X C++ API
|
The BaseVariable object is the base class for all SmartFoxServer Variable entities on the client. More...
#include <BaseVariable.h>
Public Member Functions | |
BaseVariable (string name, boost::shared_ptr< void > val, long int type) | |
Creates a new BaseVariable instance. More... | |
BaseVariable (string name, boost::shared_ptr< long int > val) | |
Creates a new BaseVariable instance. More... | |
virtual boost::shared_ptr< string > | Name () |
Indicates the name of this variable. | |
virtual VariableType | Type () |
Indicates the type of this variable. | |
virtual boost::shared_ptr< void > | Value () |
Returns the untyped value of this variable. | |
virtual boost::shared_ptr< bool > | GetBoolValue () |
Retrieves the value of a boolean variable. | |
virtual boost::shared_ptr< long int > | GetIntValue () |
Retrieves the value of an integer variable. | |
virtual boost::shared_ptr< double > | GetDoubleValue () |
Retrieves the value of a double precision variable. | |
virtual boost::shared_ptr< string > | GetStringValue () |
Retrieves the value of a string variable. | |
virtual boost::shared_ptr< ISFSObject > | GetSFSObjectValue () |
Retrieves the value of a SFSObject variable. | |
virtual boost::shared_ptr< ISFSArray > | GetSFSArrayValue () |
Retrieves the value of a SFSArray variable. | |
virtual bool | IsNull () |
Indicates if the variable is null . | |
virtual boost::shared_ptr< ISFSArray > | ToSFSArray () |
<exclude> | |
The BaseVariable object is the base class for all SmartFoxServer Variable entities on the client.
Sfs2X::Entities::Variables::BaseVariable::BaseVariable | ( | string | name, |
boost::shared_ptr< void > | val, | ||
long int | type | ||
) |
Creates a new BaseVariable instance.
name | The name of the Variable. |
val | The value of the Variable. |
type | The type of the Variable among those available in the VariableType class. Usually it is not necessary to pass this parameter, as the type is auto-detected from the value. |
<exclude>
Sfs2X::Entities::Variables::BaseVariable::BaseVariable | ( | string | name, |
boost::shared_ptr< long int > | val | ||
) |
Creates a new BaseVariable instance.
name | The name of the Variable. |
val | The value of the Variable ( can be Boolean, int, Number, String, SFSObject, SFSArray ). |
<exclude>