00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TORC_GENERIC_OM_SINGLEPARAMETER_HPP
00017 #define TORC_GENERIC_OM_SINGLEPARAMETER_HPP
00018
00019 #include "torc/generic/om/PointerTypes.hpp"
00020 #include "torc/generic/om/DumpRestoreConfig.hpp"
00021
00022
00023 #ifdef GENOM_SERIALIZATION
00024 #include <boost/serialization/access.hpp>
00025 #endif //GENOM_SERIALIZATION
00026
00027 #include "torc/generic/om/Parameter.hpp"
00028 #include "torc/generic/om/Scalar.hpp"
00029 #include "torc/generic/om/VisitorType.hpp"
00030 #include "torc/generic/om/FactoryType.hpp"
00031 #include "torc/generic/util/Error.hpp"
00032
00033 namespace torc { namespace generic { class BaseVisitor; } }
00034
00035 namespace torc {
00036
00037 namespace generic {
00038
00039
00040
00041
00042 class SingleParameter
00043 : public Parameter,
00044 public Scalar<Parameter> {
00045 #ifdef GENOM_SERIALIZATION
00046 friend class boost::serialization::access;
00047 #endif //GENOM_SERIALIZATION
00048
00049 friend class FactoryType<SingleParameter>;
00050
00051 public:
00052 typedef VisitorType<SingleParameter> Visitor;
00053
00054
00055
00056
00057 class Factory: public FactoryType<SingleParameter>
00058 {
00059 public:
00060 using FactoryType<SingleParameter>::create;
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 virtual SingleParameterSharedPtr
00072 newSingleParameterPtr( const std::string &inName,
00073 const Value &inValue,
00074 const Unit &inUnit = eUnitUndefined,
00075 const std::string &inOriginalName = std::string()) throw(Error);
00076 };
00077
00078 virtual
00079 ~SingleParameter() throw();
00080
00081
00082
00083
00084
00085
00086
00087 virtual void
00088 accept(BaseVisitor &inoutVisitor) throw(Error);
00089
00090 protected:
00091 SingleParameter();
00092
00093 private:
00094 #ifdef GENOM_SERIALIZATION
00095 template<class Archive> void
00096 serialize( Archive &ar, unsigned int);
00097 #endif //GENOM_SERIALIZATION
00098
00099 };
00100
00101 }
00102
00103 }
00104 #endif // TORC_GENERIC_OM_SINGLEPARAMETER_HPP