| Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
| Version 1.9 Build 392 |
|
AipsIO is a class designed to do IO for objects. It stores the data in canonical format using the routines ToLocal and FromLocal.
The output can be written into / read from a filebuf file. This file can be opened by AipsIO (by constructing with a filename) or the user can open the file himself and pass a file descriptor. The file can be opened by the constructor and closed by the destructor, but it can also be done ``manually'' using the open and close routine.
An object is written by writing all its data members. It will be preceeded by a header containing type and version. The IO can be done via the overloaded < < and > > operators to write or read a single item (e.g. an int or an object). These operators are already defined for all built-in data types and for Complex, DComplex, Char*, String and Bool. The write is also defined for SubString.
There are also functions put, get, and getnew to write or read an array of values. These functions are defined for the same data types as < < and > > (so one can write, for example, an array of Strings).
The data must be read back in the same order as it was written.