OpenWalnut  1.2.5
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends
WModule Class Reference

Class representing a single module of OpenWalnut. More...

#include <WModule.h>

+ Inheritance diagram for WModule:

List of all members.

Public Types

typedef std::vector
< boost::shared_ptr
< WModuleInputConnector > > 
InputConnectorList
 The type for the list of input connectors.
typedef std::vector
< boost::shared_ptr
< WModuleOutputConnector > > 
OutputConnectorList
 The type for the list of output connectors.
typedef boost::shared_ptr
< WModule
SPtr
 Shared pointer to a WModule.
typedef boost::shared_ptr
< const WModule
ConstSPtr
 Shared pointer to a const WModule.

Public Member Functions

 WModule ()
 Constructs a new WModule instance.
virtual ~WModule ()
 Destructor.
const InputConnectorListgetInputConnectors () const
 Gives back input connectors.
boost::shared_ptr
< WModuleInputConnector
getInputConnector (std::string name)
 Finds the named connector for the module.
boost::shared_ptr
< WModuleInputConnector
findInputConnector (std::string name)
 Finds the named connector for the module.
const OutputConnectorListgetOutputConnectors () const
 Gives back output connectors.
boost::shared_ptr
< WModuleOutputConnector
getOutputConnector (std::string name)
 Finds the named connector for the module.
boost::shared_ptr
< WModuleOutputConnector
findOutputConnector (std::string name)
 Finds the named connector for the module.
boost::shared_ptr
< WModuleConnector
getConnector (std::string name)
 Finds the named connector for the module.
boost::shared_ptr
< WModuleConnector
findConnector (std::string name)
 Finds the named connector for the module.
boost::shared_ptr< WPropertiesgetProperties () const
 Return a pointer to the properties object of the module.
boost::shared_ptr< WPropertiesgetInformationProperties () const
 Return a pointer to the information properties object of the module.
const WBoolFlagisInitialized () const
 Determines whether the module instance is properly initialized.
const WBoolFlagisUseable () const
 Checks whether the module instance is ready to be used.
const WBoolFlagisAssociated () const
 Checks whether this module is associated with an container.
const WBoolFlagisReady () const
 Checks whether this module is ready.
const WBoolFlagisCrashed () const
 Checks whether this module has been crashed.
const WBoolFlagisReadyOrCrashed () const
 This is the logical or of isReady and isCrashed.
const WBoolFlagisRunning () const
 Returns a flag denoting whether the thread currently is running or nor.
boost::shared_ptr
< WModuleContainer
getAssociatedContainer () const
 The container this module is associated with.
virtual boost::shared_ptr
< WModule
factory () const =0
 Due to the prototype design pattern used to build modules, this method returns a new instance of this method.
virtual boost::signals2::connection subscribeSignal (MODULE_SIGNAL signal, t_ModuleGenericSignalHandlerType notifier)
 Connects a specified notify function with a signal this module instance is offering.
virtual boost::signals2::connection subscribeSignal (MODULE_SIGNAL signal, t_ModuleErrorSignalHandlerType notifier)
 Connects a specified notify function with a signal this module instance is offering.
virtual boost::shared_ptr
< WProgressCombiner
getRootProgressCombiner ()
 Gets the modules base progress.
virtual const char ** getXPMIcon () const
 Get the icon for this module in XPM format.
virtual MODULE_TYPE getType () const
 Gets the type of the module.
void disconnect ()
 Completely disconnects all connected connectors of this module.
WCombinerTypes::WDisconnectList getPossibleDisconnections ()
 Gives a list of all WDisconnectCombiners possible.
void setLocalPath (boost::filesystem::path path)
 Sets the local module path.
boost::filesystem::path getLocalPath () const
 Returns the local path of the module.
bool isDeprecated () const
 Checks whether the module was marked as deprecated.
std::string getDeprecationMessage () const
 Queries the deprecation message of a module if specified.

Protected Types

typedef std::vector
< WRequirement * > 
Requirements
 The type of the requirement list.

Protected Member Functions

virtual void moduleMain ()=0
 Entry point after loading the module.
void threadMain ()
 Thread entry point.
void setAssociatedContainer (boost::shared_ptr< WModuleContainer > container)
 Sets the container this module is associated with.
virtual void connectors ()
 Initialize connectors in this function.
virtual void properties ()
 Initialize properties in this function.
virtual void requirements ()
 Initialize requirements in this function.
virtual std::string deprecated () const
 This function allows module programmers to mark their modules deprecated in a user-friendly way.
void initialize ()
 Manages connector initialization.
virtual void cleanup ()
 Called whenever the module should shutdown.
void addConnector (boost::shared_ptr< WModuleInputConnector > con)
 Adds the specified connector to the list of inputs.
void addConnector (boost::shared_ptr< WModuleOutputConnector > con)
 Adds the specified connector to the list of outputs.
void removeConnectors ()
 Removes all connectors properly.
virtual void activate ()
 Callback for m_active.
virtual const
t_GenericSignalHandlerType 
getSignalHandler (MODULE_CONNECTOR_SIGNAL signal)
 Gives the signal handler function responsible for a given signal.
virtual void notifyConnectionEstablished (boost::shared_ptr< WModuleConnector > here, boost::shared_ptr< WModuleConnector > there)
 Gets called whenever a connector gets connected to the specified input.
virtual void notifyConnectionClosed (boost::shared_ptr< WModuleConnector > here, boost::shared_ptr< WModuleConnector > there)
 Gets called whenever a connection between a remote and local connector gets closed.
virtual void notifyDataChange (boost::shared_ptr< WModuleConnector > input, boost::shared_ptr< WModuleConnector > output)
 Gets called when the data on one input connector changed.
void ready ()
 Call this whenever your module is ready and can react on property changes.
wlog::WStreamedLogger infoLog () const
 Logger instance for comfortable info logging.
wlog::WStreamedLogger debugLog () const
 Logger instance for comfortable debug logging.
wlog::WStreamedLogger warnLog () const
 Logger instance for comfortable warning- logs.
wlog::WStreamedLogger errorLog () const
 Logger instance for comfortable error logging.

Protected Attributes

boost::shared_ptr< WPropertiesm_properties
 The property object for the module.
boost::shared_ptr< WPropertiesm_infoProperties
 The property object for the module containing only module whose purpose is "PV_PURPOSE_INFORMNATION".
boost::shared_ptr
< WProgressCombiner
m_progress
 Progress indicator used as parent for all progress' of this module.
WBoolFlag m_initialized
 True if everything is initialized and ready to be used.
WBoolFlag m_isAssociated
 True if container got associated with this flag.
WBoolFlag m_isUsable
 True if associated && initialized.
WBoolFlag m_isReady
 True if ready() was called.
WBoolFlag m_isCrashed
 True whenever an exception is thrown during moduleMain.
WBoolFlag m_isReadyOrCrashed
 It is true whenever m_isReady or m_isCrashed is true.
WBoolFlag m_isRunning
 True if the module currently is running.
boost::shared_ptr< WProgressm_readyProgress
 Progress indicator for the "ready" state.
WConditionSet m_moduleState
 The internal state of the module.
boost::shared_ptr
< WModuleContainer
m_container
 The container this module belongs to.
InputConnectorList m_inputConnectors
 Set of input connectors associated with this module.
OutputConnectorList m_outputConnectors
 Set of output connectors associated with this module.
WPropBool m_active
 True whenever the module should be active.
WPropString m_runtimeName
 This property holds a user specified name for the current module instance.
boost::filesystem::path m_localPath
 The path where the module binary resides in.
Requirements m_requirements
 The list of requirements.

Private Member Functions

const WRequirementcheckRequirements () const
 This method checks whether all the requirements of the module are complied.

Private Attributes

t_ModuleGenericSignalType signal_ready
 Lock for m_inputConnectors.
t_ModuleErrorSignalType signal_error
 Signal fired whenever a module main thread throws an exception/error.

Friends

class WModuleConnector
class WModuleInputData
class WModuleInputForwardData
class WModuleOutputData
class WModuleFactory
class WModuleContainer

Detailed Description

Class representing a single module of OpenWalnut.

Definition at line 73 of file WModule.h.


Member Typedef Documentation

typedef boost::shared_ptr< const WModule > WModule::ConstSPtr

Shared pointer to a const WModule.

Reimplemented in WDataModule.

Definition at line 115 of file WModule.h.

typedef std::vector< boost::shared_ptr< WModuleInputConnector > > WModule::InputConnectorList

