OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WModuleContainerWrapper Class Reference

Encapsulates a module container. More...

#include <WModuleContainerWrapper.h>

+ Collaboration diagram for WModuleContainerWrapper:

Public Member Functions

 WModuleContainerWrapper ()
 Constructor. More...
 
 WModuleContainerWrapper (std::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

std::shared_ptr< WModuleContainerm_mc
 The module container. More...
 

Detailed Description

Encapsulates a module container.

This class is exposed to scripts.

Definition at line 40 of file WModuleContainerWrapper.h.

Constructor & Destructor Documentation

◆ WModuleContainerWrapper() [1/2]

WModuleContainerWrapper::WModuleContainerWrapper ( )

Constructor.

Creates an empty wrapper.

Definition at line 32 of file WModuleContainerWrapper.cpp.

◆ WModuleContainerWrapper() [2/2]

WModuleContainerWrapper::WModuleContainerWrapper ( std::shared_ptr< WModuleContainer mc)
explicit

Constructor.

Parameters
mcThe module container.

Definition at line 37 of file WModuleContainerWrapper.cpp.

◆ ~WModuleContainerWrapper()

WModuleContainerWrapper::~WModuleContainerWrapper ( )

Destructor.

Definition at line 42 of file WModuleContainerWrapper.cpp.

Member Function Documentation

◆ create()

WModuleWrapper WModuleContainerWrapper::create ( std::string const &  name)

Creates a module from the prototype with the given name.

Parameters
nameThe name of the module prototype.
Returns
The module.

Definition at line 46 of file WModuleContainerWrapper.cpp.

References m_mc.

Referenced by createDataModule().

+ Here is the caller graph for this function:

◆ createDataModule()

WModuleWrapper WModuleContainerWrapper::createDataModule ( std::string const &  filename)

Creates a data module and load the file given via filename.

Parameters
filenameThe name of the file to load.
Returns
The module.

Definition at line 52 of file WModuleContainerWrapper.cpp.

References create(), WModuleFactory::getModuleFactory(), and m_mc.

+ Here is the call graph for this function:

◆ remove()

void WModuleContainerWrapper::remove ( WModuleWrapper  module)

Remove a module from the container.

Parameters
moduleThe module to remove.

Definition at line 66 of file WModuleContainerWrapper.cpp.

References WModuleWrapper::getModulePtr(), and m_mc.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_mc

std::shared_ptr< WModuleContainer > WModuleContainerWrapper::m_mc
private

The module container.

Definition at line 85 of file WModuleContainerWrapper.h.

Referenced by create(), createDataModule(), and remove().


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