libglass::_Shared Class Reference
#include <shared.h>
List of all members.
Detailed Description
Abstract base class for shared variables.
- Todo:
- Prefetch new values, presend updates.
Definition at line 139 of file shared.h.
Member Enumeration Documentation
- Enumerator:
-
NEVER |
|
NEXT_ONLY |
|
CHANGED |
|
FORCED |
|
Definition at line 141 of file shared.h.
Constructor & Destructor Documentation
libglass::_Shared::_Shared |
( |
const string & |
name |
) |
throw (Exception) [protected] |
Constructor.
- Parameters:
-
- Exceptions:
-
virtual libglass::_Shared::~_Shared |
( |
|
) |
[protected, virtual] |
Member Function Documentation
bool libglass::_Shared::getUpdate |
( |
void |
|
) |
|
Synchronizes this variable.
- Return values:
-
| True | If successful. |
| false | Otherwise. |
UpdateMode libglass::_Shared::getUpdateMode |
( |
void |
|
) |
const [inline] |
bool libglass::_Shared::hasChanged |
( |
void |
|
) |
const [inline] |
Has the value changed since last update?
- Return values:
-
| True | if changed. |
| False | otherwise. |
Definition at line 202 of file shared.h.
virtual chain libglass::_Shared::pack |
( |
void |
|
) |
[inline, protected, virtual] |
bool libglass::_Shared::sendUpdate |
( |
void |
|
) |
|
static bool libglass::_Shared::sendUpdateAll |
( |
void |
|
) |
[static] |
Synchronizes all variables.
All updates are sent as one, saving bandwidth and cutting the delay.
- Warning:
- IMPORTANT! Since this method is static, it guesses that the variable you want to synchronize are those of the current Glass class. You only have to care about this if you instantiate more than one Glass derived class in the same application, which you are almost certainly not doing. If you don't know for sure, you are not doing it; go worry about something else.
- See also:
- Glass.
- Return values:
-
| True | If successful. |
| false | Otherwise. |
void libglass::_Shared::setUpdateMode |
( |
UpdateMode |
updatemode |
) |
[inline] |
virtual bool libglass::_Shared::unpack |
( |
chain & |
s, |
|
|
unsigned int & |
used | |
|
) |
| | [inline, protected, virtual] |
Unpack function. Unserializes the string to a variable.
- Parameters:
-
| s | The string. |
| used | The number of bytes used by the unserialization. |
- Returns:
Reimplemented in libglass::Shared< T, T, T >.
Definition at line 187 of file shared.h.
Friends And Related Function Documentation
friend class SharedPacket [friend] |
Member Data Documentation
serialized data
Definition at line 160 of file shared.h.
who was the last to change this variable?
Definition at line 158 of file shared.h.
the variable name.
Definition at line 148 of file shared.h.
value for next update
Definition at line 161 of file shared.h.
our owner plugin.
Definition at line 147 of file shared.h.
to guarantee that an update arrived
Definition at line 155 of file shared.h.
our update mode. Default is always.
Definition at line 154 of file shared.h.
The documentation for this class was generated from the following file: