eq::server::Channel Class Reference

The channel. More...

#include <channel.h>

Inheritance diagram for eq::server::Channel:

Inheritance graph
[legend]
Collaboration diagram for eq::server::Channel:

Collaboration graph
[legend]

List of all members.

Public Types

enum  State {
  STATE_STOPPED = 0, STATE_INITIALIZING, STATE_INIT_SUCCESS, STATE_INIT_FAILED,
  STATE_RUNNING, STATE_EXITING, STATE_EXIT_SUCCESS, STATE_EXIT_FAILED
}

Public Member Functions

 Channel ()
 Constructs a new Channel.
 Channel (const Channel &from, Window *window)
 Constructs a new deep copy of a channel.
virtual ~Channel ()
 Destruct this channel.
State getState () const
void setDrawable (const uint32_t drawable)
uint32_t getDrawable () const
void setOverdraw (const Vector4i &overdraw)
const Vector4igetOverdraw () const
const Vector2igetMaxSize () const
Data Access
ConfiggetConfig ()
const ConfiggetConfig () const
NodegetNode ()
const NodegetNode () const
PipegetPipe ()
const PipegetPipe () const
WindowgetWindow ()
const WindowgetWindow () const
ChannelPath getPath () const
const CompoundVector & getCompounds () const
net::CommandQueuegetServerThreadQueue ()
net::CommandQueuegetCommandThreadQueue ()
VisitorResult accept (ChannelVisitor &visitor)
 Traverse this channel using a channel visitor.
VisitorResult accept (ConstChannelVisitor &) const
void activate ()
 Increase channel activition count.
void deactivate ()
 Decrease channel activition count.
bool isActive () const
void addTasks (const uint32_t tasks)
 Add additional tasks this channel, and all its parents, might potentially execute.
void setOutput (View *view, Segment *segment)
 Set the output view and segment for this channel.
void unsetOutput ()
 Unset the output view and segment for this channel.
const ViewgetView () const
const LayoutgetLayout () const
const SegmentgetSegment () const
void setName (const std::string &name)
const std::string & getName () const
void setPixelViewport (const eq::PixelViewport &pvp)
 Set the channel's pixel viewport wrt its parent window.
const eq::PixelViewportgetPixelViewport () const
 Return this channel's pixel viewport.
void notifyViewportChanged ()
 Notify this channel that the viewport has changed.
void setViewport (const eq::Viewport &vp)
 Set the channel's viewport wrt its parent window.
const eq::ViewportgetViewport () const
 Return this channel's viewport.
void getNearFar (float *nearPlane, float *farPlane) const
 Returns the current near and far planes for this channel.
void setLastDrawCompound (const Compound *compound)
 The last drawing compound for this entity.
const CompoundgetLastDrawCompound () const
Operations
void updateRunning (const uint32_t initID)
 Update (init and exit) this channel as needed.
bool syncRunning ()
 Finalize the last updateRunning changes.
void startConfigExit ()
 Starts exiting this node.
bool syncConfigExit ()
 Synchronize the exit of the node.
bool update (const uint32_t frameID, const uint32_t frameNumber)
 Update one frame.
void send (net::ObjectPacket &packet)
void send (net::ObjectPacket &packet, const std::string &string)
template<typename T >
void send (net::ObjectPacket &packet, const std::vector< T > &data)
Channel listener interface.
void addListener (ChannelListener *listener)
 Register a channel listener.
void removeListener (ChannelListener *listener)
 Deregister a channel listener.
Attributes
void setIAttribute (const eq::Channel::IAttribute attr, const int32_t value)
int32_t getIAttribute (const eq::Channel::IAttribute attr) const
Error information.
const std::string & getErrorMessage () const

Protected Member Functions

virtual void attachToSession (const uint32_t id, const uint32_t instanceID, net::Session *session)

Protected Attributes

base::RequestHandler _requestHandler
 Registers request packets waiting for a return value.

Friends

class Window
std::ostream & operator<< (std::ostream &, const Channel *)


Detailed Description

The channel.

Definition at line 55 of file server/channel.h.


Constructor & Destructor Documentation

Channel::~Channel (  )  [virtual]

