- Timestamp:
- Aug 25, 2006, 12:03:30 AM (18 years ago)
- Location:
- branches/new_class_id/src/lib/lang
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/lang/new_class_id.cc
r9685 r9698 17 17 18 18 #include "new_class_id.h" 19 20 21 NewClassID::NewClassID() 22 { 23 *this = NullClass::classID(); 24 }; 25 26 NewClassID NullClass::_classID; -
branches/new_class_id/src/lib/lang/new_class_id.h
r9691 r9698 14 14 { 15 15 public: 16 NewClassID() : _id(-1), _name("") { };16 NewClassID(); 17 17 NewClassID(int id, const std::string& name) : _id(id), _name(name) { }; 18 18 // the copy constructor is also defined. … … 28 28 29 29 private: 30 int _id;31 std::string _name;30 int _id; 31 std::string _name; 32 32 }; 33 34 class NullClass 35 { 36 public: 37 static NewClassID classID() { return NullClass::_classID; } 38 private: 39 NullClass(); 40 private: 41 static NewClassID _classID; 42 }; 43 33 44 #endif /* _NEW_CLASS_ID_H */ -
branches/new_class_id/src/lib/lang/new_object_list.h
r9696 r9698 120 120 static const NewObjectListBase* const getObjectList(const NewClassID& classID); 121 121 122 static BaseObject* get Object(int classID, const std::string& objectName);123 static BaseObject* get Object(const std::string& className, const std::string& objectName);124 static BaseObject* get Object(const NewClassID& classID, const std::string& objectName);122 static BaseObject* getBaseObject(int classID, const std::string& objectName); 123 static BaseObject* getBaseObject(const std::string& className, const std::string& objectName); 124 static BaseObject* getBaseObject(const NewClassID& classID, const std::string& objectName); 125 125 126 126 virtual BaseObject* getBaseObject(const std::string& name) const = 0;
Note: See TracChangeset
for help on using the changeset viewer.