Equalizer  1.2.1
Classes | Public Member Functions | Public Types | Protected Member Functions | Friends
eq::fabric::Config< S, C, O, L, CV, N, V > Class Template Reference

Base data class for a configuration. More...

#include <config.h>

+ Inheritance diagram for eq::fabric::Config< S, C, O, L, CV, N, V >:
+ Collaboration diagram for eq::fabric::Config< S, C, O, L, CV, N, V >:

List of all members.

Classes

struct  BackupData

Public Member Functions

virtual void output (std::ostream &) const
void create (O **observer)
void release (O *observer)
void create (L **layout)
void release (L *layout)
void create (CV **canvas)
void release (CV *canvas)
void create (N **node)
void release (N *node)
Data Access
EQFABRIC_INL co::base::RefPtr< S > getServer ()
EQFABRIC_INL co::base::RefPtr
< const S > 
getServer () const
const ObserversgetObservers () const
const LayoutsgetLayouts () const
const CanvasesgetCanvases () const
EQFABRIC_INL uint32_t getTimeout () const
const NodesgetNodes () const
EQFABRIC_INL N * findAppNode ()
EQFABRIC_INL const N * findAppNode () const
EQFABRIC_INL VisitorResult accept (V &visitor)
 Traverse this config and all children using a config visitor.
EQFABRIC_INL VisitorResult accept (V &visitor) const
 Const-version of accept().
template<typename T >
EQFABRIC_INL T * find (const uint128_t &id)
template<typename T >
EQFABRIC_INL const T * find (const uint128_t &id) const
template<typename T >
EQFABRIC_INL T * find (const std::string &name)
template<typename T >
EQFABRIC_INL const T * find (const std::string &name) const
O * getObserver (const ObserverPath &path)
L * getLayout (const LayoutPath &path)
CV * getCanvas (const CanvasPath &path)
template<typename T >
void find (const uint128_t &id, T **result)
template<typename T >
void find (const std::string &name, const T **result) const
virtual void updateCanvas (CV *)
virtual void exitCanvas (CV *)
Operations
virtual void setLatency (const uint32_t latency)
 Set the maximum accepted latency for this config.
uint32_t getLatency () const
virtual EQFABRIC_INL void restore ()

Public Types

typedef std::vector< O * > Observers
 A vector of observers.
typedef std::vector< L * > Layouts
 A vector of layouts.
typedef std::vector< CV * > Canvases
 A vector of canvases.
typedef std::vector< N * > Nodes
 A vector of nodes.

Protected Member Functions

EQFABRIC_INL Config (co::base::RefPtr< S > parent)
virtual EQFABRIC_INL void attach (const co::base::UUID &id, const uint32_t instanceID)
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 void _removeChild (const co::base::UUID &)
void setAppNodeID (const co::NodeID &nodeID)
const co::NodeIDgetAppNodeID () const
virtual void changeLatency (const uint32_t)
virtual bool mapViewObjects () const
virtual bool mapNodeObjects () const
virtual VisitorResult _acceptCompounds (V &)
virtual VisitorResult _acceptCompounds (V &) const
N * _findNode (const uint128_t &id)
virtual EQFABRIC_INL uint128_t commit (const uint32_t incarnation=CO_COMMIT_NEXT)
 Commit a new version of this object.

Friends

class Server
class Observer
class Layout
class Canvas
class Node
template<class C2 , class V2 >
VisitorResult _acceptImpl (C2 *, V2 &)

Attributes

enum  FAttribute { FATTR_EYE_BASE, FATTR_VERSION, FATTR_LAST, FATTR_ALL = FATTR_LAST + 5 }
 Floating-point attributes. More...
enum  IAttribute { IATTR_ROBUSTNESS, IATTR_LAST, IATTR_ALL = IATTR_LAST + 5 }
 Integer attributes. More...
