The main class which stores all game data is the QObject. This class is implemented in the C++ code, but actually is a PyObject-type.
QObjects support caching of certain information. The ID->Pointer will be cached, but also, if a QObject depends on other QObjects, the return of this dependancy can be cached. Therefore, a fully implemented cache invalidation system is needed, in order to clear (and potentially refresh) the obsolete caches.
This class consists of three main parts:
The exact type of the QObject will be stored in the Python-defined part of the object.
A unique identifier number. The ID-number of a QObject uniquely identifies it: there are NO duplicate ID's allowed in a single QuArK session. A table will translate ID's into actual pointers to the corresponding QObject. These pointers can be cached.
In files on disk, ID's will also be used to establish connections between objects. However, obviously these ID's can only be unique within a single file. They will be 'translated' into other ID's that are unique inside the QuArK session when the file is loaded (to avoid collisions).
A set of key-value pairs containing all the information of this object. The value can have different types (see QType). The keys are unique.
A list of all dependencies of this object on any other. Stored by ID.