28 #include "WMWriteDendrogram.h"
29 #include "WMWriteDendrogram.xpm"
30 #include "core/common/WPropertyHelper.h"
31 #include "core/dataHandler/io/WWriterDendrogram.h"
32 #include "core/kernel/WKernel.h"
52 return WMWriteDendrogram_xpm;
57 return "Write Dendrogram";
62 return "Writes Dendrogram";
74 m_savePath =
m_properties->addProperty(
"Save Path",
"Where to save the result", boost::filesystem::path(
"/no/such/file" ) );
virtual void wait() const
Wait for the condition.
virtual void add(std::shared_ptr< WCondition > condition)
Adds another condition to the set of conditions to wait for.
This module writes the Dendrogram.
virtual void properties()
Initialize the properties for this module.
virtual void connectors()
Initialize the connectors this module is using.
virtual std::shared_ptr< WModule > factory() const
Due to the prototype design pattern used to build modules, this method returns a new instance of this...
virtual void moduleMain()
Entry point after loading the module.
WMWriteDendrogram()
Constructs an instance to write Dendrogram to a file.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
virtual const std::string getDescription() const
Gives back a description of this module.
WPropFilename m_savePath
Path where Dendrogram should be stored.
WPropTrigger m_run
Button to start saving.
virtual const std::string getName() const
Gives back the name of this module.
std::shared_ptr< WModuleInputData< const WDendrogram > > m_dendrogramIC
Input connector for writing the Dendrogram.
virtual ~WMWriteDendrogram()
Destructs this instance.
Class representing a single module of OpenWalnut.
virtual void properties()
Initialize properties in this function.
std::shared_ptr< WProperties > m_properties
The property object for the module.
void ready()
Call this whenever your module is ready and can react on property changes.
WConditionSet m_moduleState
The internal state of the module.
wlog::WStreamedLogger infoLog() const
Logger instance for comfortable info logging.
virtual void connectors()
Initialize connectors in this function.
WBoolFlag m_shutdownFlag
Condition getting fired whenever the thread should quit.
Writes a Dendrogram file.
void write(std::shared_ptr< const WDendrogram > dendrogram) const
Writes finaly the given dendrogram to the previously specified file.
@ PV_TRIGGER_TRIGGERED
Trigger property: got triggered.
@ PV_TRIGGER_READY
Trigger property: is ready to be triggered (again)
void addTo(WPropSelection prop)
Add the PC_NOTEMPTY constraint to the property.