The type for the list of input connectors.

Definition at line 100 of file WModule.h.

typedef std::vector< boost::shared_ptr< WModuleOutputConnector > > WModule::OutputConnectorList

The type for the list of output connectors.

Definition at line 105 of file WModule.h.

typedef std::vector< WRequirement* > WModule::Requirements [protected]

The type of the requirement list.

Definition at line 624 of file WModule.h.

typedef boost::shared_ptr< WModule > WModule::SPtr

Shared pointer to a WModule.

Reimplemented in WDataModule.

Definition at line 110 of file WModule.h.


Constructor & Destructor Documentation

WModule::~WModule ( ) [virtual]

Destructor.

Definition at line 103 of file WModule.cpp.


Member Function Documentation

void WModule::activate ( ) [protected, virtual]

Callback for m_active.

Overwrite this in your modules to handle m_active changes separately.

Definition at line 220 of file WModule.cpp.

Referenced by WModule().

void WModule::addConnector ( boost::shared_ptr< WModuleInputConnector con) [protected]

Adds the specified connector to the list of inputs.

Parameters:
conthe connector.

Definition at line 108 of file WModule.cpp.

References m_inputConnectors, and m_outputConnectors.

Referenced by WModuleImpl::connectors().

void WModule::addConnector ( boost::shared_ptr< WModuleOutputConnector con) [protected]

Adds the specified connector to the list of outputs.

Parameters:
conthe connector.

Definition at line 127 of file WModule.cpp.

References m_inputConnectors, and m_outputConnectors.

const WRequirement * WModule::checkRequirements ( ) const [private]

This method checks whether all the requirements of the module are complied.

Returns:
the requirement that has failed.

Definition at line 506 of file WModule.cpp.

References m_requirements.

Referenced by threadMain().

void WModule::cleanup ( ) [protected, virtual]

Called whenever the module should shutdown.

Definition at line 251 of file WModule.cpp.

References removeConnectors().

void WModule::connectors ( ) [protected, virtual]

Initialize connectors in this function.

This function must not be called multiple times for one module instance. The module container manages calling those functions -> so just implement it.

Reimplemented in WModuleImpl.

Definition at line 208 of file WModule.cpp.

Referenced by initialize().

Logger instance for comfortable debug logging.

Simply use logDebug() << "my debug".

Returns:
the logger stream.

Definition at line 583 of file WModule.cpp.

References wlog::debug(), and WPrototyped::getName().

std::string WModule::deprecated ( ) const [protected, virtual]

This function allows module programmers to mark their modules deprecated in a user-friendly way.

If you implement this function, you need to specify an text which should mention an alternative module.

Notes:
do not add sentences like "this module is deprecated" or similar, since the GUI the user is using already shows this message. The message should say WHY it is deprecated and what alternative module is available.
Returns:
deprecation message

Definition at line 224 of file WModule.cpp.

Referenced by getDeprecationMessage(), and isDeprecated().

Completely disconnects all connected connectors of this module.

This is useful to isolate a module (for deletion, removal from a container and so on.)

Definition at line 146 of file WModule.cpp.

References m_inputConnectors, and m_outputConnectors.

Referenced by removeConnectors(), and threadMain().

Logger instance for comfortable error logging.

Simply use logError() << "my error".

Returns:
the logger stream.

Definition at line 578 of file WModule.cpp.

References wlog::error(), and WPrototyped::getName().

Referenced by WModuleContainer::moduleError().

virtual boost::shared_ptr< WModule > WModule::factory ( ) const [pure virtual]

Due to the prototype design pattern used to build modules, this method returns a new instance of this method.

NOTE: it should never be initialized or modified in some other way. A simple new instance is required.

Returns:
the prototype used to create every module in OpenWalnut.

Implemented in WModuleContainer, and WModuleImpl.

boost::shared_ptr< WModuleConnector > WModule::findConnector ( std::string  name)

Finds the named connector for the module.

This searches for inputs and outputs. This is similar to getConnector but it does not throw an exception if the connector could not be found.

Parameters:
namethe name. This can be a canonical name or the connector name.
Returns:
the connector or NULL if not found.

Definition at line 345 of file WModule.cpp.

References findInputConnector(), and findOutputConnector().

Referenced by getConnector().

