00001 #ifndef RTT_VALUE_TYPE_FACTORY 00002 #define RTT_VALUE_TYPE_FACTORY 00003 00004 #include "../base/DataSourceBase.hpp" 00005 #include "../base/AttributeBase.hpp" 00006 #include "../base/PropertyBase.hpp" 00007 #include "../rtt-config.h" 00008 #include <vector> 00009 #include <string> 00010 00011 namespace RTT 00012 { 00013 namespace types { 00014 00018 class RTT_API ValueFactory 00019 { 00020 public: 00021 virtual ~ValueFactory() {} 00032 virtual base::AttributeBase* buildConstant(std::string name,base::DataSourceBase::shared_ptr, int sizehint) const; 00033 virtual base::AttributeBase* buildConstant(std::string name,base::DataSourceBase::shared_ptr) const = 0; 00039 virtual base::AttributeBase* buildVariable(std::string name,int sizehint) const; 00040 virtual base::AttributeBase* buildVariable(std::string name) const = 0; 00041 00046 virtual base::AttributeBase* buildAlias(std::string name, base::DataSourceBase::shared_ptr b ) const = 0; 00047 00051 virtual base::PropertyBase* buildProperty(const std::string& name, const std::string& desc, base::DataSourceBase::shared_ptr source = 0) const = 0; 00052 00056 virtual base::AttributeBase* buildAttribute(std::string name, base::DataSourceBase::shared_ptr source = 0 ) const = 0; 00057 00061 virtual base::DataSourceBase::shared_ptr buildValue() const = 0; 00062 00066 virtual base::DataSourceBase::shared_ptr buildReference(void* ptr) const = 0; 00067 00073 virtual base::DataSourceBase::shared_ptr buildActionAlias(base::ActionInterface* action, base::DataSourceBase::shared_ptr source) const = 0; 00076 }; 00077 00078 typedef boost::shared_ptr<ValueFactory> ValueFactoryPtr; 00079 } 00080 } 00081 00082 #endif