33 #include "WDataModuleInput.h"
34 #include "WDataModuleInputFilter.h"
36 #include "core/common/WProperties.h"
52 typedef std::shared_ptr< WDataModule >
SPtr;
57 typedef std::shared_ptr< const WDataModule >
ConstSPtr;
75 virtual MODULE_TYPE
getType()
const;
102 virtual std::vector< WDataModuleInputFilter::ConstSPtr >
getInputFilter()
const = 0;
130 template<
typename InputType >
131 std::shared_ptr< InputType >
getInputAs()
const;
168 template<
typename InputType >
173 return std::dynamic_pointer_cast< InputType >(
getInput() );
175 return std::shared_ptr< InputType >();
std::shared_ptr< WCondition > SPtr
Shared pointer type for WCondition.
std::shared_ptr< const WCondition > ConstSPtr
Const shared pointer type for WCondition.
Base for all data loader modules.
bool m_suppressColormaps
If true, data modules are instructed to suppress colormap registration.
WDataModuleInput::SPtr m_dataModuleInput
The input this data module should use.
virtual MODULE_TYPE getType() const
Gets the type of the module.
WDataModule()
Default constructor.
std::shared_ptr< InputType > getInputAs() const
Get the currently set input or NULL if none was set.
virtual void handleInputChange()=0
Handle a newly set input.
std::shared_ptr< WDataModule > SPtr
Convenience typedef for a std::shared_ptr< WDataModule >.
WCondition::SPtr m_inputChanged
Condition that fires whenever the input changes via setInput.
WCondition::ConstSPtr getInputChangedCondition() const
Return the condition that gets triggered upon input change.
void reload()
Initiate an reloading of the data.
std::shared_ptr< const WDataModule > ConstSPtr
Convenience typedef for a std::shared_ptr< const WDataModule >.
bool getSuppressColormaps() const
Checks whether suppression of colormaps is active.
virtual std::vector< WDataModuleInputFilter::ConstSPtr > getInputFilter() const =0
Return a list of input filters.
virtual ~WDataModule()
Destructor.
virtual WDataModuleInput::SPtr getInput() const
Get the currently set input or NULL if none was set.
void setInput(WDataModuleInput::SPtr input)
Set the input of this data module.
virtual void setSuppressColormaps(bool suppress=true)
Allows suppression of colormap registration in data modules.
Class representing a single module of OpenWalnut.