|
Archive
The archive group provides four classes;
- VArchive
- VFile
- VResource
- VCache
VArchive is a generalised, dynamically sizing buffer, capable of compression, encryption, CRC and twos compliment checksums. It has serialisation operators overloaded for all the basic language types, has a means of dealing with object pointers and two ways of dealing with abstracted memory blocks. VArchive is used to transfer data between any object and any other object of the same type through the Serialize() function of the absolute base class VObject. In addition it may transfer data to and from file, and from resource (read only).
VFile is a standardised class for dealing simultaneously with files and archives. It is the means by which an archive is sent to (or received from) disk file, in one simple operation.
VResource, much like VFile, is a standardised method of extracting archives from executable and library image files (.dll and .exe) which are merged into the binary at compile time by a resource compiler.
VCache, is an extended capability, which can improve the performance of applications in some circumstances. The cache is designed to be thread safe, and provide a store for objects that are not currently in use. Typically such objects take some time to create from storage (perhaps compressed lookup tables), and repeated creation and destruction of these objects is undesirable. Often it is also undesirable to store these objects conventionally, perhaps it is not known how many such objects might be required. It may also be awkward to control the scope at which one would normally store a reference to an object, cache can help because it is maintained at global scope. Two threads may use an identical object at different times, and cache provides a means of sharing one object rather than having to create two. VCache is a simple "pointer safe" scheme for storing these objects, when they are not in use.
|