eq::server::Window Class Reference

The window. More...

#include <window.h>

Inheritance diagram for eq::server::Window:

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

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

 Window ()
 Constructs a new Window.
 Window (const Window &from, Pipe *pipe)
 Constructs a new deep copy of a window.
void send (net::ObjectPacket &packet)
Data Access
void addChannel (Channel *channel)
 Add a new channel to this window.
void insertChannel (const Channel *position, Channel *channel)
 Insert a new channel after the given channel.
bool removeChannel (Channel *channel)
 Removes a channel from this window.
const ChannelVector & getChannels () const
PipegetPipe ()
const PipegetPipe () const
NodegetNode ()
const NodegetNode () const
ConfiggetConfig ()
const ConfiggetConfig () const
WindowPath getPath () const
ChannelgetChannel (const ChannelPath &path)
const eq::Window::DrawableConfiggetDrawableConfig () const
net::CommandQueuegetServerThreadQueue ()
net::CommandQueuegetCommandThreadQueue ()
State getState () const
VisitorResult accept (WindowVisitor &visitor)
 Traverse this window and all children using a window visitor.
VisitorResult accept (ConstWindowVisitor &) const
void activate ()
 Increase window activition count.
void deactivate ()
 Decrease window activition count.
bool isActive () const
void addTasks (const uint32_t tasks)
 Add additional tasks this window, and all its parents, might potentially execute.
void setName (const std::string &name)
const std::string & getName () const
void setPixelViewport (const eq::PixelViewport &pvp)
 Set the window's pixel viewport wrt its parent pipe.
const eq::PixelViewportgetPixelViewport () const
 Return this window's pixel viewport.
void setViewport (const eq::Viewport &vp)
 Set the window's viewport wrt its parent pipe.
const eq::ViewportgetViewport () const
 Return this window's viewport.
void notifyViewportChanged ()
 Notify this window that the viewport has changed.
net::BarrierjoinSwapBarrier (net::Barrier *barrier)
 Join a swap barrier for the next update.
net::BarrierjoinNVSwapBarrier (const SwapBarrier *swapBarrier, net::Barrier *netBarrier)
 Join a NV_swap_group barrier for the next update.
bool hasNVSwapBarrier () const
void setLastDrawChannel (const Channel *channel)
 The last drawing channel for this entity.
const ChannelgetLastDrawChannel () const
void setMaxFPS (const float fps)
 The maximum frame rate for this window.
float getMaxFPS () const
Operations
void updateRunning (const uint32_t initID)
 Update (init and exit) this window and its children as needed.
bool syncRunning ()
 Finalize the last updateRunning changes.
void updateDraw (const uint32_t frameID, const uint32_t frameNumber)
 Update one frame.
void updatePost (const uint32_t frameID, const uint32_t frameNumber)
 Trigger the post-draw operations.
