00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "torc/generic/om/DumpRestoreConfig.hpp"
00017
00018 #ifndef HAVE_CONFIG_H
00019 #include "torc/generic/config.h"
00020 #endif
00021
00022 #ifdef GENOM_SERIALIZATION
00023 #include <boost/archive/binary_iarchive.hpp>
00024 #include <boost/archive/binary_oarchive.hpp>
00025 #include <boost/serialization/base_object.hpp>
00026 #include <boost/serialization/is_abstract.hpp>
00027 #endif //GENOM_SERIALIZATION
00028
00029 #include "torc/generic/om/Parameter.hpp"
00030
00031 #ifdef GENOM_SERIALIZATION
00032 BOOST_IS_ABSTRACT(
00033 torc::generic::Composite< torc::generic::Parameter > )
00034 #endif //GENOM_SERIALIZATION
00035
00036 namespace torc {
00037
00038 namespace generic {
00039
00040 Parameter::Parameter()
00041 : Composite<Parameter>(),
00042 Nameable(),
00043 Renamable(),
00044 Visitable(),
00045 mValue(),
00046 mUnit( eUnitUndefined ) {
00047 }
00048
00049 Parameter::~Parameter() throw() {
00050 }
00051
00052 void
00053 Parameter::setValue(const Value & inSource) throw() {
00054 mValue = inSource;
00055 }
00056
00057 const Unit
00058 Parameter::getUnit() const throw() {
00059 return mUnit;
00060 }
00061
00062 void
00063 Parameter::setUnit(const Unit & inSource) throw() {
00064 mUnit = inSource;
00065 }
00066
00067 #ifdef GENOM_SERIALIZATION
00068 template<class Archive> void
00069 Parameter::serialize( Archive &ar, unsigned int) {
00070 ar & boost::serialization::base_object< Composite<Parameter> >(
00071 *this );
00072 ar & boost::serialization::base_object< Nameable >( *this );
00073 ar & boost::serialization::base_object<Renamable>( *this );
00074 ar & boost::serialization::base_object< Visitable >( *this );
00075 ar & mValue;
00076 ar & mUnit;
00077 }
00078
00079
00080 template void
00081 Parameter::serialize<boost::archive::binary_oarchive>(
00082 boost::archive::binary_oarchive & ar, const unsigned int);
00083
00084 template void
00085 Parameter::serialize<boost::archive::binary_iarchive>(
00086 boost::archive::binary_iarchive & ar, const unsigned int);
00087
00088 #endif //GENOM_SERIALIZATION
00089
00090 }
00091
00092 }