18 #ifndef EQFABRIC_LAYOUT_H
19 #define EQFABRIC_LAYOUT_H
21 #include <eq/fabric/object.h>
22 #include <eq/fabric/types.h>
36 typedef std::vector< V* >
Views;
56 V* getView(
const ViewPath& path );
59 V* findView(
const std::string& name );
62 LayoutPath getPath()
const;
80 void create( V** view );
81 void release( V* view );
86 EQFABRIC_INL
Layout( C* config );
89 EQFABRIC_INL
virtual ~
Layout();
92 EQFABRIC_INL
virtual void attach(
const uint128_t&
id,
93 const uint32_t instanceID );
96 EQFABRIC_INL
virtual void serialize( co::DataOStream& os,
97 const uint64_t dirtyBits );
99 EQFABRIC_INL
virtual void deserialize( co::DataIStream& is,
100 const uint64_t dirtyBits );
102 EQFABRIC_INL
virtual void notifyDetach();
105 EQFABRIC_INL
virtual void setDirty(
const uint64_t bits );
110 DIRTY_VIEWS = Object::DIRTY_CUSTOM << 0,
111 DIRTY_LAYOUT_BITS = DIRTY_VIEWS | DIRTY_OBJECT_BITS
115 virtual uint64_t getRedistributableBits()
const
116 {
return DIRTY_LAYOUT_BITS; }
128 template<
class,
class,
class >
friend class View;
130 void _addChild( V* view );
131 bool _removeChild( V* view );
134 EQFABRIC_INL
virtual uint128_t commit(
const uint32_t incarnation );
136 template<
class O >
void _removeObserver(
const O* observer );
137 template<
class,
class,
class,
class,
class,
class,
138 class >
friend class Config;
140 typedef co::CommandFunc< Layout< C, L, V > > CmdFunc;
141 bool _cmdNewView( co::ICommand& command );
142 bool _cmdNewViewReply( co::ICommand& command );
145 template<
class C,
class L,
class V >
146 std::ostream& operator << ( std::ostream&, const Layout< C, L, V >& );
149 #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.