#include <remotevar.h>

Public Member Functions | |
| Remote (const char *name, T data=T()) throw (Exception) | |
| bool | setData (T &b, nodeId id=nobodyId) |
| const T & | getData (nodeId id=nobodyId) const throw (Exception) |
| T & | operator* (void) const |
| void | lock (void) |
| void | unlock (void) |
Protected Member Functions | |
| chain | pack (void) |
| bool | unpack (chain &c, unsigned int &used) |
Protected Attributes | |
| T | data |
Definition at line 188 of file remotevar.h.
| libglass::Remote< T, T, T >::Remote | ( | const char * | name, | |
| T | data = T() | |||
| ) | throw (Exception) [inline] |
Constructor.
| name | The variable name. | |
| data | The variable data. |
Definition at line 228 of file remotevar.h.
| const T& libglass::Remote< T, T, T >::getData | ( | nodeId | id = nobodyId |
) | const throw (Exception) [inline] |
Returns the variable value.
| id | The id to |
Definition at line 258 of file remotevar.h.
References libglass::_Remote::_getValue(), libglass::Remote< T, T, T >::data, libglass::nobodyId, and libglass::Remote< T, T, T >::unpack().
| void libglass::Remote< T, T, T >::lock | ( | void | ) | [inline] |
Lock this variable.
Definition at line 287 of file remotevar.h.
References libglass::_Remote::mutex.
| T& libglass::Remote< T, T, T >::operator* | ( | void | ) | const [inline] |
Value operator.
Definition at line 277 of file remotevar.h.
References libglass::Remote< T, T, T >::data.
| chain libglass::Remote< T, T, T >::pack | ( | void | ) | [inline, protected, virtual] |
Pack function. Serializes the variable to a string.
Reimplemented from libglass::_Remote.
Definition at line 192 of file remotevar.h.
References libglass::Remote< T, T, T >::data.
| bool libglass::Remote< T, T, T >::setData | ( | T & | b, | |
| nodeId | id = nobodyId | |||
| ) | [inline] |
Assignment operator.
| b | The value to assign. | |
| id | The node to assign to. |
Definition at line 239 of file remotevar.h.
References libglass::_Remote::_setValue(), libglass::Remote< T, T, T >::data, and libglass::nobodyId.
| void libglass::Remote< T, T, T >::unlock | ( | void | ) | [inline] |
Unlock this variable.
Definition at line 294 of file remotevar.h.
References libglass::_Remote::mutex.
| bool libglass::Remote< T, T, T >::unpack | ( | chain & | s, | |
| unsigned int & | used | |||
| ) | [inline, protected, virtual] |
Unpack function. Unserializes the string to a variable.
| s | The string. | |
| used | The number of bytes used by the unserializer. |
Reimplemented from libglass::_Remote.
Definition at line 198 of file remotevar.h.
References libglass::Remote< T, T, T >::data, libglass::chain::find(), libglass::_Remote::mutex, and libglass::chain::npos.
Referenced by libglass::Remote< T, T, T >::getData().
T libglass::Remote< T, T, T >::data [protected] |
Definition at line 190 of file remotevar.h.
Referenced by libglass::Remote< T, T, T >::getData(), libglass::Remote< T, T, T >::operator*(), libglass::Remote< T, T, T >::pack(), libglass::Remote< T, T, T >::setData(), and libglass::Remote< T, T, T >::unpack().
1.5.8