Start to simplify Identity.
It seems that this wants to be something like Java's `getClass` and `instanceof` feature. C++'s RTTI can do this too. For now, though, I'm just going to simplify this system to be more readable in "standard" C++ dialects. Then I can figure out what it's doing and how its used.
This commit is contained in:
@ -98,7 +98,7 @@ namespace identity {
|
||||
class IdentifiableObject: public object::Object
|
||||
{
|
||||
private:
|
||||
class Class: public object::Object
|
||||
class Class final: public object::Object
|
||||
{
|
||||
public:
|
||||
Class *parent;
|
||||
@ -112,7 +112,7 @@ private:
|
||||
|
||||
static container::typed::HashTable <object::ConstString,
|
||||
Class> *classesByName;
|
||||
static container::typed::Vector <Class> *classesById;
|
||||
static std::vector< Class * > classesById;
|
||||
static Class *currentlyConstructedClass;
|
||||
|
||||
int classId;
|
||||
@ -137,7 +137,7 @@ public:
|
||||
* \brief Return the name, under which the class of this object was
|
||||
* registered.
|
||||
*/
|
||||
const char *getClassName() { return classesById->get(classId)->className; }
|
||||
const char *getClassName() { return classesById.at( classId )->className; }
|
||||
|
||||
bool instanceOf (int otherClassId);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user