00001 00041 #ifndef _PERSON_H 00042 #define _PERSON_H 00043 00044 #include "entity.h" 00045 00046 using namespace container; 00047 using namespace std; 00048 00049 namespace container_test { 00050 00059 class Person: public Entity { 00060 public: 00061 00062 const static Info* const TYPE_INFO; 00063 00064 private: 00065 00066 string firstName; 00067 string lastName; 00068 00069 Person(); 00070 00071 public: 00072 00073 Person(string firstName, string lastName); 00074 Person(const Person& orig); 00075 virtual ~Person(); 00076 00077 /********************* Person Methods (public) *********************/ 00078 00079 string getFirstName(); 00080 void setFirstName(string name); 00081 00082 string getLastName(); 00083 void setLastName(string name); 00084 00085 /********************* Entity Methods (public) *********************/ 00086 00087 virtual int compareKeyTo(const Entity& second) const; 00088 00089 protected: 00090 00091 /********************* Entity Methods (protected) *********************/ 00092 00093 virtual string* generateKeyAsString() const; 00094 00095 public: 00096 00097 /********************* Object Methods (public) *********************/ 00098 00099 virtual const Info* typeInfo() const; 00100 00101 virtual Object* clone(bool deepCopy = false) const; 00102 00103 }; 00104 00105 } // namespace container_test 00106 #endif /* _PERSON_H */