SAVE_DEF
List of: Discussion Topic
Subjects: Entity, Extending ACIS
Contents: Application Development Manual

The save_common method is called when saving to storage by any API whose name begins with "api_save_entity_list".

Signature

void MY_ENTITY::save_common(ENTITY_LIST& list) const

Implementation

Implement SAVE_DEF with functions that are declared in kernel/kernutil/fileio/fileio.hxx and have names beginning with "write_". For entity pointers, use write_ptr, which is declared in kernel/kerndata/savres/savres.hxx.

Functions are provided for all the basic types and for some compound types, such as SPAvector and SPAtransf. Other compound types, including user defined structures, should be saved using several calls to save the more basic types. Functions write_logical and write_enum allow the user to specify strings to be saved instead of simple numeric values. This makes the SAT file more human readable. The strings are ignored for binary saves. Function write_ptr is used to save entity pointers. The list is used to map the pointers to an index within the SAT file.

Versioning

ACIS allows an application to save in the format of any lower level ACIS version. The version being saved is stored in the global variable, save_version_number (this can be set with an option). File kernel/kerndata/savres/versions.hxx defines the version when the SAT format changes for any Spatial supplied entities.
PDF/APPDEV/09ENT.PDF
HTM/DATA/ACIS/APPDEV/09ENT/0008.HTM