boost::shared_ptr< WModuleInputConnector > WModule::findInputConnector ( std::string  name)

Finds the named connector for the module.

This is similar to getInputConnector but it does not throw an exception if the connector could not be found.

Parameters:
namethe name. This can be a canonical name or the connector name.
Returns:
the connector or NULL if not found

Definition at line 286 of file WModule.cpp.

References m_inputConnectors.

Referenced by findConnector(), and getInputConnector().

boost::shared_ptr< WModuleOutputConnector > WModule::findOutputConnector ( std::string  name)

Finds the named connector for the module.

This is similar to getOutputConnector but it does not throw an exception if the connector could not be found.

Parameters:
namethe name. This can be a canonical name or the connector name.
Returns:
the connector or NULL if not found.

Definition at line 315 of file WModule.cpp.

References m_outputConnectors.

Referenced by findConnector(), and getOutputConnector().

boost::shared_ptr< WModuleContainer > WModule::getAssociatedContainer ( ) const

The container this module is associated with.

Returns:
the container.

Definition at line 257 of file WModule.cpp.

References m_container.

boost::shared_ptr< WModuleConnector > WModule::getConnector ( std::string  name)

Finds the named connector for the module.

This searches for inputs and outputs.

Parameters:
namethe name. This can be a canonical name or the connector name.
Returns:
the connector.
Exceptions:
WModuleConnectorNotFoundthrown whenever the module does not provide the specified connector.

Definition at line 358 of file WModule.cpp.

References findConnector(), and WPrototyped::getName().

std::string WModule::getDeprecationMessage ( ) const

Queries the deprecation message of a module if specified.

If not specified, an empty string is returned. Check isDeprecated first.

Returns:
deprecation message

Definition at line 608 of file WModule.cpp.

References deprecated().

boost::shared_ptr< WProperties > WModule::getInformationProperties ( ) const

Return a pointer to the information properties object of the module.

The module intends these properties to not be modified.

Returns:
the properties.

Definition at line 477 of file WModule.cpp.

References m_infoProperties.

boost::shared_ptr< WModuleInputConnector > WModule::getInputConnector ( std::string  name)

Finds the named connector for the module.

Parameters:
namethe name. This can be a canonical name or the connector name.
Returns:
the connector.
Exceptions:
WModuleConnectorNotFoundthrown whenever the module does not provide the specified connector.

Definition at line 302 of file WModule.cpp.

References findInputConnector(), and WPrototyped::getName().

Gives back input connectors.

Returns:
the input connectors.

Definition at line 276 of file WModule.cpp.

References m_inputConnectors.

boost::filesystem::path WModule::getLocalPath ( ) const

Returns the local path of the module.

Whenever you try to load local resources, use this path. It is especially useful for shader loading.

Returns:
the local module path.

Definition at line 598 of file WModule.cpp.

References m_localPath.

boost::shared_ptr< WModuleOutputConnector > WModule::getOutputConnector ( std::string  name)

Finds the named connector for the module.

Parameters:
namethe name. This can be a canonical name or the connector name.
Returns:
the connector.
Exceptions:
WModuleConnectorNotFoundthrown whenever the module does not provide the specified connector.

Definition at line 331 of file WModule.cpp.

References findOutputConnector(), and WPrototyped::getName().

Gives back output connectors.

Returns:
the output connectors.

Definition at line 281 of file WModule.cpp.

References m_outputConnectors.

WCombinerTypes::WDisconnectList WModule::getPossibleDisconnections ( )

Gives a list of all WDisconnectCombiners possible.

Please note that while the list exists, connections might change.

Returns:
the list of possible disconnect operations

Definition at line 161 of file WModule.cpp.

References m_inputConnectors, and m_outputConnectors.

boost::shared_ptr< WProperties > WModule::getProperties ( ) const

Return a pointer to the properties object of the module.

Returns:
the properties.

Definition at line 472 of file WModule.cpp.

References m_properties.

boost::shared_ptr< WProgressCombiner > WModule::getRootProgressCombiner ( ) [virtual]

Gets the modules base progress.

This is actually a progress combiner, which bundles all progresses.

Returns:
the progress combiner for this module.

Definition at line 482 of file WModule.cpp.

References m_progress.

const t_GenericSignalHandlerType WModule::getSignalHandler ( MODULE_CONNECTOR_SIGNAL  signal) [protected, virtual]