Destruct this channel.

Definition at line 124 of file server/channel.cpp.

References EQINFO, and eq::server::Window::removeChannel().

Here is the call graph for this function:


Member Function Documentation

State eq::server::Channel::getState (  )  const [inline]

Returns:
the state of this channel.

Definition at line 86 of file server/channel.h.

References eq::base::Monitor< T >::get().

Here is the call graph for this function:

ChannelPath Channel::getPath (  )  const

Returns:
the index path to this channel.

Definition at line 172 of file server/channel.cpp.

References eq::server::Window::getChannels(), and eq::server::Window::getPath().

Referenced by eq::server::Compound::Compound(), and eq::server::Segment::Segment().

Here is the call graph for this function:

Here is the caller graph for this function:

VisitorResult Channel::accept ( ChannelVisitor visitor  ) 

Traverse this channel using a channel visitor.

Parameters:
visitor the visitor.
Returns:
the result of the visitor traversal.

Definition at line 202 of file server/channel.cpp.

References eq::server::ChannelVisitor::visit().

Here is the call graph for this function:

void Channel::activate (  ) 

Increase channel activition count.

Definition at line 212 of file server/channel.cpp.

References eq::server::Window::activate(), and EQLOG.

Referenced by eq::server::CompoundActivateVisitor::visit().

Here is the call graph for this function:

Here is the caller graph for this function:

void Channel::deactivate (  ) 

Decrease channel activition count.

Definition at line 223 of file server/channel.cpp.

References eq::server::Window::deactivate(), and EQLOG.

Referenced by eq::server::CompoundActivateVisitor::visit().

Here is the call graph for this function:

Here is the caller graph for this function:

bool eq::server::Channel::isActive (  )  const [inline]

Returns:
if this channel is actively used for rendering.

Definition at line 128 of file server/channel.h.

Referenced by eq::server::Compound::isActive(), syncRunning(), eq::server::Window::updateDraw(), and updateRunning().

Here is the caller graph for this function:

void Channel::setOutput ( View view,
Segment segment 
)

Set the output view and segment for this channel.

Definition at line 235 of file server/channel.cpp.

References eq::server::View::addChannel(), and eq::server::Segment::addDestinationChannel().

Referenced by eq::server::Config::addCanvas().

Here is the call graph for this function:

Here is the caller graph for this function:

void Channel::unsetOutput (  ) 

Unset the output view and segment for this channel.

Definition at line 247 of file server/channel.cpp.

References eq::server::View::removeChannel(), and eq::server::Segment::removeDestinationChannel().

Referenced by eq::server::Segment::~Segment().

Here is the call graph for this function:

Here is the caller graph for this function:

const View* eq::server::Channel::getView (  )  const [inline]

const Layout * Channel::getLayout (  )  const

Returns:
the channel's layout.

Definition at line 258 of file server/channel.cpp.

References eq::server::View::getLayout().

Here is the call graph for this function:

const Segment* eq::server::Channel::getSegment (  )  const [inline]

Returns:
the channel's segment.

Definition at line 149 of file server/channel.h.

Referenced by eq::server::Compound::updateFrustum(), eq::server::CompoundInitVisitor::visit(), and eq::server::CompoundExitVisitor::visit().

Here is the caller graph for this function:

void Channel::setPixelViewport ( const eq::PixelViewport pvp  ) 

Set the channel's pixel viewport wrt its parent window.

Parameters:
pvp the viewport in pixels.

Definition at line 289 of file server/channel.cpp.

References eq::Viewport::invalidate(), eq::PixelViewport::isValid(), and notifyViewportChanged().

Here is the call graph for this function:

const eq::PixelViewport& eq::server::Channel::getPixelViewport (  )  const [inline]

Return this channel's pixel viewport.

Returns:
the pixel viewport.

Definition at line 166 of file server/channel.h.

Referenced by eq::server::DFREqualizer::notifyUpdatePre().

Here is the caller graph for this function:

void Channel::notifyViewportChanged (  ) 

Notify this channel that the viewport has changed.

The channel updates the viewport or pixel viewport accordingly.

Definition at line 319 of file server/channel.cpp.

