OpenWalnut
1.4.0
|
Encapsulates a module container. More...
#include <WModuleContainerWrapper.h>
Public Member Functions | |
WModuleContainerWrapper () | |
Constructor. More... | |
WModuleContainerWrapper (boost::shared_ptr< WModuleContainer > mc) | |
Constructor. More... | |
~WModuleContainerWrapper () | |
Destructor. More... | |
WModuleWrapper | create (std::string const &name) |
Creates a module from the prototype with the given name. More... | |
WModuleWrapper | createDataModule (std::string const &filename) |
Creates a data module and load the file given via filename. More... | |
void | remove (WModuleWrapper module) |
Remove a module from the container. More... | |
Private Attributes | |
boost::shared_ptr< WModuleContainer > | m_mc |
The module container. More... | |
Encapsulates a module container.
This class is exposed to scripts.
Definition at line 43 of file WModuleContainerWrapper.h.
WModuleContainerWrapper::WModuleContainerWrapper | ( | ) |
|
explicit |
Constructor.
mc | The module container. |
Definition at line 36 of file WModuleContainerWrapper.cpp.
WModuleContainerWrapper::~WModuleContainerWrapper | ( | ) |
Destructor.
Definition at line 41 of file WModuleContainerWrapper.cpp.
WModuleWrapper WModuleContainerWrapper::create | ( | std::string const & | name | ) |
Creates a module from the prototype with the given name.
name | The name of the module prototype. |
Definition at line 45 of file WModuleContainerWrapper.cpp.
References m_mc.
WModuleWrapper WModuleContainerWrapper::createDataModule | ( | std::string const & | filename | ) |
Creates a data module and load the file given via filename.
filename | The name of the file to load. |
Definition at line 51 of file WModuleContainerWrapper.cpp.
References WModuleFactory::getModuleFactory(), m_mc, and WDataModule::setSuppressColormaps().
void WModuleContainerWrapper::remove | ( | WModuleWrapper | module | ) |
Remove a module from the container.
module | The module to remove. |
Definition at line 65 of file WModuleContainerWrapper.cpp.
References WModuleWrapper::getModulePtr(), and m_mc.
|
private |
The module container.
Definition at line 88 of file WModuleContainerWrapper.h.
Referenced by create(), createDataModule(), and remove().