Gives the signal handler function responsible for a given signal.

Modules defining own signal handlers should overwrite this function. This function is protected since boost::functions are callable, which is what is not wanted here. Just signals should call them.

Parameters:
signalthe signal to get the handler for.
Returns:
the signal handler for "signal".

Definition at line 400 of file WModule.cpp.

References notifyConnectionClosed(), notifyConnectionEstablished(), and notifyDataChange().

MODULE_TYPE WModule::getType ( ) const [virtual]

Gets the type of the module.

This is useful for FAST differentiation between several modules like standard modules and data modules which play a special role in OpenWalnut/Kernel.

Returns:
the Type. If you do not overwrite this method, it will return MODULE_ARBITRARY.

Reimplemented in WDataModule.

Definition at line 271 of file WModule.cpp.

const char ** WModule::getXPMIcon ( ) const [virtual]

Get the icon for this module in XPM format.

Returns:
The icon.

Definition at line 487 of file WModule.cpp.

wlog::WStreamedLogger WModule::infoLog ( ) const [protected]

Logger instance for comfortable info logging.

Simply use logInfo() << "my info".

Returns:
the logger stream.

Definition at line 573 of file WModule.cpp.

References WPrototyped::getName(), and wlog::info().

Referenced by WModuleContainer::moduleError().

void WModule::initialize ( ) [protected]

Manages connector initialization.

Gets called by module container.

Exceptions:
WModuleConnectorInitFailedif called multiple times.

Definition at line 229 of file WModule.cpp.

References connectors(), WPrototyped::getName(), isInitialized(), m_initialized, m_isAssociated, m_isUsable, m_runtimeName, properties(), and requirements().

const WBoolFlag & WModule::isAssociated ( ) const

Checks whether this module is associated with an container.

Returns:
true if associated.

Definition at line 423 of file WModule.cpp.

References m_isAssociated.

const WBoolFlag & WModule::isCrashed ( ) const

Checks whether this module has been crashed.

This will be true whenever the module throws an unhandled exception.

Returns:
true if there has been an exception during moduleMain().

Definition at line 439 of file WModule.cpp.

References m_isCrashed.

bool WModule::isDeprecated ( ) const

Checks whether the module was marked as deprecated.

Returns:
true if deprecated

Definition at line 603 of file WModule.cpp.

References deprecated().

const WBoolFlag & WModule::isInitialized ( ) const

Determines whether the module instance is properly initialized.

Returns:
true if properly initialized.

Definition at line 418 of file WModule.cpp.

References m_initialized.

Referenced by initialize().

const WBoolFlag & WModule::isReady ( ) const

Checks whether this module is ready.

Returns:
true if ready.

Definition at line 434 of file WModule.cpp.

References m_isReady.

This is the logical or of isReady and isCrashed.

You should use this condition if you need to wait for a module to get ready. If it crashed before ready() got called, you most probably would wait endlessly.

Returns:
isReady || isCrashed.

Definition at line 444 of file WModule.cpp.

References m_isReadyOrCrashed.

const WBoolFlag & WModule::isRunning ( ) const

Returns a flag denoting whether the thread currently is running or nor.

It is also useful to get a callback whenever a module stops.

Returns:
the flag

Definition at line 449 of file WModule.cpp.

References m_isRunning.

const WBoolFlag & WModule::isUseable ( ) const

Checks whether the module instance is ready to be used.

This is the case if isInitialized && isAssociated.

Returns:
isInitialized && isAssociated

Definition at line 428 of file WModule.cpp.

References m_isUsable.

virtual void WModule::moduleMain ( ) [protected, pure virtual]

Entry point after loading the module.

Runs in separate thread.

Implemented in WModuleContainer, and WModuleImpl.

Referenced by threadMain().

void WModule::notifyConnectionClosed ( boost::shared_ptr< WModuleConnector here,
boost::shared_ptr< WModuleConnector there 
) [protected, virtual]

Gets called whenever a connection between a remote and local connector gets closed.

Parameters:
herethe connector of THIS module getting disconnected.
therethe connector of the other module getting disconnected.

Reimplemented in WModuleImpl.

Definition at line 460 of file WModule.cpp.

Referenced by getSignalHandler().

