00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef LIBCERTI_NAMED_HH
00026 #define LIBCERTI_NAMED_HH
00027
00028 #include <string>
00029
00030 namespace certi {
00031
00041 class Named
00042 {
00043 public:
00048 Named();
00049
00054 Named(const std::string newName);
00055
00060 virtual ~Named();
00061
00066 virtual void setName(const std::string newName);
00067
00072 virtual void setName(const char* newName);
00073
00078 virtual const std::string& getName() const ;
00079
00084 virtual const char *getCName() const ;
00085
00091 bool isNamed(const std::string& newName) const ;
00092
00099 static bool validateHLAName(const std::string& name);
00100
00110 static bool isQualifiedClassName(const std::string& name);
00111
00117 static std::string getNextClassName(std::string& qualifiedClassName);
00118
00124 static std::string getLeafClassName(std::string qualifiedClassName);
00125
00126 class IsNamed {
00127 public:
00128 IsNamed(const std::string named) : named(named) {};
00129 bool operator()(const Named& namedObject) {
00130 return (namedObject.getName() == named);
00131 }
00132 private:
00133 std::string named;
00134 };
00135
00136 protected:
00137
00138 std::string name ;
00139 };
00140
00141 }
00142
00143 #endif // LIBCERTI_NAMED_HH
00144
00145