void setFAttribute (const FAttribute attr, const float value)
void setIAttribute (const IAttribute attr, const int32_t value)
float getFAttribute (const FAttribute attr) const
int32_t getIAttribute (const IAttribute attr) const
static const std::string & getFAttributeString (const FAttribute attr)
static const std::string & getIAttributeString (const IAttribute attr)

Detailed Description

template<class S, class C, class O, class L, class CV, class N, class V>
class eq::fabric::Config< S, C, O, L, CV, N, V >

Base data class for a configuration.

See also:
eq::Config

Definition at line 33 of file include/eq/fabric/config.h.


Member Enumeration Documentation

template<class S, class C, class O, class L, class CV, class N, class V>
enum eq::fabric::Config::FAttribute

Floating-point attributes.

Enumerator:
FATTR_EYE_BASE 

The default interocular distance in meters.

FATTR_VERSION 

The version of the file loaded.

Definition at line 128 of file include/eq/fabric/config.h.

template<class S, class C, class O, class L, class CV, class N, class V>
enum eq::fabric::Config::IAttribute

Integer attributes.

Enumerator:
IATTR_ROBUSTNESS 

Tolerate resource failures.

Definition at line 137 of file include/eq/fabric/config.h.


Member Function Documentation

template<class S, class C, class O, class L, class CV, class N, class V>
EQFABRIC_INL VisitorResult eq::fabric::Config< S, C, O, L, CV, N, V >::accept ( V &  visitor)

Traverse this config and all children using a config visitor.

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

Const-version of accept().

Version:
1.0
template<class S, class C, class O, class L, class CV, class N, class V>
virtual EQFABRIC_INL uint128_t eq::fabric::Config< S, C, O, L, CV, N, V >::commit ( const uint32_t  incarnation = CO_COMMIT_NEXT) [protected, virtual]

Commit a new version of this object.

Objects using the change type STATIC can not be committed.

Master instances will increment new versions continously, starting at VERSION_FIRST. If the object has not changed, no new version will be generated, that is, the current version is returned. The high value of the returned version will always be 0.

Slave objects can be commited, but have certain caveats for serialization. Please refer to the Programming Guide for more details. Slave object commits will return a random version on a successful commit, or VERSION_NONE if the object has not changed since the last commit. The high value of a successful commit will never be 0.

The incarnation count is meaningful for buffered master objects. The commit implementation will keep all instance data committed with an incarnation count newer than current_incarnation - getAutoObsolete(). By default, each call to commit creates a new incarnation, retaining the data from last getAutoObsolete() commit calls. When the application wishes to auto obsolete by another metric than commit calls, it has to consistently provide an incarnation counter. Buffers with a higher incarnation count than the current are discarded. A typical use case is to tie the auto obsoletion to an application-specific frame loop. Decreasing the incarnation counter will lead to undefined results.

Parameters:
incarnationthe commit incarnation for auto obsoletion.
Returns:
the new head version.

Reimplemented from eq::fabric::Object.

template<class S, class C, class O, class L, class CV, class N, class V>
virtual EQFABRIC_INL void eq::fabric::Config< S, C, O, L, CV, N, 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 S, class C, class O, class L, class CV, class N, class V>
template<typename T >
EQFABRIC_INL T* eq::fabric::Config< S, C, O, L, CV, N, V >::find ( const uint128_t id)
Returns:
the entity of the given identifier, or 0.
Version:
1.0
template<class S, class C, class O, class L, class CV, class N, class V>
template<typename T >
EQFABRIC_INL const T* eq::fabric::Config< S, C, O, L, CV, N, V >::find ( const uint128_t id) const
Returns:
the entity of the given identifier, or 0.
Version:
1.0
template<class S, class C, class O, class L, class CV, class N, class V>
template<typename T >
EQFABRIC_INL T* eq::fabric::Config< S, C, O, L, CV, N, V >::find ( const std::string &  name)
Returns:
the first entity of the given name, or 0.
Version:
1.0
template<class S, class C, class O, class L, class CV, class N, class V>
template<typename T >
EQFABRIC_INL const T* eq::fabric::Config< S, C, O, L, CV, N, V >::find ( const std::string &  name) const
Returns:
the first entity of the given name, or 0.
Version:
1.0
template<class S, class C, class O, class L, class CV, class N, class V>
const Canvases& eq::fabric::Config< S, C, O, L, CV, N, V >::getCanvases ( ) const [inline]
Returns:
the vector of canvases, app-node only.
Version:
1.0

