|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
A custom value attached to a buddy in a buddy list, kept in sync between client and server. More...
#include <Variable.h>
Public Member Functions | |
| virtual bool | isOffline ()=0 |
| Checks if this is a "offline" variable (persistent), which is available to other Users even when the client is not online. | |
| 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 buddy in a buddy list, kept in sync between client and server.
SFSBuddyVariable is the standard implementation of this interface.
|
pure virtual |
Checks if this is a "offline" variable (persistent), which is available to other Users even when the client is not online.
There is no setter counterpart: a Buddy Variable is persistent by virtue of its own name starting with SFSBuddyVariable::OFFLINE_PREFIX, which is the only thing the server honours. Name it accordingly at construction to make it persistent.
Implemented in sfs3::entities::SFSBuddyVariable.