00001
00002
00003
00004
00005
00006 #ifndef CLASS_H
00007 #define CLASS_H
00008
00009 #include<string>
00010
00011 class DynamicObject;
00012
00019 class Class
00020 {
00021 public:
00023 typedef DynamicObject *(CreateFunction());
00024
00026 static Class *find(const string &name);
00027
00029 static DynamicObject* Create(const string &name);
00030
00033 Class(const string name, const string sup, CreateFunction f);
00034
00036 const string &name() {
00037 return className;
00038 }
00039
00041 DynamicObject *create() {
00042 return createFunction();
00043 }
00044
00046 bool isKindOf(Class *aClass);
00047
00049 bool isKindOf(const string super);
00050
00051 private:
00053 string className;
00054
00056 string super;
00057
00059 CreateFunction *createFunction;
00060 };
00061
00062 #endif