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