|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
A custom value attached to a Room, kept in sync between client and server. More...
#include <Variable.h>
Public Member Functions | |
| virtual bool | isPrivate ()=0 |
| Indicates whether this Room Variable is private or not. | |
| virtual bool | isPersistent ()=0 |
| Indicates whether this Room Variable is persistent or not. | |
| Public Member Functions inherited from sfs3::entities::Variable | |
| std::string | name () |
| virtual const VarData & | value () |
| Returns the value of this variable, whatever its type. | |
| virtual std::optional< bool > | boolValue () |
| virtual std::optional< uint8_t > | byteValue () |
| virtual std::optional< int16_t > | shortValue () |
| virtual std::optional< int32_t > | intValue () |
| virtual std::optional< int64_t > | longValue () |
| virtual std::optional< float > | floatValue () |
| virtual std::optional< double > | doubleValue () |
| virtual std::optional< std::string > | stringValue () |
| virtual std::shared_ptr< SFSObject > | sfsObjectValue () |
| virtual std::shared_ptr< SFSArray > | sfsArrayValue () |
| virtual std::optional< SFSVector2 > | vector2Value () |
| virtual std::optional< SFSVector3 > | vector3Value () |
| virtual void | setNull () |
| Clears the value of this variable. | |
| virtual void | setValue (VarData value) |
| Sets the value of this variable. | |
| virtual bool | isNull () |
| virtual std::string | toString () |
A custom value attached to a Room, kept in sync between client and server.
SFSRoomVariable is the standard implementation of this interface.
|
pure virtual |
Indicates whether this Room Variable is private or not.
A private Room Variable can be modified by its owner only (the user that created it).
NOTE: setting this flag by hand on a Room Variable returned by the API has no effect on the server and can disrupt the working of the API. You can set it only on a Room Variable you create yourself.
Implemented in sfs3::entities::SFSRoomVariable.
|
pure virtual |
Indicates whether this Room Variable is persistent or not.
A persistent Room Variable continues to exist in the Room after the user who created it has left it and until he disconnects.
NOTE: setting this flag by hand on a Room Variable returned by the API has no effect on the server and can disrupt the working of the API. You can set it only on a Room Variable you create yourself.
Implemented in sfs3::entities::SFSRoomVariable.