void WModule::notifyConnectionEstablished ( boost::shared_ptr< WModuleConnector here,
boost::shared_ptr< WModuleConnector there 
) [protected, virtual]

Gets called whenever a connector gets connected to the specified input.

Parameters:
herethe connector of THIS module that got connected to "there"
therethe connector that has been connected with the connector "here" of this module.

Reimplemented in WModuleImpl.

Definition at line 454 of file WModule.cpp.

Referenced by getSignalHandler().

void WModule::notifyDataChange ( boost::shared_ptr< WModuleConnector input,
boost::shared_ptr< WModuleConnector output 
) [protected, virtual]

Gets called when the data on one input connector changed.

Parameters:
inputthe input connector receiving the change.
outputthe output connector sending the change notification.

Reimplemented in WModuleImpl.

Definition at line 466 of file WModule.cpp.

Referenced by getSignalHandler().

void WModule::properties ( ) [protected, virtual]

Initialize properties in this function.

This function must not be called multiple times for one module instance. The module container manages calling those functions -> so just implement it. Once initialized the number and type of all properties should be set.

Definition at line 212 of file WModule.cpp.

Referenced by initialize().

void WModule::ready ( ) [protected]

Call this whenever your module is ready and can react on property changes.

Definition at line 499 of file WModule.cpp.

References m_isReady, m_readyProgress, and signal_ready.

Referenced by WModuleContainer::moduleMain().

void WModule::removeConnectors ( ) [protected]

Removes all connectors properly.

It disconnects the connectors and cleans the connectors list.

Definition at line 194 of file WModule.cpp.

References disconnect(), m_initialized, m_inputConnectors, m_isAssociated, m_isUsable, and m_outputConnectors.

Referenced by cleanup().

void WModule::requirements ( ) [protected, virtual]

Initialize requirements in this function.

This function must not be called multiple times for one module instance. The module should always implement this. Using this method, a module can tell the kernel what it needs to run properly. For example, it can require a running graphics engine or, in the case of module containers, other modules.

Definition at line 216 of file WModule.cpp.

Referenced by initialize().

void WModule::setAssociatedContainer ( boost::shared_ptr< WModuleContainer container) [protected]

Sets the container this module is associated with.

Parameters:
containerthe container to associate with.

Definition at line 262 of file WModule.cpp.

References m_container, m_initialized, m_isAssociated, and m_isUsable.

void WModule::setLocalPath ( boost::filesystem::path  path)

Sets the local module path.

This gets called by the module loader.

Parameters:
paththe local path.

Definition at line 593 of file WModule.cpp.

References m_localPath.

boost::signals2::connection WModule::subscribeSignal ( MODULE_SIGNAL  signal,
t_ModuleGenericSignalHandlerType  notifier 
) [virtual]

Connects a specified notify function with a signal this module instance is offering.

Exceptions:
WModuleSignalSubscriptionFailedthrown if the signal can't be connected.
Parameters:
signalthe signal to connect to.
notifierthe notifier function to bind.
Returns:
connection descriptor.

Definition at line 372 of file WModule.cpp.

References signal_ready.

boost::signals2::connection WModule::subscribeSignal ( MODULE_SIGNAL  signal,
t_ModuleErrorSignalHandlerType  notifier 
) [virtual]

Connects a specified notify function with a signal this module instance is offering.

Exceptions:
WModuleSignalSubscriptionFailedthrown if the signal can't be connected.
Parameters:
signalthe signal to connect to.
notifierthe notifier function to bind.
Returns:
connection descriptor.

Definition at line 386 of file WModule.cpp.

References signal_error.

void WModule::threadMain ( ) [protected, virtual]

Thread entry point.

Calls moduleMain and sends error notification if needed.

Reimplemented from WThreadedRunner.

Definition at line 520 of file WModule.cpp.

References WLogger::addLogMessage(), checkRequirements(), disconnect(), wlog::error(), WLogger::getLogger(), WPrototyped::getName(), m_isCrashed, m_isRunning, moduleMain(), signal_error, and WException::what().

wlog::WStreamedLogger WModule::warnLog ( ) const [protected]

Logger instance for comfortable warning- logs.

Simply use logWarning() << "my warning".

Returns:
the logger stream.

Definition at line 588 of file WModule.cpp.