Attributes
void setIAttribute (const eq::Window::IAttribute attr, const int32_t value)
int32_t getIAttribute (const eq::Window::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 Pipe
std::ostream & operator<< (std::ostream &, const Window *)


Detailed Description

The window.

Definition at line 51 of file server/window.h.


Member Function Documentation

void eq::server::Window::addChannel ( Channel channel  ) 

Add a new channel to this window.

Parameters:
channel the channel.

Definition at line 129 of file server/window.cpp.

References eq::server::Channel::_window, and eq::server::Channel::notifyViewportChanged().

Here is the call graph for this function:

void eq::server::Window::insertChannel ( const Channel position,
Channel channel 
)

Insert a new channel after the given channel.

Parameters:
position the channel after which to insert.
channel the channel to insert.

Definition at line 139 of file server/window.cpp.

References eq::server::Channel::_window, and eq::server::Channel::notifyViewportChanged().

Referenced by eq::server::Channel::Channel().

Here is the call graph for this function:

Here is the caller graph for this function:

bool eq::server::Window::removeChannel ( Channel channel  ) 

Removes a channel from this window.

Parameters:
channel the channel
Returns:
true if the channel was removed, false otherwise.

Definition at line 151 of file server/window.cpp.

References eq::server::Channel::_window.

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

Here is the caller graph for this function:

const ChannelVector& eq::server::Window::getChannels (  )  const [inline]

Returns:
the vector of channels.

Definition at line 105 of file server/window.h.

Referenced by eq::server::Pipe::addWindow(), eq::server::Channel::getPath(), eq::server::Pipe::removeWindow(), and Window().

Here is the caller graph for this function:

WindowPath eq::server::Window::getPath (  )  const

Returns:
the index path to this window.

Definition at line 197 of file server/window.cpp.

References eq::server::Pipe::getPath(), and eq::server::Pipe::getWindows().

Referenced by eq::server::Channel::getPath().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Returns:
the state of this window.

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

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

Here is the call graph for this function:

VisitorResult eq::server::Window::accept ( WindowVisitor visitor  ) 

Traverse this window and all children using a window visitor.

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

Definition at line 265 of file server/window.cpp.

void eq::server::Window::activate (  ) 

Increase window activition count.

Definition at line 275 of file server/window.cpp.

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

Referenced by eq::server::Channel::activate().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::server::Window::deactivate (  ) 

Decrease window activition count.

Definition at line 286 of file server/window.cpp.

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

Referenced by eq::server::Channel::deactivate().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Returns:
if this window is actively used for rendering.

Definition at line 146 of file server/window.h.

Referenced by syncRunning(), eq::server::Pipe::update(), and updateRunning().

Here is the caller graph for this function:

void eq::server::Window::setPixelViewport ( const eq::PixelViewport pvp  ) 

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

Parameters:
pvp the viewport in pixels.

Definition at line 308 of file server/window.cpp.

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

Here is the call graph for this function:

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

Return this window's pixel viewport.

Returns:
the pixel viewport.

Definition at line 169 of file server/window.h.

Referenced by eq::server::Channel::notifyViewportChanged().

Here is the caller graph for this function:

void eq::server::Window::setViewport ( const eq::Viewport vp  ) 

Set the window's viewport wrt its parent pipe.

Parameters:
vp the fractional viewport.

Definition at line 323 of file server/window.cpp.

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

Here is the call graph for this function:

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

Return this window's viewport.

Returns:
the fractional viewport.

Definition at line 183 of file server/window.h.

void eq::server::Window::notifyViewportChanged (  ) 

Notify this window that the viewport has changed.

The window updates the viewport or pixel viewport accordingly.

Definition at line 338 of file server/window.cpp.

References EQINFO, eq::server::Pipe::getPixelViewport(), eq::PixelViewport::getSubPVP(), eq::PixelViewport::getSubVP(), and eq::PixelViewport::hasArea().

Referenced by eq::server::Pipe::addWindow(), setPixelViewport(), and setViewport().

Here is the call graph for this function:

Here is the caller graph for this function:

net::Barrier * eq::server::Window::joinSwapBarrier ( net::Barrier barrier  ) 

Join a swap barrier for the next update.

Parameters:
barrier the net::Barrier for the swap barrier group, or 0 if this is the first window.
Returns:
the net::Barrier for the swap barrier group.

Definition at line 377 of file server/window.cpp.

References _swapBarriers, eq::server::Node::getBarrier(), eq::server::Pipe::getWindows(), and eq::net::Barrier::increase().

Here is the call graph for this function:

net::Barrier * eq::server::Window::joinNVSwapBarrier ( const SwapBarrier swapBarrier,
net::Barrier netBarrier 
)

Join a NV_swap_group barrier for the next update.

Parameters:
swapBarrier the swap barrier containing the NV_swap_group parameters.
netBarrier the net::Barrier to protect the entry from the NV_swap_group , or 0 if this is the first window entering.
Returns:
the net::Barrier for protecting the swap group entry.

Definition at line 429 of file server/window.cpp.

References eq::server::Node::getBarrier(), and eq::net::Barrier::increase().

Here is the call graph for this function:

bool eq::server::Window::hasNVSwapBarrier (  )  const [inline]

Returns:
true if this window has entered a NV_swap_group.

Definition at line 215 of file server/window.h.

void eq::server::Window::setLastDrawChannel ( const Channel channel  )  [inline]

The last drawing channel for this entity.

For internal use only.

Definition at line 218 of file server/window.h.

Referenced by eq::server::ConfigUpdateDataVisitor::visitPost().

Here is the caller graph for this function:

void eq::server::Window::setMaxFPS ( const float  fps  )  [inline]

The maximum frame rate for this window.

For internal use only.

Definition at line 223 of file server/window.h.

void eq::server::Window::updateRunning ( const uint32_t  initID  ) 

Update (init and exit) this window and its children as needed.

Definition at line 472 of file server/window.cpp.

References isActive().

Here is the call graph for this function:

bool eq::server::Window::syncRunning (  ) 

Finalize the last updateRunning changes.

Definition at line 491 of file server/window.cpp.

References eq::server::Channel::getErrorMessage(), eq::server::Channel::getName(), isActive(), and eq::server::Channel::syncRunning().

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

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::server::Window::updateDraw ( 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.

Definition at line 609 of file server/window.cpp.

References EQLOG, eq::server::Channel::isActive(), eq::LOG_TASKS, and eq::server::Channel::update().

Referenced by eq::server::Pipe::update().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::server::Window::updatePost ( const uint32_t  frameID,
const uint32_t  frameNumber 
)

Trigger the post-draw operations.

Parameters:
frameID a per-frame identifier passed to all rendering methods.
frameNumber the number of the frame.

Definition at line 640 of file server/window.cpp.

References EQLOG, and eq::LOG_TASKS.

Referenced by eq::server::Pipe::update().

Here is the caller graph for this function:

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

Returns:
the error message from the last operation.

Definition at line 270 of file server/window.h.

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

Here is the caller graph for this function:

void eq::server::Window::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 110 of file server/window.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 279 of file server/window.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