References EQINFO, eq::server::Window::getPixelViewport(), eq::PixelViewport::getSubPVP(), eq::PixelViewport::getSubVP(), eq::PixelViewport::isValid(), eq::PixelViewport::x, and eq::PixelViewport::y.

Referenced by eq::server::Window::addChannel(), eq::server::Window::insertChannel(), setPixelViewport(), and setViewport().

Here is the call graph for this function:

Here is the caller graph for this function:

void Channel::setViewport ( const eq::Viewport vp  ) 

Set the channel's viewport wrt its parent window.

Parameters:
vp the fractional viewport.

Definition at line 304 of file server/channel.cpp.

References eq::Viewport::hasArea(), eq::PixelViewport::invalidate(), and notifyViewportChanged().

Referenced by eq::server::Config::addCanvas().

Here is the call graph for this function:

Here is the caller graph for this function:

const eq::Viewport& eq::server::Channel::getViewport (  )  const [inline]

Return this channel's viewport.

Returns:
the fractional viewport.

Definition at line 187 of file server/channel.h.

Referenced by eq::server::Config::addCanvas(), and eq::server::Compound::updateFrustum().

Here is the caller graph for this function:

void eq::server::Channel::getNearFar ( float *  nearPlane,
float *  farPlane 
) const [inline]

Returns the current near and far planes for this channel.

Parameters:
nearPlane a pointer to store the near plane.
farPlane a pointer to store the far plane.

Definition at line 195 of file server/channel.h.

void eq::server::Channel::setLastDrawCompound ( const Compound compound  )  [inline]

The last drawing compound for this entity.

Definition at line 199 of file server/channel.h.

void Channel::updateRunning ( const uint32_t  initID  ) 

Update (init and exit) this channel as needed.

Definition at line 347 of file server/channel.cpp.

References isActive().

Here is the call graph for this function:

bool Channel::syncRunning (  ) 

Finalize the last updateRunning changes.

Definition at line 359 of file server/channel.cpp.

References isActive().

Referenced by eq::server::Window::syncRunning().

Here is the call graph for this function:

Here is the caller graph for this function:

bool eq::server::Channel::syncConfigExit (  ) 

Synchronize the exit of the node.

Returns:
true if the node exited cleanly, false if not.

bool Channel::update ( const uint32_t  frameID,
const uint32_t  frameNumber 
)

Update one frame.

Parameters:
frameID a per-frame identifier passed to all rendering methods.
frameNumber the number of the frame.
Returns:
true if at least one rendering task was sent.

Definition at line 468 of file server/channel.cpp.

References eq::server::Compound::accept(), EQLOG, eq::server::ChannelUpdateVisitor::isUpdated(), eq::LOG_TASKS, and eq::server::ChannelUpdateVisitor::setEye().

Referenced by eq::server::Window::updateDraw().

Here is the call graph for this function:

Here is the caller graph for this function:

void Channel::addListener ( ChannelListener listener  ) 

Register a channel listener.

Definition at line 529 of file server/channel.cpp.

Referenced by eq::server::DFREqualizer::attach().

Here is the caller graph for this function:

void Channel::removeListener ( ChannelListener listener  ) 

Deregister a channel listener.

Definition at line 538 of file server/channel.cpp.

Referenced by eq::server::DFREqualizer::attach().

Here is the caller graph for this function:

const std::string& eq::server::Channel::getErrorMessage (  )  const [inline]

Returns:
the error message from the last operation.

Definition at line 265 of file server/channel.h.

Referenced by eq::server::Window::syncRunning().

Here is the caller graph for this function:

void Channel::attachToSession ( const uint32_t  id,
const uint32_t  instanceID,
net::Session session 
) [protected, virtual]

See also:
net::Object::attachToSession.

Reimplemented from eq::net::Object.

Definition at line 102 of file server/channel.cpp.

References eq::net::Dispatcher::registerCommand().

Here is the call graph for this function:


Member Data Documentation

Registers request packets waiting for a return value.

Definition at line 281 of file server/channel.h.


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 18:58:45 2009 for Equalizer 0.9 by  doxygen 1.5.8