00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TORC_GENERIC_OM_NAMEABLE_HPP
00017 #define TORC_GENERIC_OM_NAMEABLE_HPP
00018
00019 #include "torc/generic/om/DumpRestoreConfig.hpp"
00020
00021
00022 #ifdef GENOM_SERIALIZATION
00023 #include <boost/serialization/access.hpp>
00024 #include <boost/serialization/weak_ptr.hpp>
00025 #endif //GENOM_SERIALIZATION
00026
00027 #include "torc/generic/util/Error.hpp"
00028
00029 namespace torc {
00030
00031 namespace generic {
00032
00033
00034
00035
00036
00037
00038 class Nameable
00039 {
00040 #ifdef GENOM_SERIALIZATION
00041 friend class boost::serialization::access;
00042 #endif
00043
00044 protected:
00045 explicit Nameable();
00046
00047 public:
00048 virtual ~Nameable() throw();
00049
00050 private:
00051 Nameable(const Nameable & source) throw();
00052
00053 Nameable &
00054 operator=(const Nameable & source) throw();
00055
00056 public:
00057
00058
00059
00060
00061
00062 inline virtual const std::string
00063 getName() const throw();
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 void
00083 setName(const std::string & inSource) throw(Error);
00084
00085 private:
00086 #ifdef GENOM_SERIALIZATION
00087 template<class Archive> void
00088 serialize( Archive &ar, unsigned int );
00089 #endif //GENOM_SERIALIZATION
00090
00091 std::string mName;
00092 };
00093
00094
00095
00096
00097
00098
00099 inline const std::string
00100 Nameable::getName() const throw() {
00101 return mName;
00102 }
00103
00104 }
00105
00106 }
00107 #endif // TORC_GENERIC_OM_NAMEABLE_HPP