libglass::_Remote Class Reference

#include <remotevar.h>

Inheritance diagram for libglass::_Remote:

libglass::PluginInterface libglass::Remote< T, T, T >

List of all members.

Public Member Functions

bool setValue (nodeId id)
bool getValue (nodeId id)

Protected Member Functions

 _Remote (const char *name) throw (Exception)
virtual ~_Remote ()
virtual chain pack (void)
virtual bool unpack (chain &s, unsigned int &used)
bool _setValue (chain &c, nodeId id)
bool _getValue (chain &c, nodeId id)

Protected Attributes

RemoteBaserb
string name
boost::mutex mutex
std::set< nodeIdowners

Friends

class RemoteBase
class RemoteVarPacket


Detailed Description

Abstract base class for remote variables.

Todo:
Prefetch new values, presend updates.

Definition at line 101 of file remotevar.h.


Constructor & Destructor Documentation

libglass::_Remote::_Remote ( const char *  name  )  throw (Exception) [protected]

Constructor.

Parameters:
name The variable name.
Exceptions:
Exception. 

virtual libglass::_Remote::~_Remote (  )  [protected, virtual]

Destructor.


Member Function Documentation

bool libglass::_Remote::_getValue ( chain c,
nodeId  id 
) [protected]

Gets the packed value of this variable in a remote node.

Parameters:
c The packed data.
id The remote node.
Return values:
true If successful.
false Otherwise.

Referenced by libglass::Remote< T, T, T >::getData().

bool libglass::_Remote::_setValue ( chain c,
nodeId  id 
) [protected]

Sets the value of this variable in a remote node.

Parameters:
c The packed value.
id The remote node.
Return values:
true If successful.
false Otherwise.

Referenced by libglass::Remote< T, T, T >::setData().

bool libglass::_Remote::getValue ( nodeId  id  ) 

Updates this variable with its value in another node.

Parameters:
id The remote node.
Return values:
true If successful.
false Otherwise.

virtual chain libglass::_Remote::pack ( void   )  [protected, virtual]

Pack function. Serializes the variable to a string.

Returns:
The variable, serialized to a string.

Reimplemented in libglass::Remote< T, T, T >.

bool libglass::_Remote::setValue ( nodeId  id  ) 

Updates the remote variable with the current local value.

Parameters:
id The remote node.
Return values:
true If successful.
false Otherwise.

virtual bool libglass::_Remote::unpack ( chain s,
unsigned int &  used 
) [protected, virtual]

Unpack function. Unserializes the string to a variable.

Parameters:
s The string.
used The number of bytes used by the unserializer.
Returns:

Reimplemented in libglass::Remote< T, T, T >.


Friends And Related Function Documentation

friend class RemoteBase [friend]

Definition at line 103 of file remotevar.h.

friend class RemoteVarPacket [friend]

Definition at line 104 of file remotevar.h.


Member Data Documentation

boost::mutex libglass::_Remote::mutex [protected]

Mutex for atomic operations

Definition at line 110 of file remotevar.h.

Referenced by libglass::Remote< T, T, T >::lock(), libglass::Remote< T, T, T >::unlock(), and libglass::Remote< T, T, T >::unpack().

the variable name.

Definition at line 107 of file remotevar.h.

std::set<nodeId> libglass::_Remote::owners [protected]

owner list

Definition at line 113 of file remotevar.h.

our owner plugin.

Definition at line 106 of file remotevar.h.


The documentation for this class was generated from the following file:

Generated on Fri May 28 13:19:01 2010 for libGlass by  doxygen 1.5.8