SmartFoxServer 2X C++ API
Sfs2X::Entities::Variables::MMOItemVariable Class Reference

The MMOItemVariable object represents a SmartFoxServer MMOItem Variable entity on the client. More...

#include <MMOItemVariable.h>

Inheritance diagram for Sfs2X::Entities::Variables::MMOItemVariable:
Sfs2X::Entities::Variables::BaseVariable Sfs2X::Entities::Variables::IMMOItemVariable Sfs2X::Entities::Variables::Variable Sfs2X::Entities::Variables::Variable

Public Member Functions

 MMOItemVariable (string name, boost::shared_ptr< void > val, long int type)
 <exclude>
 
 MMOItemVariable (string name, boost::shared_ptr< long int > val)
 <exclude>
 
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< ISFSObjectGetSFSObjectValue ()
 Retrieves the value of a SFSObject variable.
 
virtual boost::shared_ptr< ISFSArrayGetSFSArrayValue ()
 Retrieves the value of a SFSArray variable.
 
virtual bool IsNull ()
 Indicates if the variable is null.
 
virtual boost::shared_ptr< ISFSArrayToSFSArray ()
 <exclude>
 
boost::shared_ptr< string > ToString ()
 Returns a string that contains the MMOItem Variable name, type and value. More...
 
- Public Member Functions inherited from Sfs2X::Entities::Variables::BaseVariable
 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...
 

Static Public Member Functions

static boost::shared_ptr< IMMOItemVariableFromSFSArray (boost::shared_ptr< ISFSArray > sfsa)
 <exclude>
 

Detailed Description

The MMOItemVariable object represents a SmartFoxServer MMOItem Variable entity on the client.

An MMOItem Variable is a custom value attached to an MMOItem object that gets automatically synchronized between client and server on every change, provided that the MMOItem is inside the Area of Interest of the current user in a MMORoom.

NOTE: MMOItem Variables behave exactly like User Variables and support the same data types, but they can be created, updated and deleted on the server side only.

See also
Sfs2X.Entities.MMOItem, Sfs2X.Entities.MMORoom

Member Function Documentation

◆ ToString()

boost::shared_ptr< string > Sfs2X::Entities::Variables::MMOItemVariable::ToString ( )

Returns a string that contains the MMOItem Variable name, type and value.

Returns
The string representation of the Sfs2X.Entities.Variables.MMOItemVariable object.