[Home]History of BeeWT

Robo Home | Changes | Preferences | AllPages


Revision 29 . . August 23, 2007 4:24 EST by Voidious [response about WikiTargeting:serialize()]
Revision 28 . . August 22, 2007 23:32 EST by Starrynte [i meant the serialize() on WikiTargeting]
  

Difference (from prior major revision) (no other diffs)

Added: 90a91,99

Ah... The code on the WikiTargeting can't be read back in, unless I'm missing something. I think its only purpose was for diagnostics - to see how many nodes were being used and print some data about them. It also uses a very lengthy ASCII format that you don't need; in Dooki, I use 3 or 4 bytes (can't remember) for each record and write out in binary, while each ASCII character would be a whole byte. To read / write WikiTargeting data, you need to:

* Read and write with (a copy of) the same loop - the same segments in the same order. This way, e.g., the 995th segment in the loop both times is the same segment in your stats.
* For the nodes that you do write out to disk (which is not all of them), write out the segment index as part of the record. When you read back in, you will know where to put it.

A good example of this is in dgun/MainGunHighBuffer.java in Dookious' source code, if you want to take a look. (Parts of it will greatly resemble that WikiTargeting method.)

-- Voidious

Robo Home | Changes | Preferences | AllPages
Search: