This section describes the classes used to provide persistence for AcGe entities, and illustrates implementation of persistence. Three classes are used to provide persistence for AcGe entities: AcGeFiler, AcGeLibVersion, and AcGeFileIO.
AcGeFiler is an abstract class encapsulating the interface for the serializing requirements of AcGe. The user must provide an implementation derived from AcGeFiler. In particular, reading and writing of external entities, and all surfaces except AcGePlane, require the dwgFiler() function on AcGeFiler to be implemented.
AcGeLibVersion encapsulates the version of AcGe. It is maintained by the system. The user of AcGe keeps track of the version of AcGe being used through the global variable, AcGe::gLibVersion. All writes and reads of AcGe entities are performed in the context of the version of AcGe being used. Typically, the user must write AcGe::gLibVersion to the file before writing any other AcGe entity (correspondingly, it would be the first AcGe object read from a file in a subsequent read). The following functions are used to write and read this object:
The file I/O functions of AcGe entities are scoped within the AcGeFileIO class. These are a collection of static functions for reading and writing of AcGe entities.