Equalizer 1.0

eq::fabric::Node< C, N, P, V > Class Template Reference

Base data transport class for nodes. More...

#include <node.h>

Inheritance diagram for eq::fabric::Node< C, N, P, V >:
Collaboration diagram for eq::fabric::Node< C, N, P, V >:

List of all members.

Classes

struct  BackupData

Public Member Functions

virtual EQFABRIC_INL void backup ()
virtual EQFABRIC_INL void restore ()
void create (P **pipe)
void release (P *pipe)
virtual void output (std::ostream &) const
Data Access
C * getConfig ()
const C * getConfig () const
const PipesgetPipes () const
bool isApplicationNode () const
EQFABRIC_INL void setApplicationNode (const bool isAppNode)
EQFABRIC_INL NodePath getPath () const
P * findPipe (const co::base::UUID &id)
EQFABRIC_INL VisitorResult accept (V &visitor)
 Traverse this node and all children using a node visitor.
EQFABRIC_INL VisitorResult accept (V &visitor) const
 Const-version of accept().

Public Types

typedef std::vector< P * > Pipes
 A vector of pointers to pipes.

Protected Member Functions

 Node (C *parent)
virtual EQFABRIC_INL void serialize (co::DataOStream &os, const uint64_t dirtyBits)
 Worker for pack() and getInstanceData().
virtual EQFABRIC_INL void deserialize (co::DataIStream &is, const uint64_t dirtyBits)
 Worker for unpack() and applyInstanceData().
virtual EQFABRIC_INL void notifyDetach ()
 Notify that this object will be deregistered or unmapped.
virtual EQFABRIC_INL void setDirty (const uint64_t bits)
virtual ChangeType getChangeType () const
virtual uint64_t getRedistributableBits () const

Protected Types

enum  DirtyBits { DIRTY_ATTRIBUTES = Object::DIRTY_CUSTOM << 0, DIRTY_PIPES = Object::DIRTY_CUSTOM << 1, DIRTY_MEMBER = Object::DIRTY_CUSTOM << 2, DIRTY_NODE_BITS }
 

The changed parts of the object since the last pack().

More...

Friends

class Pipe

Attributes

enum  IAttribute { IATTR_THREAD_MODEL, IATTR_LAUNCH_TIMEOUT, IATTR_LAST, IATTR_ALL = IATTR_LAST + 5 }
 

Integer attributes.

More...
EQFABRIC_INL void setIAttribute (const IAttribute attr, const int32_t value)
EQFABRIC_INL int32_t getIAttribute (const IAttribute attr) const
static const std::string & getIAttributeString (const IAttribute attr)

Detailed Description

template<class C, class N, class P, class V>
class eq::fabric::Node< C, N, P, V >

Base data transport class for nodes.

See also:
eq::Node

Definition at line 31 of file include/eq/fabric/node.h.


Member Typedef Documentation

template<class C, class N, class P, class V>
typedef std::vector< P* > eq::fabric::Node< C, N, P, V >::Pipes

A vector of pointers to pipes.

Version:
1.0

Definition at line 35 of file include/eq/fabric/node.h.


Member Enumeration Documentation

template<class C, class N, class P, class V>
enum eq::fabric::Node::DirtyBits [protected]

The changed parts of the object since the last pack().

Subclasses should define their own bits, starting at DIRTY_CUSTOM.

Reimplemented from eq::fabric::Object.

Definition at line 126 of file include/eq/fabric/node.h.

template<class C, class N, class P, class V>
enum eq::fabric::Node::IAttribute

Integer attributes.

Enumerator:
IATTR_THREAD_MODEL 

Threading model

IATTR_LAUNCH_TIMEOUT 

Timeout when auto-launching the node.

Definition at line 79 of file include/eq/fabric/node.h.


Member Function Documentation

template<class C, class N, class P, class V>
EQFABRIC_INL VisitorResult eq::fabric::Node< C, N, P, V >::accept ( V &  visitor)

Traverse this node and all children using a node visitor.

Parameters:
visitorthe visitor.
Returns:
the result of the visitor traversal.
Version:
1.0
template<class C, class N, class P, class V>
EQFABRIC_INL VisitorResult eq::fabric::Node< C, N, P, V >::accept ( V &  visitor) const

Const-version of accept().

Version:
1.0
template<class C, class N, class P, class V>
virtual EQFABRIC_INL void eq::fabric::Node< C, N, P, V >::deserialize ( co::DataIStream ,
const uint64_t   
) [protected, virtual]

Worker for unpack() and applyInstanceData().

This function is called with the dirty bits send by the master instance. The dirty bits are received beforehand, and do not need to be deserialized by the overriding method.

See also:
serialize()
Version:
1.0

Reimplemented from eq::fabric::Object.

template<class C, class N, class P, class V>
virtual ChangeType eq::fabric::Node< C, N, P, V >::getChangeType ( ) const [inline, protected, virtual]
Returns:
how the changes are to be handled.

Reimplemented from eq::fabric::Serializable.

Definition at line 124 of file include/eq/fabric/node.h.

template<class C, class N, class P, class V>
const C* eq::fabric::Node< C, N, P, V >::getConfig ( ) const [inline]
Returns:
the config of this node.
Version:
1.0

Definition at line 43 of file include/eq/fabric/node.h.

template<class C, class N, class P, class V>
C* eq::fabric::Node< C, N, P, V >::getConfig ( ) [inline]
Returns:
the config of this node.
Version:
1.0

Definition at line 40 of file include/eq/fabric/node.h.

template<class C, class N, class P, class V>
EQFABRIC_INL int32_t eq::fabric::Node< C, N, P, V >::getIAttribute ( const IAttribute  attr) const
Returns:
the value of a node integer attribute.
Version:
1.0
template<class C, class N, class P, class V>
const Pipes& eq::fabric::Node< C, N, P, V >::getPipes ( ) const [inline]
Returns:
the vector of child pipes.
Version:
1.0

Definition at line 46 of file include/eq/fabric/node.h.

template<class C, class N, class P, class V>
virtual EQFABRIC_INL void eq::fabric::Node< C, N, P, V >::notifyDetach ( ) [protected, virtual]

Notify that this object will be deregistered or unmapped.

The method is called from the thread initiating the deregistration or unmapping, before the operation is executed.

See also:
isMaster()

Reimplemented from eq::fabric::Object.

template<class C, class N, class P, class V>
virtual EQFABRIC_INL void eq::fabric::Node< C, N, P, V >::serialize ( co::DataOStream ,
const uint64_t   
) [protected, virtual]

Worker for pack() and getInstanceData().

Override this and deserialize() if you want to distribute subclassed data.

This method is called with DIRTY_ALL from getInstanceData() and with the actual dirty bits from pack(), which also resets the dirty state afterwards. The dirty bits are transmitted beforehand, and do not need to be transmitted by the overriding method.

Version:
1.0

Reimplemented from eq::fabric::Object.

template<class C, class N, class P, class V>
virtual EQFABRIC_INL void eq::fabric::Node< C, N, P, V >::setDirty ( const uint64_t  bits) [protected, virtual]
See also:
Serializable::setDirty()

Reimplemented from eq::fabric::Serializable.

Reimplemented in eq::Node.


The documentation for this class was generated from the following file:
Generated on Sun May 8 2011 19:11:10 for Equalizer 1.0 by  doxygen 1.7.3