18 #ifndef EQFABRIC_LAYOUT_H
19 #define EQFABRIC_LAYOUT_H
21 #include <eq/fabric/object.h>
22 #include <eq/fabric/types.h>
37 typedef std::vector< V* >
Views;
57 V* getView(
const ViewPath& path );
60 V* findView(
const std::string& name );
63 LayoutPath getPath()
const;
81 void create( V** view );
82 void release( V* view );
87 EQFABRIC_INL
explicit Layout( C* config );
90 EQFABRIC_INL
virtual ~
Layout();
93 EQFABRIC_INL
virtual void attach(
const uint128_t&
id,
94 const uint32_t instanceID );
97 EQFABRIC_INL
virtual void serialize( co::DataOStream& os,
98 const uint64_t dirtyBits );
100 EQFABRIC_INL
virtual void deserialize( co::DataIStream& is,
101 const uint64_t dirtyBits );
103 EQFABRIC_INL
virtual void notifyDetach();
106 EQFABRIC_INL
virtual void setDirty(
const uint64_t bits );
111 DIRTY_VIEWS = Object::DIRTY_CUSTOM << 0,
112 DIRTY_LAYOUT_BITS = DIRTY_VIEWS | DIRTY_OBJECT_BITS
116 virtual uint64_t getRedistributableBits()
const
117 {
return DIRTY_LAYOUT_BITS; }
129 template<
class,
class,
class >
friend class View;
131 void _addChild( V* view );
132 bool _removeChild( V* view );
135 EQFABRIC_INL
virtual uint128_t commit(
const uint32_t incarnation );
137 template<
class O >
void _removeObserver(
const O* observer );
138 template<
class,
class,
class,
class,
class,
class,
139 class >
friend class Config;
141 typedef co::CommandFunc< Layout< C, L, V > > CmdFunc;
142 bool _cmdNewView( co::ICommand& command );
143 bool _cmdNewViewReply( co::ICommand& command );
146 template<
class C,
class L,
class V >
147 std::ostream& operator << ( std::ostream&, const Layout< C, L, V >& );
150 #endif // EQFABRIC_LAYOUT_H
const C * getConfig() const
EQFABRIC_INL VisitorResult accept(Visitor &visitor)
Traverse this layout and all children using a layout visitor.
A visitor to traverse non-leaf elements and their children in a tree.
std::vector< V * > Views
A vector of pointers to views.
Base data transport class for layouts.
EQFABRIC_INL bool isActive() const
ElementVisitor< L, LeafVisitor< V > > Visitor
The layout visitor type.
Internal base class for all distributed, inheritable Equalizer objects.
EQFABRIC_API Object()
Construct a new Object.
const Views & getViews() const
Get the list of views.