#include <link.h>
Collaboration diagram for TLinkUpdate:
Public Methods | |
~TLinkUpdate () | |
bool | checkConsistency () |
void | commitUpdate (TLinkable *pNew, const TObjectID &OldID) |
void | deleteUpdateRequest (const TLinkBase *pLink) |
void | requestUpdate (TLinkBase *pLink) |
void | reset () |
Static Public Methods | |
TLinkUpdate * | instance () |
Protected Methods | |
TLinkUpdate () | |
Private Methods | |
void | showMap () |
void | showUpdateList () |
Private Attributes | |
map< TObjectID, TLinkable *> | fMap |
TLinkBaseList | fUpdateList |
Static Private Attributes | |
TLinkUpdate * | fInstance |
For details please read the RFC "Object ID Handling".
|
Calls checkConsistency to ensure that everything is o.k. |
|
Constructor made protected to ensure that the users of this class can only create exactly one instance.
|
|
Checks if the class really updated all links which requested an update. This method should be called after all objects are loaded.
|
|
When a new TLinkable object is read the pointer to the object and the old ID of the object are send to LinkUpdate. These information are then stored in a map. If one of the links in the UpdateList points to the old ID than this link is updated and removed from the list.
|
|
In case the link does not need an update any more the request is deleted from the UpdateList.
|
|
|
|
Requests an update for a link. If Map already provides the needed information the link is immediately updated. Otherwise the pointer is added to the UpdateList and has to wait for the update.
|
|
Resets the class to the initial state. You should know what you are doing! |
|
The global (and unique) instance of TUniverse |
|
A map that stores for all old ID the new pointer to the object. |
|
The list of links which need an update. |