39 #ifndef _ParameteredObject_H
40 #define _ParameteredObject_H
111 void _setDynamic(
bool v);
114 void _removeInputSlot(std::string name);
117 void _removeOutputSlot(std::string name);
120 bool _removeSomething(
const std::string &extension,
const std::string &name);
133 const std::string& extension,
const std::string& name,
134 const std::string& doc,
const std::string&
type,
135 const std::string& defaultValue =
"");
153 const std::string& doc,
const std::string&
type =
"");
167 const std::string& doc,
const T& defVal,
168 const std::string&
type =
"");
192 void _addInputSlot(
Slot& slot,
const std::string& name,
193 const std::string& doc,
const std::string&
type =
"");
201 void _addOutputSlot(
Slot& slot,
const std::string& name,
202 const std::string& doc,
const std::string&
type =
"");
212 void _addInputSlot(
Slot& slot,
const std::string& name,
const std::string& displayname,
213 const std::string& doc,
const std::string&
type);
222 void _addOutputSlot(
Slot& slot,
const std::string& name,
const std::string& displayname,
223 const std::string& doc,
const std::string&
type);
230 void _setTags(
const std::string& tags) ;
244 #define _addFunction(x)\
262 #define _addConstructor(x)\
263 if (!this && new x) {\
277 const std::string& name =
"",
const std::string& doc =
"");
285 std::set<ParameteredObject*> _getTargetNodes();
292 virtual void execute();
299 virtual void finalize();
302 void runPreceeding()
const;
308 void runPreceeding(
const Slot& slot)
const;
311 void _prepareSlots();
353 void clearMetadata();
356 std::string fixCase(
const std::string& parOrSlotName)
const;
373 virtual void initialize();
395 #define PARAMETEREDOBJECT_AVOID_REEXECUTION \
396 sout << "(WW) using deprecated AVOID_REEXECUTION macro" << std::endl;
409 virtual void resetExecuted(
bool propagate =
true);
427 virtual void prepareDynamicInterface(
const ParameterFile& file);
439 return _instanceName;
447 virtual const std::string getTemplateType()
const;
454 Slot* getSlot(
const std::string& slotName)
const;
462 const std::map<std::string, Slot*>& getInputSlots()
const;
469 const std::map<std::string, Slot*>& getOutputSlots()
const;
476 const std::map<std::string, AbstractParameter*>& getParameters()
const;
534 std::set<std::string> getNeighbours()
const;
546 std::set<std::string> getNeighbours(
const ParameterFile& pf)
const;
553 virtual bool connected()
const;
562 void raise(
const std::string& message)
const ;
565 template <
typename T>
566 void setParameter(std::string name, T value);
579 template <
typename T>
591 const std::string& name =
"",
const std::string& doc =
"");
599 #endif // _ParameteredObject_H
virtual const std::string getTemplateType() const
get template type as string
#define charon_DEPRECATED
handle deprecated messages on GCC and MSVC
Interface for a plugin manager.
This class serves to store parameters used within the Charon Project.
build_type
defined build type
#define charon_core_PUBLIC
Preprocessor macro to define this class/function as public visible, i.e.
Parameter object handling.
template_type
Integer which represents a template type.
Base class for serializable objects.
ParameteredObject(const ParameteredObject &)
forbid copying
Declaration of class ParameterFile.
std::map< std::string, Slot * > _inputs
Input slots.
Base class for templated classes derived from ParameteredObject.
Declaration of the abstract class Slot and template classes InputSlot and OutputSlot.
Declaration of the abstract class AbstractParameter and template classes Parameter and ParameterList...
bool _initialized
status of initialization
Implementation of the AbstractParameter interface for one single parameter.
#define charon_core_DLL_PUBLIC
Preprocessor macro to define this class/function as public visible, i.e.
std::map< std::string, AbstractParameter * > _parameters
This vector stores all parameters that have to be saved/restored.
charon_DEPRECATED typedef ParameteredObject::template_type template_type
for transition to ParameteredObject::template_type
std::string _instanceName
Name of the instance.
Dynamic library API import/export prprocessor macros.
Parameter< bool > _active
ParameteredObject activation state.
const std::string & getClassName() const
class name
bool _createMetadata
Specifies if the ParameteredObject should create metadata information.
bool _executed
status of execution (set to true during ParameteredObject::execute())
charon_core_DLL_PUBLIC std::string type(const std::string &typeInfo)
Get type representation.
Commom properties of slot objects.
const std::string & getName() const
instance name
std::map< std::string, Slot * > _outputs
Output slots.
bool executed() const
get execution status
charon_plugins_DLL_PUBLIC int run(int(&method)())
Execute given function and catch exceptions.
virtual void setExecuted(bool value)
set property _executed
std::string _className
Class name.
ParameterFile _metadata
Class tracking.