(01-05-2010, 08:34 AM)g4143 Wrote: I just quickly scanned your code...does it provide a method/way to handle pointers values?
No, it just blindly works with the data it is provided. If the data you provide it contains a pointer to something than the function will just blindly write out the pointer as the memory address it is pointing at.
This is just designed to be used with simple structs, and quite frankly shouldn't be used for anything else.
If you want to serialise/parse a class or anything more complicated (like something with member functions) that I would strongly recommend adding serialise/parse functions to your classes that write out data member variable by member variable since it avoids all sorts of issues you can get with this method such as different compilers packing classes in different ways. This method simply exists for the writeGeneric, and readGeneric functions in my data I/O class (a function which I recommend avoiding, and only really use for writing out GUIDs).
The little boat gently drifted across the pond exactly the way a bowling ball wouldn't.