eq::net::Base Class Reference

#include <base.h>

Inheritance diagram for eq::net::Base:

Inheritance graph
[legend]

List of all members.


Detailed Description

The base class for all networked objects.

Provides packet dispatch for an object using a command handler table. Handles the result of the command handlers.

Definition at line 29 of file net/base.h.


Public Member Functions

 Base (const Base &from)
const Baseoperator= (const Base &)
 NOP assignment operator.
virtual bool dispatchCommand (Command &command)
 Dispatch a command from the receiver thread to the registered queue.
virtual CommandResult invokeCommand (Command &command)
 Handles a received command packet for this object by calling the appropriate command handler function.

Protected Member Functions

template<typename T>
void registerCommand (const uint32_t command, const CommandFunc< T > &func, CommandQueue *destinationQueue)
 Registers a command member function for a command.
CommandResult _cmdUnknown (Command &command)
 The default handler for handling commands.

Member Function Documentation

const Base& eq::net::Base::operator= ( const Base  )  [inline]

NOP assignment operator.

Definition at line 37 of file net/base.h.

bool eq::net::Base::dispatchCommand ( Command command  )  [virtual]

Dispatch a command from the receiver thread to the registered queue.

Parameters:
command the command.
Returns:
true if the command was dispatch, false if not (command will be dispatched again later)
See also:
registerCommand

Reimplemented in eq::net::Node, and eq::net::Session.

Definition at line 52 of file base.cpp.

References eq::net::Command::getPacket(), and eq::net::Command::isDispatched().

Referenced by eq::net::Session::dispatchCommand(), and eq::net::Node::dispatchCommand().

Here is the call graph for this function:

Here is the caller graph for this function:

CommandResult eq::net::Base::invokeCommand ( Command command  )  [virtual]

Handles a received command packet for this object by calling the appropriate command handler function.

Parameters:
command the command.
Returns:
the result of the operation.
See also:
registerCommand

Reimplemented in eq::net::Node, and eq::net::Session.

Definition at line 86 of file base.cpp.

References eq::net::Command::isDispatched().

Referenced by eq::net::Session::invokeCommand(), and eq::net::Node::invokeCommand().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T>
void eq::net::Base::registerCommand ( const uint32_t  command,
const CommandFunc< T > &  func,
CommandQueue destinationQueue 
) [inline, protected]

Registers a command member function for a command.

If the destination queue is 0, the command function is invoked directly.

Parameters:
command the command.
func the functor to handle the command.
destinationQueue the queue to which the receiver thread dispatches the command.

Definition at line 98 of file net/base.h.

Referenced by eq::Pipe::attachToSession(), eq::FrameData::attachToSession(), eq::Channel::Channel(), eq::Config::Config(), eq::Client::listen(), eq::net::Node::Node(), eq::net::UnbufferedMasterCM::notifyAttached(), eq::net::StaticSlaveCM::notifyAttached(), eq::net::FullSlaveCM::notifyAttached(), eq::net::FullMasterCM::notifyAttached(), eq::net::DeltaMasterCM::notifyAttached(), eq::net::Session::setLocalNode(), and eq::Window::Window().

Here is the caller graph for this function:

CommandResult eq::net::Base::_cmdUnknown ( Command command  )  [protected]

The default handler for handling commands.

Parameters:
command the command
Returns:
the result of the operation.

Definition at line 103 of file base.cpp.

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

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Generated on Sat Dec 6 12:01:50 2008 for Equalizer 0.6 by  doxygen 1.5.5