Definition at line 56 of file include/eq/fabric/config.h.

template<class S, class C, class O, class L, class CV, class N, class V>
float eq::fabric::Config< S, C, O, L, CV, N, V >::getFAttribute ( const FAttribute  attr) const [inline]
Returns:
the given floating-point attribute.

Definition at line 152 of file include/eq/fabric/config.h.

template<class S, class C, class O, class L, class CV, class N, class V>
int32_t eq::fabric::Config< S, C, O, L, CV, N, V >::getIAttribute ( const IAttribute  attr) const [inline]
Returns:
the given integer attribute.

Definition at line 156 of file include/eq/fabric/config.h.

template<class S, class C, class O, class L, class CV, class N, class V>
uint32_t eq::fabric::Config< S, C, O, L, CV, N, V >::getLatency ( ) const [inline]
Returns:
the latency of this config.
Version:
1.0

Definition at line 182 of file include/eq/fabric/config.h.

template<class S, class C, class O, class L, class CV, class N, class V>
const Layouts& eq::fabric::Config< S, C, O, L, CV, N, V >::getLayouts ( ) const [inline]
Returns:
the vector of layouts, app-node only.
Version:
1.0

Definition at line 53 of file include/eq/fabric/config.h.

template<class S, class C, class O, class L, class CV, class N, class V>
const Nodes& eq::fabric::Config< S, C, O, L, CV, N, V >::getNodes ( ) const [inline]
Returns:
the vector of nodes instantiated in this process.
Version:
1.0

Definition at line 68 of file include/eq/fabric/config.h.

template<class S, class C, class O, class L, class CV, class N, class V>
const Observers& eq::fabric::Config< S, C, O, L, CV, N, V >::getObservers ( ) const [inline]
Returns:
the vector of observers, app-node only.
Version:
1.0

Definition at line 50 of file include/eq/fabric/config.h.

template<class S, class C, class O, class L, class CV, class N, class V>
EQFABRIC_INL co::base::RefPtr< S > eq::fabric::Config< S, C, O, L, CV, N, V >::getServer ( )
Returns:
the local server proxy.
Version:
1.0
template<class S, class C, class O, class L, class CV, class N, class V>
EQFABRIC_INL co::base::RefPtr< const S > eq::fabric::Config< S, C, O, L, CV, N, V >::getServer ( ) const
Returns:
the local server proxy.
Version:
1.0
template<class S, class C, class O, class L, class CV, class N, class V>
virtual EQFABRIC_INL void eq::fabric::Config< S, C, O, L, CV, N, 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.

Reimplemented in eq::Config.

template<class S, class C, class O, class L, class CV, class N, class V>
virtual EQFABRIC_INL void eq::fabric::Config< S, C, O, L, CV, N, 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 S, class C, class O, class L, class CV, class N, class V>
virtual void eq::fabric::Config< S, C, O, L, CV, N, V >::setLatency ( const uint32_t  latency) [virtual]

Set the maximum accepted latency for this config.

The latency is defined as the maximum number of frames between the start of a frame and the finish of the last rendering task for that frame. Setting the latency of a running config finishes all pending frames.

Parameters:
latencythe latency.
Version:
1.0

Reimplemented in eq::Config.


The documentation for this class was generated from the following file:
Generated on Fri Jun 8 2012 15:44:35 for Equalizer 1.2.1 by  doxygen 1.8.0