19 #ifndef EQFABRIC_NODE_H 20 #define EQFABRIC_NODE_H 22 #include <eq/fabric/object.h> 23 #include <eq/fabric/types.h> 31 template<
class C,
class N,
class P,
class V >
class Node :
public Object 35 typedef std::vector< P* >
Pipes;
46 const Pipes&
getPipes()
const {
return _pipes; }
53 bool isApplicationNode()
const {
return _isAppNode; }
56 EQFABRIC_INL
void setApplicationNode(
const bool isAppNode );
59 EQFABRIC_INL NodePath getPath()
const;
60 P* findPipe(
const uint128_t&
id );
69 EQFABRIC_INL VisitorResult
accept( V& visitor );
72 EQFABRIC_INL VisitorResult
accept( V& visitor )
const;
86 IATTR_ALL = IATTR_LAST + 5
90 EQFABRIC_INL
void setIAttribute(
const IAttribute attr,
91 const int32_t value );
97 static const std::string& getIAttributeString(
const IAttribute attr );
102 EQFABRIC_INL
virtual void backup();
103 EQFABRIC_INL
virtual void restore();
104 void create( P** pipe );
105 void release( P* pipe );
106 virtual void output( std::ostream& )
const {}
107 EQFABRIC_INL
virtual uint128_t commit(
const uint32_t incarnation =
113 explicit Node( C* parent );
116 EQFABRIC_INL
virtual ~
Node();
119 EQFABRIC_INL
virtual void serialize( co::DataOStream& os,
120 const uint64_t dirtyBits );
122 EQFABRIC_INL
virtual void deserialize( co::DataIStream& is,
123 const uint64_t dirtyBits );
125 EQFABRIC_INL
virtual void notifyDetach();
128 EQFABRIC_INL
virtual void setDirty(
const uint64_t bits );
131 virtual ChangeType getChangeType()
const {
return UNBUFFERED; }
135 DIRTY_ATTRIBUTES = Object::DIRTY_CUSTOM << 0,
136 DIRTY_PIPES = Object::DIRTY_CUSTOM << 1,
137 DIRTY_MEMBER = Object::DIRTY_CUSTOM << 2,
139 DIRTY_ATTRIBUTES | DIRTY_PIPES | DIRTY_MEMBER |
144 virtual uint64_t getRedistributableBits()
const 145 {
return DIRTY_NODE_BITS; }
158 int32_t iAttributes[IATTR_ALL];
164 template<
class,
class,
class,
class >
friend class Pipe;
165 void _addPipe( P* pipe );
166 bool _removePipe( P* pipe );
169 bool _mapNodeObjects() {
return _config->mapNodeObjects(); }
172 template<
class C,
class N,
class P,
class V > EQFABRIC_INL
173 std::ostream& operator << ( std::ostream&, const Node< C, N, P, V >& );
177 #endif // EQFABRIC_NODE_H const Pipes & getPipes() const
EQFABRIC_INL int32_t getIAttribute(const IAttribute attr) const
IAttribute
Integer attributes.
DirtyBits
The changed parts of the object since the last pack().
Base data transport class for pipes.
const C * getConfig() const
std::vector< P * > Pipes
A vector of pointers to pipes.
Base data transport class for nodes.
EQFABRIC_INL VisitorResult accept(V &visitor)
Perform a depth-first traversal of this node.
virtual EQFABRIC_INL void setDirty(const uint64_t bits)
The Equalizer client library.
Timeout when auto-launching the node.
Internal base class for all distributed, inheritable Equalizer objects.