[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
Branch for cell ID experiments
- To: ZZ Development <zzdev@xxxxxxxxxx>
- Subject: Branch for cell ID experiments
- From: "B. Fallenstein" <b.fallenstein@xxxxxx>
- Date: Thu, 05 Jul 2001 00:26:48 +0200
Hi,
I've created a branch in the CVS trunk to experiment with global IDs for
cells: these are needed so that the same cell can always refer to the
same dimension, even in different spaces. The branch is called:
branch_20010704_gid_try
Feel free to take a look, but it doesn't compile yet, and the concepts
aren't even clear. However, a scheme for this is critical for actually
making src/ work, because we need to be able to identify the same a)
dimension b) primitive through the same ID in different spaces, even
when these do not have a common ancestor.
The problem here is that the full ID of a cell is not known when it is
created; however, after the space has been saved, that ID should be
used, so that no ambiguities can be created. The solution is to have
Cell objects point to a Space.Version object, which can be created
without an ID, but assigned an ID at any later time (unless it already
has one assigned). At every time, each Space would have a Space.Version
representing its current version, usually without an assigned ID.
A problem here is with Cells' hashcodes: they must not change when the
version is assigned an ID, yet it would be very inefficient not to
consider the space version ID in the Cells' hashcodes. One possibility
here would be to use random numbers stored in a Hashtable, by space
version ID, in order to ensure space versions of the same ID always have
the same hashcode. Space versions which have not been assigned an ID
would store their random hashcodes inside the object, which is ok since
space versions without assigned IDs are compared by object identity.
(yes, that's probably the way to go here...)
- Benja