37 #include "WMTemplateDataLoader.h"
38 #include "core/kernel/WDataModuleInputFile.h"
39 #include "core/kernel/WDataModuleInputFilterFile.h"
40 #include "core/kernel/WKernel.h"
85 return "Template Data Loader";
91 return "Load a dummy file from disk.";
130 std::vector< WDataModuleInputFilter::ConstSPtr > filters;
136 "OpenWalnut Demo File Type"
230 boost::filesystem::path p = inputFile->getFilename();
231 infoLog() <<
"Start Loading from \"" << p.string() <<
"\"";
234 std::shared_ptr< WProgress > progress(
new WProgress(
"Loading" ) );
virtual void wait() const
Wait for the condition.
void setResetable(bool resetable=true, bool autoReset=true)
Sets the resetable flag.
virtual void notify()
Notifies all waiting threads.
Class to encapsulate boost::condition_variable_any.
Base for all data loader modules.
std::shared_ptr< WDataSetScalar > SPtr
shared_ptr abbreviation
virtual void handleInputChange()
Handle a newly set input.
virtual void connectors()
Initialize the connectors this module is using.
WMTemplateDataLoader()
Constuctor.
virtual ~WMTemplateDataLoader()
Destructor.
virtual void load()
This contains the code to load the data.
virtual std::vector< WDataModuleInputFilter::ConstSPtr > getInputFilter() const
Define a list of file filters we support.
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
virtual void properties()
Initialize the properties for this module.
bool m_reload
True if the load function needs to be called.
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.
std::shared_ptr< WModuleOutputData< WDataSetScalar > > m_output
The output connector for the data.
virtual const std::string getName() const
Gives back the name of this module.
virtual const std::string getDescription() const
Gives back a description of this module.
Class offering an instantiate-able data connection between modules.
virtual void properties()
Initialize properties in this function.
wlog::WStreamedLogger debugLog() const
Logger instance for comfortable debug logging.
void ready()
Call this whenever your module is ready and can react on property changes.
WConditionSet m_moduleState
The internal state of the module.
std::shared_ptr< WProgressCombiner > m_progress
Progress indicator used as parent for all progress' of this module.
wlog::WStreamedLogger infoLog() const
Logger instance for comfortable info logging.
virtual void connectors()
Initialize connectors in this function.
void waitRestored()
This method waits for the module to be restored completely.
Class managing progress inside of modules.
WBoolFlag m_shutdownFlag
Condition getting fired whenever the thread should quit.