References WPrototyped::getName(), and wlog::warn().


Member Data Documentation

WPropBool WModule::m_active [protected]

True whenever the module should be active.

Definition at line 608 of file WModule.h.

Referenced by WModule().

boost::shared_ptr< WModuleContainer > WModule::m_container [protected]

The container this module belongs to.

Definition at line 593 of file WModule.h.

Referenced by getAssociatedContainer(), setAssociatedContainer(), and WModule().

boost::shared_ptr< WProperties > WModule::m_infoProperties [protected]

The property object for the module containing only module whose purpose is "PV_PURPOSE_INFORMNATION".

It is useful to define some property to only be of informational nature. The GUI does not modify them. As it is a WProperties instance, you can use it the same way as m_properties.

Definition at line 538 of file WModule.h.

Referenced by getInformationProperties(), and WModule().

True if everything is initialized and ready to be used.

Definition at line 548 of file WModule.h.

Referenced by initialize(), isInitialized(), removeConnectors(), and setAssociatedContainer().

Set of input connectors associated with this module.

Definition at line 598 of file WModule.h.

Referenced by addConnector(), disconnect(), findInputConnector(), getInputConnectors(), getPossibleDisconnections(), and removeConnectors().

True if container got associated with this flag.

Definition at line 553 of file WModule.h.

Referenced by initialize(), isAssociated(), removeConnectors(), and setAssociatedContainer().

True whenever an exception is thrown during moduleMain.

Definition at line 568 of file WModule.h.

Referenced by isCrashed(), WModuleContainer::moduleError(), threadMain(), and WModule().

True if ready() was called.

Definition at line 563 of file WModule.h.

Referenced by isReady(), ready(), and WModule().

It is true whenever m_isReady or m_isCrashed is true.

This is mostly useful for functions which need to wait for a module to get ready.

Definition at line 573 of file WModule.h.

Referenced by isReadyOrCrashed(), and WModule().

True if the module currently is running.

Definition at line 578 of file WModule.h.

Referenced by isRunning(), and threadMain().

True if associated && initialized.

Definition at line 558 of file WModule.h.

Referenced by initialize(), isUseable(), removeConnectors(), and setAssociatedContainer().

boost::filesystem::path WModule::m_localPath [protected]

The path where the module binary resides in.

This path should be used whenever the module needs to load resources. It gets set by the module loader. Use this to load shaders and so on.

Definition at line 619 of file WModule.h.

Referenced by getLocalPath(), and setLocalPath().

The internal state of the module.

This is, by default, simply the exit flag from WThreadedRunner.

Definition at line 588 of file WModule.h.

Referenced by WModule().

Set of output connectors associated with this module.

Definition at line 603 of file WModule.h.

Referenced by addConnector(), disconnect(), findOutputConnector(), getOutputConnectors(), getPossibleDisconnections(), and removeConnectors().

boost::shared_ptr< WProgressCombiner > WModule::m_progress [protected]

Progress indicator used as parent for all progress' of this module.

Definition at line 543 of file WModule.h.

Referenced by WModuleContainer::add(), getRootProgressCombiner(), WModuleContainer::remove(), and WModule().

boost::shared_ptr< WProperties > WModule::m_properties [protected]

The property object for the module.

Definition at line 531 of file WModule.h.

Referenced by getProperties(), and WModule().

boost::shared_ptr< WProgress > WModule::m_readyProgress [protected]

Progress indicator for the "ready" state.

Definition at line 583 of file WModule.h.

Referenced by ready(), and WModule().

The list of requirements.

Definition at line 629 of file WModule.h.

Referenced by checkRequirements().

WPropString WModule::m_runtimeName [protected]

This property holds a user specified name for the current module instance.

Definition at line 613 of file WModule.h.

Referenced by initialize(), and WModule().

t_ModuleErrorSignalType WModule::signal_error [private]

Signal fired whenever a module main thread throws an exception/error.

Definition at line 651 of file WModule.h.

Referenced by WModuleContainer::moduleError(), subscribeSignal(), and threadMain().

t_ModuleGenericSignalType WModule::signal_ready [private]

Lock for m_inputConnectors.

Lock for m_outputConnectors. Signal fired whenever a module main thread is ready.

Definition at line 646 of file WModule.h.

Referenced by ready(), and subscribeSignal().


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends