18 #ifndef EQFABRIC_LAYOUT_H 19 #define EQFABRIC_LAYOUT_H 21 #include <eq/fabric/object.h> 22 #include <eq/fabric/pixelViewport.h> 23 #include <eq/fabric/types.h> 32 template <
class C,
class L,
class V>
48 const Views&
getViews()
const {
return _views; }
56 V* getView(
const ViewPath& path);
59 V* findView(
const std::string& name);
62 LayoutPath getPath()
const;
74 EQFABRIC_INL VisitorResult
accept(Visitor& visitor);
77 EQFABRIC_INL VisitorResult
accept(Visitor& visitor)
const;
97 void create(V** view);
98 void release(V* view);
103 EQFABRIC_INL
explicit Layout(C* config);
106 EQFABRIC_INL
virtual ~Layout();
109 EQFABRIC_INL
virtual void attach(
const uint128_t&
id,
110 const uint32_t instanceID);
113 EQFABRIC_INL
virtual void serialize(co::DataOStream& os,
114 const uint64_t dirtyBits);
116 EQFABRIC_INL
virtual void deserialize(co::DataIStream& is,
117 const uint64_t dirtyBits);
119 EQFABRIC_INL
virtual void notifyDetach();
120 virtual void notifyViewportChanged() {}
122 EQFABRIC_INL
virtual void setDirty(
const uint64_t bits);
127 DIRTY_VIEWS = Object::DIRTY_CUSTOM << 0,
128 DIRTY_VIEWPORT = Object::DIRTY_CUSTOM << 1,
129 DIRTY_LAYOUT_BITS = DIRTY_VIEWS | DIRTY_VIEWPORT | DIRTY_OBJECT_BITS
133 virtual uint64_t getRedistributableBits()
const 135 return DIRTY_LAYOUT_BITS;
147 template <
class,
class,
class>
150 void _addChild(V* view);
151 bool _removeChild(V* view);
154 EQFABRIC_INL
virtual uint128_t commit(
const uint32_t incarnation);
157 void _removeObserver(
const O* observer);
158 template <
class,
class,
class,
class,
class,
class,
class>
161 typedef co::CommandFunc<Layout<C, L, V>> CmdFunc;
162 bool _cmdNewView(co::ICommand& command);
163 bool _cmdNewViewReply(co::ICommand& command);
166 template <
class C,
class L,
class V>
167 std::ostream& operator<<(std::ostream&, const Layout<C, L, V>&);
170 #endif // EQFABRIC_LAYOUT_H ElementVisitor< L, LeafVisitor< V > > Visitor
The layout visitor type.
const C * getConfig() const
EQFABRIC_INL VisitorResult accept(Visitor &visitor)
Traverse this layout and all children using a layout visitor.
EQFABRIC_INL const PixelViewport & getPixelViewport() const
std::vector< V * > Views
A vector of pointers to views.
DirtyBits
The changed parts of the object since the last pack().
A visitor to traverse non-leaf elements and their children in a tree.
Base data transport class for views.
EQFABRIC_INL void setPixelViewport(const PixelViewport &pvp)
Resize the underlying channels to form a layout of the given size.
The Equalizer client library.
Base data transport class for layouts.
Base data class for a configuration.
EQFABRIC_INL bool isActive() const
Internal base class for all distributed, inheritable Equalizer objects.
Holds a 2D pixel viewport with methods for manipulation.
const Views & getViews() const
Get the list of views.