Commit fd7d233b authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - now modules use the same WPrototyped interface as WTransferable

parent a1143245
......@@ -52,14 +52,14 @@ public:
*
* \return the name.
*/
virtual std::string getName() const = 0;
virtual const std::string getName() const = 0;
/**
* Gets the description for this prototype.
*
* \return the description
*/
virtual std::string getDescription() const = 0;
virtual const std::string getDescription() const = 0;
protected:
private:
......
......@@ -60,12 +60,12 @@ boost::shared_ptr< WDataTexture3D > WDataSet::getTexture()
throw WDHException( "This dataset does not provide a texture." );
}
std::string WDataSet::getName() const
const std::string WDataSet::getName() const
{
return "WDataSet";
}
std::string WDataSet::getDescription() const
const std::string WDataSet::getDescription() const
{
return "Encapsulates the whole common feature set of all datasets.";
}
......
......@@ -86,14 +86,14 @@ public:
*
* \return the name.
*/
virtual std::string getName() const;
virtual const std::string getName() const;
/**
* Gets the description for this prototype.
*
* \return the description
*/
virtual std::string getDescription() const;
virtual const std::string getDescription() const;
/**
* Returns a prototype instantiated with the true type of the deriving class.
......
......@@ -82,12 +82,12 @@ const wmath::WFiber& WDataSetFibers::operator[]( const size_t index ) const
return (*m_fibers)[index];
}
std::string WDataSetFibers::getName() const
const std::string WDataSetFibers::getName() const
{
return "WDataSetFibers";
}
std::string WDataSetFibers::getDescription() const
const std::string WDataSetFibers::getDescription() const
{
return "Contains tracked fiber data.";
}
......
......@@ -88,14 +88,14 @@ public:
*
* \return the name.
*/
virtual std::string getName() const;
virtual const std::string getName() const;
/**
* Gets the description for this prototype.
*
* \return the description
*/
virtual std::string getDescription() const;
virtual const std::string getDescription() const;
/**
* Returns a prototype instantiated with the true type of the deriving class.
......
......@@ -37,12 +37,12 @@ WDataSetMultiple::WDataSetMultiple()
// TODO(wiebel): implement this
}
std::string WDataSetMultiple::getName() const
const std::string WDataSetMultiple::getName() const
{
return "WDataSetMultiple";
}
std::string WDataSetMultiple::getDescription() const
const std::string WDataSetMultiple::getDescription() const
{
// TODO(all): write this
return "Please write me.";
......
......@@ -47,14 +47,14 @@ public:
*
* \return the name.
*/
virtual std::string getName() const;
virtual const std::string getName() const;
/**
* Gets the description for this prototype.
*
* \return the description
*/
virtual std::string getDescription() const;
virtual const std::string getDescription() const;
/**
* Returns a prototype instantiated with the true type of the deriving class.
......
......@@ -81,12 +81,12 @@ boost::shared_ptr< WDataTexture3D > WDataSetSingle::getTexture()
return m_texture3D;
}
std::string WDataSetSingle::getName() const
const std::string WDataSetSingle::getName() const
{
return "WDataSetSingle";
}
std::string WDataSetSingle::getDescription() const
const std::string WDataSetSingle::getDescription() const
{
// TODO(all): write this
return "Please write me.";
......
......@@ -101,14 +101,14 @@ public:
*
* \return the name.
*/
virtual std::string getName() const;
virtual const std::string getName() const;
/**
* Gets the description for this prototype.
*
* \return the description
*/
virtual std::string getDescription() const;
virtual const std::string getDescription() const;
/**
* Returns a prototype instantiated with the true type of the deriving class.
......
......@@ -65,12 +65,12 @@ bool WEEG::isTexture() const
return false;
}
std::string WEEG::getName() const
const std::string WEEG::getName() const
{
return "WEEG";
}
std::string WEEG::getDescription() const
const std::string WEEG::getDescription() const
{
return "Contains data acquired using EEG.";
}
......
......@@ -136,14 +136,14 @@ public:
*
* \return the name.
*/
virtual std::string getName() const;
virtual const std::string getName() const;
/**
* Gets the description for this prototype.
*
* \return the description
*/
virtual std::string getDescription() const;
virtual const std::string getDescription() const;
/**
* Returns a prototype instantiated with the true type of the deriving class.
......
......@@ -36,12 +36,12 @@ WRecording::WRecording()
{
}
std::string WRecording::getName() const
const std::string WRecording::getName() const
{
return "WRecording";
}
std::string WRecording::getDescription() const
const std::string WRecording::getDescription() const
{
return "Contains several recorded data, like EEG or FMRT.";
}
......
......@@ -50,14 +50,14 @@ public:
*
* \return the name.
*/
virtual std::string getName() const;
virtual const std::string getName() const;
/**
* Gets the description for this prototype.
*
* \return the description
*/
virtual std::string getDescription() const;
virtual const std::string getDescription() const;
/**
* Returns a prototype instantiated with the true type of the deriving class.
......
......@@ -50,6 +50,7 @@
WModule::WModule():
WThreadedRunner(),
WPrototyped(),
m_initialized( new WCondition(), false ),
m_isAssociated( new WCondition(), false ),
m_isUsable( new WCondition(), false ),
......
......@@ -45,6 +45,7 @@
#include "../common/WLogger.h"
#include "../common/WProperties.h"
#include "../common/WThreadedRunner.h"
#include "../common/WPrototyped.h"
#include "../common/WConditionSet.h"
class WModuleConnector;
......@@ -58,6 +59,7 @@ class WModuleFactory;
* \ingroup kernel
*/
class WModule: public WThreadedRunner,
public WPrototyped,
public boost::enable_shared_from_this< WModule >
{
friend class WModuleConnector; // requires access to notify members
......@@ -77,18 +79,6 @@ public:
*/
virtual ~WModule();
/**
* Gives back the name of this module.
* \return the module's name.
*/
virtual const std::string getName() const = 0;
/**
* Gives back a description of this module.
* \return description to module.
*/
virtual const std::string getDescription() const = 0;
/**
* Gives back input connectors.
*
......
......@@ -70,7 +70,7 @@ public:
*
* \return the name.
*/
virtual std::string getName() const
virtual const std::string getName() const
{
return "WTestTransferableBase";
}
......@@ -80,7 +80,7 @@ public:
*
* \return the description
*/
virtual std::string getDescription() const
virtual const std::string getDescription() const
{
return "Test class for testing transfer of data.";
}
......@@ -146,7 +146,7 @@ public:
*
* \return the name.
*/
virtual std::string getName() const
virtual const std::string getName() const
{
return "WTestTransferableDerived";
}
......@@ -156,7 +156,7 @@ public:
*
* \return the description
*/
virtual std::string getDescription() const
virtual const std::string getDescription() const
{
return "Test class for testing transfer of data.";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment