User Manual, Developers Guide and API Documentation

wns::node::component::Interface Class Reference

Components are part of a Node. More...

#include <node/component/Interface.hpp>

Inheritance diagram for wns::node::component::Interface:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void addService (const std::string &name, service::Service *service)
 Add a service.
virtual
wns::probe::bus::ContextProviderCollection
getContextProviderCollection () const
 Retrieve ContextProviderCollection.
virtual std::string getName () const =0
template<typename SERVICETYPE>
SERVICETYPE getRemoteService (const component::FQSN &fqsn) const
 Retrieve a Component by its name (automatic typecast).
template<typename SERVICETYPE>
SERVICETYPE getService (const std::string &serviceName) const
 Retrieve a Component by its name (automatic typecast).
virtual void onNodeCreated ()=0
 Called by the parent node after all components of the parent node have been created.
virtual void onShutdown ()=0
 Called by the parent node after simulation end event occured.
virtual void onWorldCreated ()=0
 Called by the parent node after all nodes have been setup and all components have executed onNodeCreated().
void startup ()
 Called immedeatly after constructor.
virtual ~Interface ()
 Is called in Node's destructor.

Protected Member Functions

virtual void doStartup ()=0
 Virtual backend of startup().
virtual wns::node::InterfacegetNode () const =0


Detailed Description

This is the interface. An implementation of this is available as: Component.

For an overview please see wns::node

Definition at line 52 of file Interface.hpp.


Constructor & Destructor Documentation

virtual wns::node::component::Interface::~Interface (  )  [inline, virtual]

Definition at line 59 of file Interface.hpp.


Member Function Documentation

virtual void wns::node::component::Interface::addService ( const std::string &  name,
service::Service service 
) [inline, virtual]

Definition at line 148 of file Interface.hpp.

virtual void wns::node::component::Interface::doStartup (  )  [protected, pure virtual]

virtual wns::probe::bus::ContextProviderCollection& wns::node::component::Interface::getContextProviderCollection (  )  const [inline, virtual]

Definition at line 157 of file Interface.hpp.

virtual std::string wns::node::component::Interface::getName (  )  const [pure virtual]

Returns:
The name of this component as used in a Node
Note:
This name is used to address Components in a Node

Implemented in wns::node::component::Component, dll::ILayer2, dll::Layer2, and wimac::Component.

virtual wns::node::Interface* wns::node::component::Interface::getNode (  )  const [protected, pure virtual]

Returns:
The Node this Component belongs to.

Implemented in wns::node::component::Component, dll::ILayer2, dll::Layer2, and ofdmaphy::Component.

template<typename SERVICETYPE>
SERVICETYPE wns::node::component::Interface::getRemoteService ( const component::FQSN fqsn  )  const [inline]

Definition at line 139 of file Interface.hpp.

template<typename SERVICETYPE>
SERVICETYPE wns::node::component::Interface::getService ( const std::string &  serviceName  )  const [inline]

Definition at line 129 of file Interface.hpp.

virtual void wns::node::component::Interface::onNodeCreated (  )  [pure virtual]

virtual void wns::node::component::Interface::onShutdown (  )  [pure virtual]

virtual void wns::node::component::Interface::onWorldCreated (  )  [pure virtual]

void wns::node::component::Interface::startup (  )  [inline]

This will be called immedeatly after the constructor has been called. The Component can call virtual methods of itself (e.g. addService) which is forbidden in the constructor. The Component may resolve any dependencies here to other Components!

Todo:
<msg@comnets.rwth-aachen.de> In the future, this function will be able to return a list of functors which contain member functions pointers. These functors can be called by a Component 'Dependency Resolver' to, well, resolve all dependencies.
Note:
If a component is constructed stand-alone (e.g. in a test) this must be called manually to ensure proper initialization of the component.

Definition at line 90 of file Interface.hpp.


The documentation for this class was generated from the following file:

Generated on Sun May 27 03:33:01 2012 for openWNS by  doxygen 1.5.5