19 #ifndef EQFABRIC_PIPE_H
20 #define EQFABRIC_PIPE_H
22 #include <eq/fabric/object.h>
23 #include <eq/fabric/pixelViewport.h>
24 #include <eq/fabric/types.h>
31 template<
class N,
class P,
class W,
class V >
class Pipe :
public Object
42 const N*
getNode()
const {
return _node; }
58 uint32_t
getPort()
const {
return _port; }
60 EQFABRIC_INL
void setPort(
const uint32_t port );
75 EQFABRIC_INL
void setDevice(
const uint32_t device );
92 void notifyPixelViewportChanged();
95 EQFABRIC_INL PipePath getPath()
const;
104 EQFABRIC_INL VisitorResult
accept( V& visitor );
107 EQFABRIC_INL VisitorResult
accept( V& visitor )
const;
120 IATTR_ALL = IATTR_LAST + 5
124 EQFABRIC_INL
void setIAttribute(
const IAttribute attr,
125 const int32_t value );
129 {
return _iAttributes[attr]; }
132 bool isThreaded()
const
136 EQFABRIC_INL
static const std::string& getIAttributeString(
142 EQFABRIC_INL
virtual void backup();
143 EQFABRIC_INL
virtual void restore();
144 void create( W** window );
145 void release( W* window );
146 virtual void output( std::ostream& )
const {}
148 EQFABRIC_INL
virtual uint128_t commit(
const uint32_t incarnation =
157 EQFABRIC_INL
virtual ~Pipe( );
159 virtual void attach(
const UUID&
id,
160 const uint32_t instanceID );
162 EQFABRIC_INL
virtual void serialize( co::DataOStream& os,
163 const uint64_t dirtyBits );
165 EQFABRIC_INL
virtual void deserialize( co::DataIStream& is,
166 const uint64_t dirtyBits );
168 EQFABRIC_INL
virtual void notifyDetach();
171 EQFABRIC_INL
virtual void setDirty(
const uint64_t bits );
174 virtual ChangeType getChangeType()
const {
return UNBUFFERED; }
176 W* _findWindow(
const UUID&
id );
180 DIRTY_ATTRIBUTES = Object::DIRTY_CUSTOM << 0,
181 DIRTY_WINDOWS = Object::DIRTY_CUSTOM << 1,
182 DIRTY_PIXELVIEWPORT = Object::DIRTY_CUSTOM << 2,
183 DIRTY_MEMBER = Object::DIRTY_CUSTOM << 3,
185 DIRTY_ATTRIBUTES | DIRTY_WINDOWS | DIRTY_PIXELVIEWPORT |
186 DIRTY_MEMBER | DIRTY_OBJECT_BITS
190 virtual uint64_t getRedistributableBits()
const
191 {
return DIRTY_PIPE_BITS; }
201 int32_t _iAttributes[IATTR_ALL];
219 void _addWindow( W* window );
220 EQFABRIC_INL
bool _removeWindow( W* window );
221 template<
class,
class,
class >
friend class Window;
224 bool _mapNodeObjects() {
return _node->_mapNodeObjects(); }
226 typedef co::CommandFunc< Pipe< N, P, W, V > > CmdFunc;
227 bool _cmdNewWindow( co::ICommand& command );
228 bool _cmdNewWindowReply( co::ICommand& command );
231 template<
class N,
class P,
class W,
class V > EQFABRIC_INL
232 std::ostream& operator << ( std::ostream&, const Pipe< N, P, W, V >& );
236 #endif // EQFABRIC_PIPE_H
Internal base class for all distributed, inheritable Equalizer objects.
Base data transport class for pipes.
IAttribute
Possible values for integer attributes.
const PixelViewport & getPixelViewport() const
EQFABRIC_INL VisitorResult accept(V &visitor)
Perform a depth-first traversal of this pipe.
const Windows & getWindows() const
std::vector< W * > Windows
A vector of pointers to windows.
int32_t getIAttribute(const IAttribute attr) const
EQFABRIC_INL void setPixelViewport(const PixelViewport &pvp)
Set the pipe's pixel viewport.
const N * getNode() const
Holds a 2D pixel viewport with methods for manipulation.
uint32_t getPort() const
Returns the port number of this pipe.
uint32_t getDevice() const
Returns the device number of this pipe.
Bind render thread to subset of cores.
IAttribute
Pipe attributes.
Execute tasks in separate thread (default)