api_restore_entity_list
List of: Functions
Subjects: SAT Save and Restore
Contents: Kernel

Action: Restores an entity_list from disk.

Prototype: outcome api_restore_entity_list (


FILE* file_ptr, // open file descriptor


logical text_mode, // TRUE if file is text,




// FALSE if binary


ENTITY_LIST& entities, // returns entities made


AcisOptions* ao = NULL // acis options


);

Includes: #include "kernel/acis.hxx"

#include "kernel/kernapi/api/api.hxx"

#include "kernel/kernapi/api/kernapi.hxx"

#include "kernel/kerndata/lists/lists.hxx"

#include "baseutil/logical.h"

#include "kernel/kernapi/api/acis_options.hxx"

Description: The file pointer is an open file positioned at the point where this API begins the restore entity. When the restore is complete, the file will be correctly positioned at the end of the save entity. This allows an application to restore multiple entities intermixed with other application specific data in a single save file.


Establish the calling routine whether the file is text or binary and set text_mode correctly [TRUE for SAT file or FALSE for SAB (binary) file].


Restoring a binary file is about twice as fast as restoring a text file; however, use binary files only when the file is created and read on the same version of the system running on the same type of machine.


When an entity is restored from a file, any unrecognized main entity types (BODY, CURVE, etc.) are skipped and any references to those entities are set to NULL. Unrecognized descendent entities of ATTRIB, SURFACE, or CURVE generate a new record for their immediate owner class and references to them become references to the new record. If a record for a derived class of ATTRIB is not recognized, an ATTRIB record results so that the chain of attributes for the entity owning the unrecognized attribute remains connected.


It is possible to restore entities made by versions having different sets of attribute classes. Attribute types common to the two versions are restored, but attributes of types unknown to the receiving version are ignored.


A warning is given if the version of the product receiving the model differs from the version that made the save file. It is an error if the current product is older than that recorded in the file. Errors can also occur if you use two different C runtime DLLs (e.g., one release and one debug) when using ACIS. Refer to the "C Runtime Library DLL" section in the Application Development Manual for more details.

Errors: Warning: Version number of this system differs from version that made the save file being read.



Warning: Record for unrecognized entity is being skipped. Unable to read file. Malformed save file.

Library: kernel

Filename: kern/kernel/kernapi/api/kernapi.hxx

Effect: Changes model
PDF/KERN/16FNA.PDF
HTM/DATA/KERN/KERN/16FNA/0132.HTM