|
Classes | |
| class | BinaryFile |
Defines the BinaryFile class for doing ACIS save and restore to binary files. More... | |
| class | FileInfo |
| Contains additional required file header information. More... | |
| class | FileInterface |
| Defines an abstract base class for saving and restoring ACIS ENTITY data. More... | |
| class | restore_def |
| Records an entity type name, a pointer to a restore_data routine for that type of entity, and a link pointer. More... | |
| class | restore_progress_data |
| Class for recording the part restore progress data. More... | |
| class | SabFile |
| Performs save and restore to stream files. More... | |
| class | SatFile |
| Defines the SatFile class for doing ACIS save and restore to stream files in text format. More... | |
| class | TaggedData |
Tracks data and its type for saving and restoring unknown ENTITY types. More... | |
Typedefs | |
| typedef int(* | proc_restore_progress_callback )(restore_progress_data *) |
| Function pointer to implement part restore progress meter. | |
Functions | |
| outcome | api_get_file_info (FileInfo &info) |
| Gets header info from the last restored file. | |
| outcome | api_get_save_version (int &major_version, int &minor_version) |
| Gets the current save file format version. | |
| outcome | api_load_state (FILE *file_ptr, AcisOptions *ao=NULL) |
| Loads the state of global variables from a given text file. | |
| outcome | api_restore_entity_list (FILE *file_ptr, logical text_mode, ENTITY_LIST &entities, AcisOptions *ao=NULL) |
| Restores entities from file. | |
| outcome | api_restore_entity_list_file (FileInterface *file_ptr, ENTITY_LIST &entities, AcisOptions *ao=NULL) |
| Restores entities from a custom input target. | |
| outcome | api_restore_entity_list_with_history (FILE *file_ptr, logical text_mode, ENTITY_LIST &entities, HISTORY_STREAM_LIST &hslist, DELTA_STATE_LIST &dslist, AcisOptions *ao=NULL) |
Restores an ENTITY_LIST from a file with history. | |
| outcome | api_restore_entity_list_with_history_file (FileInterface *file_ptr, ENTITY_LIST &entities, HISTORY_STREAM_LIST &hslist, DELTA_STATE_LIST &dslist, AcisOptions *ao=NULL) |
Restores an ENTITY_LIST from a file. | |
| outcome | api_restore_history (FILE *file_ptr, logical text_mode, HISTORY_STREAM_LIST &hlist, logical create_new_hs=FALSE, AcisOptions *ao=NULL) |
Restores a HISTORY_STREAM and associated entities and ENTITY ID information from a file. | |
| outcome | api_restore_history_file (FileInterface *file_ptr, HISTORY_STREAM_LIST &hlist, logical create_new_hs=FALSE, AcisOptions *ao=NULL) |
Restores a HISTORY_STREAM and associated entities and entity id information from a file. | |
| outcome | api_save_entity_list (FILE *file_ptr, logical text_mode, ENTITY_LIST const &entity_list_save, AcisOptions *ao=NULL) |
| Writes entities to a file in text or binary format. | |
| outcome | api_save_entity_list_file (FileInterface *file_ptr, ENTITY_LIST const &entity_list_save, AcisOptions *ao=NULL) |
| Writes entities to a custom output target. | |
| outcome | api_save_entity_list_with_history (FILE *file_ptr, logical text_mode, ENTITY_LIST const &entity_list, HISTORY_STREAM_LIST &hslist, DELTA_STATE_LIST &dslist, AcisOptions *ao=NULL) |
Writes an ENTITY_LIST to a file as text or in binary mode. | |
| outcome | api_save_entity_list_with_history_file (FileInterface *file_ptr, ENTITY_LIST const &entity_list, HISTORY_STREAM_LIST &hslist, DELTA_STATE_LIST &dslist, logical mainline_only=FALSE, AcisOptions *ao=NULL) |
Writes an ENTITY_LIST to file as text or in binary mode. | |
| outcome | api_save_history (FILE *file_ptr, logical text_mode, HISTORY_STREAM *hs=NULL, logical active_ents_only=FALSE, logical mainline_only=FALSE, AcisOptions *ao=NULL) |
Writes a HISTORY_STREAM and associated entities and entity ID information to a file. | |
| outcome | api_save_history_file (FileInterface *file_ptr, HISTORY_STREAM *hs=NULL, logical active_ents_only=FALSE, logical mainline_only=FALSE, AcisOptions *ao=NULL) |
Writes a HISTORY_STREAM and associated entities and entity id information to a file. | |
| outcome | api_save_state (FILE *file_ptr, AcisOptions *ao=NULL) |
| Saves the current state of global variables into a text file. | |
| outcome | api_save_version (int major_version, int minor_version) |
| Sets the save file format. | |
| outcome | api_set_file_info (unsigned long mask, const FileInfo &info) |
| Sets required header info to be written to ACIS save files. | |
| FileInterface * | GetActiveFile (void) |
| Obtain the currently installed FileInterface. | |
| ENTITY * | read_array (ENTITY *array[], const void *p) |
| Converts ENTITY indices back to pointers; use in FIX_POINTER_DEF. | |
| ENTITY * | read_array (ENTITY *array[], int i) |
| Converts ENTITY indices back to pointers; use in FIX_POINTER_DEF. | |
| TaggedData * | read_data (FileInterface *=NULL) |
| Read a TaggedData item. | |
| int | read_enum (enum_table const &tbl, FileInterface *=NULL) |
| Read an enumeration value. | |
| logical | read_header (int &i1, int &i2, int &i3, int &i4) |
| Read a header. | |
| int | read_id (char *buf, int buflen=0, FileInterface *=NULL) |
| Read an entity identifier. | |
| int | read_int (FileInterface *=NULL) |
| Read an integer. | |
| SPAinterval | read_interval (void) |
| Read an interval. | |
| logical | read_logical (char const *false_str="F", char const *true_str="T", FileInterface *=NULL) |
| Read a logical. | |
| long | read_long (FileInterface *=NULL) |
| Read a long. | |
| SPAmatrix | read_matrix (void) |
Read a SPAmatrix as three row vectors. | |
| SPAposition | read_position (void) |
| Read a position. | |
| ENTITY * | read_ptr (void) |
| Read an ENTITY pointer. | |
| double | read_real (FileInterface *=NULL) |
| Read a double. | |
| int | read_sequence (FileInterface *=NULL) |
| Read an explicit record sequence number. | |
| char * | read_string (int &len) |
| Read a string. | |
| int | read_string (char *buf) |
| Read a string. | |
| logical | read_subtype_end (void) |
| Read a subtype end identifier. | |
| logical | read_subtype_start (void) |
| Read a subtype start identifier. | |
| SPAtransf | read_transf () |
| Reads a transformation. | |
| SPAunit_vector | read_unit_vector (void) |
Read a SPAunit_vector as a vector and then normalize it. | |
| SPAvector | read_vector () |
| Read a vector. | |
| SPAWCHAR_T * | read_wstring (void) |
| Read a wide character string. | |
| void | set_restore_progress_callback (proc_restore_progress_callback callback_func_ptr) |
| Function for setting the restore progress callback pointer. | |
| void | SetActiveFile (FileInterface *fi) |
| Install a new FileInterface. | |
| void | write_data (const TaggedData &td) |
| Write a TaggedData item. | |
| void | write_enum (int val, enum_table const &tbl) |
| Write an enumeration value. | |
| void | write_header (int i1, int i2, int i3, int i4) |
| Write a header. | |
| void | write_id (char const *buf) |
| Write an entity identifier. | |
| void | write_id_level (char const *buf, int level) |
| Write an entity identifier. | |
| void | write_int (int val) |
| Write an integer. | |
| void | write_interval (SPAinterval const &inter) |
| Write an interval. | |
| void | write_literal (char const *buf, int maxlen=0) |
| Write a literal string. | |
| void | write_logical (logical val, char const *false_str="F", char const *true_str="T") |
| Write a logical. | |
| void | write_long (long val) |
| Write a long. | |
| void | write_matrix (SPAmatrix const &matr) |
Write a SPAmatrix as three row vectors. | |
| void | write_position (SPAposition const &pos) |
| Write a position. | |
| void | write_ptr (ENTITY *ent, ENTITY_LIST &list) |
| Write an ENTITY pointer. | |
| void | write_real (double val) |
| Write a double. | |
| void | write_sequence (int num) |
| Write an explicit record sequence number. | |
| void | write_string (char const *buf) |
| Write a string. | |
| void | write_sub_id (char const *buf) |
| Write an entity "sub" identifier. | |
| void | write_subtype_end (void) |
| Write a subtype end identifier. | |
| void | write_subtype_start (void) |
| Write a subtype start identifier. | |
| void | write_transf (SPAtransf const &tr) |
| Write a transformation. | |
| void | write_vector (SPAvector const &vec) |
| Write a vector. | |
| void | write_wstring (const SPAWCHAR_T *wstr) |
| Write a wide character string. | |
| typedef int(* proc_restore_progress_callback)(restore_progress_data *) |
Function pointer to implement part restore progress meter.
Gets header info from the last restored file.
Role: The API fills in a FileInfo class with the header information from the last restored file. It does not alter the model.
The FileInfo class contains the following information:
product_id is a string indicating the product and version which produced the save file. date is a string indicating the date the model was saved (for example, "Fri Feb 9 16:49:43 MST 1996"). units is a double indicating the modeling units. Modeling units are specified as millimeters per unit. acis_version is a string indicating the version of the ACIS libraries used in the product which produced the save file. file_version is the ACIS save file version for which the model was saved (for example, 200). SPAresabs is the distance tolerance in effect when the model was saved. SPAresnor is the normal tolerance in effect when the model was saved. | info | file information returned. |
include <kernapi.hxx>
| outcome api_get_save_version | ( | int & | major_version, | |
| int & | minor_version | |||
| ) |
Gets the current save file format version.
Role: This API gets the output file format version.
Effect: Read-only
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| major_version | major version returned, for example, 21. | |
| minor_version | minor version returned, for example, 0. |
include <kernapi.hxx>
| outcome api_load_state | ( | FILE * | file_ptr, | |
| AcisOptions * | ao = NULL | |||
| ) |
Loads the state of global variables from a given text file.
Role: This API loads the states of global variables such as global options and global tolerances from a given text file. You may use this function with api_save_state to compare the behaviors between your application and Scheme AIDE.
Effect: Read-only
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| file_ptr | file descriptor. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_restore_entity_list | ( | FILE * | file_ptr, | |
| logical | text_mode, | |||
| ENTITY_LIST & | entities, | |||
| AcisOptions * | ao = NULL | |||
| ) |
Restores entities from file.
Role: This function restores the entities from the file stream specified by the file pointer argument to the supplied ENTITY_LIST. The entities are expected to be in text format (SAT) if the text_mode argument is TRUE; otherwise they are expected to be in binary format (SAB). The file pointer should be positioned at the point where the reading should begin. When the restore is complete, the file pointer will be correctly positioned to the end of the restored data. The file pointer is repositioned to the original reading position in the event of an error.
A warning is given when custom entities that are unknown to the system are encountered. These records are restored in entirety as "unknown" entities, but are largely ignored by ACIS operations. 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, at the least an ATTRIB record will result so that the chain of attributes for the entity owning the unrecognized attribute remains connected.
A warning is also given if the version of the product receiving the model is newer than the version that made the save file. It is an error if the current product is older than that recorded in the file.
See the SAT Save and Restore Technical Article for more information.
Errors: Version number of this system is older than the version that made the save file being restored. Malformed save file.
Effect: Changes model
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| file_ptr | open file descriptor. | |
| text_mode | TRUE if file is text, FALSE if binary. Note: the FILE* file_ptr must have been opened in binary mode if the file is binary - i.e., with the extension sab. | |
| entities | returns restored top-level entities. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_restore_entity_list_file | ( | FileInterface * | file_ptr, | |
| ENTITY_LIST & | entities, | |||
| AcisOptions * | ao = NULL | |||
| ) |
Restores entities from a custom input target.
Role: This function restores the entities from the custom input target specified by the FileInterface argument to the supplied ENTITY_LIST. The reading location in the input target should be positioned at the point where the reading should begin. When the restore is complete, the reading location will be correctly positioned to the end of the restored data. The reading location is repositioned to the original reading position in the event of an error.
A warning is given when custom entities that are unknown to the system are encountered. These records are restored in entirety as "unknown" entities, but are largely ignored by ACIS operations. 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, at the least an ATTRIB record will result so that the chain of attributes for the entity owning the unrecognized attribute remains connected.
A warning is also given if the version of the product receiving the model is newer than the version that made the save file. It is an error if the current product is older than that recorded in the file.
See the SAT Save and Restore Technical Article for more information.
Errors: Version number of this system is older than the version that made the save file being restored. Malformed save file.
Effect: Changes model
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| file_ptr | pointer to custom FileInterface object. | |
| entities | returns restored top-level entities. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_restore_entity_list_with_history | ( | FILE * | file_ptr, | |
| logical | text_mode, | |||
| ENTITY_LIST & | entities, | |||
| HISTORY_STREAM_LIST & | hslist, | |||
| DELTA_STATE_LIST & | dslist, | |||
| AcisOptions * | ao = NULL | |||
| ) |
Restores an ENTITY_LIST from a file with history.
Role: 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 in the calling routine whether the file is text or binary type and set text_mode correctly. Restoring a binary file is about twice as fast as restoring a text file.
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.
Application data referring to DELTA_STATEs or HISTORY_STREAMs can be restored using the concepts from the following pseudo code.
class app_data {
DELTA_STATE* ds;
void save(DELTA_STATE_LIST& dslist) {
write_int(dslist.lookup(ds));
}
void restore(DELTA_STATE_LIST& dslist) {
ds = read_int();
}
void fix_pointers(DELTA_STATE_LIST& dslist) {
if( (int) < 0 ) {
ds = NULL;
} else {
ds = dslist[i];
}
}
};
DELTA_STATE_LIST dslist;
HISTORY_STREAM_LIST hslist;
ENTITY_LIST elist;
api_restore_entity_list_with_history
(file, TRUE, elist, hslist,dslist);
foreach(app_data* ap) {
ap->restore(dslist);
}
foreach(app_data* ap) {
ap->fix_pointers(dslist);
} A similar procedure can be used when restoring application data that refers to HISTORY_STREAMs. See api_save_entity_list_with_history for an example of how to save the above app_data. | file_ptr | open file descriptor. | |
| text_mode | TRUE if file is text, FALSE if binary. | |
| entities | returns entities made. | |
| hslist | returns history streams made. | |
| dslist | returns delta states made. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_restore_entity_list_with_history_file | ( | FileInterface * | file_ptr, | |
| ENTITY_LIST & | entities, | |||
| HISTORY_STREAM_LIST & | hslist, | |||
| DELTA_STATE_LIST & | dslist, | |||
| AcisOptions * | ao = NULL | |||
| ) |
Restores an ENTITY_LIST from a file.
Role: 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 in the calling routine whether the file is text or binary mode. Set text_mode correctly. Restoring a binary file is about twice as fast as restoring a text file;
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.
Application data referring to DELTA_STATEs or HISTORY_STREAMs can be restored as in the following pseudo code.
class app_data {
DELTA_STATE* ds;
void save(DELTA_STATE_LIST& dslist) {
write_int(dslist.lookup(ds));
}
void restore(DELTA_STATE_LIST& dslist) {
ds = read_int();
}
void fix_pointers(DELTA_STATE_LIST& dslist) {
if( (int) < 0 ) {
ds = NULL;
} else {
ds = dslist[i];
}
}
};
DELTA_STATE_LIST dslist;
HISTORY_STREAM_LIST hslist;
ENTITY_LIST elist;
api_restore_entity_list_with_history
(file, TRUE, elist, hslist,dslist);
foreach(app_data* ap) {
ap->restore(dslist);
}
foreach(app_data* ap) {
ap->fix_pointers(dslist);
} A similar procedure can be used when restoring application data that refers to HISTORY_STREAMs. See api_save_entity_list_with_history_file for an example of how to save the above app_data | file_ptr | open file descriptor. | |
| entities | returns entities made. | |
| hslist | returns history streams made. | |
| dslist | returns delta states made. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_restore_history | ( | FILE * | file_ptr, | |
| logical | text_mode, | |||
| HISTORY_STREAM_LIST & | hlist, | |||
| logical | create_new_hs = FALSE, |
|||
| AcisOptions * | ao = NULL | |||
| ) |
Restores a HISTORY_STREAM and associated entities and ENTITY ID information from a file.
Role: This routine restores entities and any associated history information from a file. If the file has no history (i.e. it was created using api_save_entity_list) then the create_new_hs flag is examined. If the flag is TRUE, a new history stream is instantiated to hold the created entities. If the flag is FALSE, the entities in the file are created in the default stream. All created HITORY_STREAMs are added to the HISTORY_STREAM_LIST hlist; no change in the HISTORY_STREAM_LIST indicates the file had no history and the entities were placed in the default stream. api_get_active_entities can be called on the streams in hlist to find the entities read in.
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 in the calling routine whether the file is text or binary type. Set text_mode correctly: TRUE if the file is text, FALSE if binary. Restoring a binary file is about twice as fast as restoring a text file.
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: 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.
Effect: Changes model
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| file_ptr | open file descriptor. | |
| text_mode | TRUE if file is text, FALSE if binary. | |
| hlist | restored history streams. | |
| create_new_hs | flag for creating new history stream. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_restore_history_file | ( | FileInterface * | file_ptr, | |
| HISTORY_STREAM_LIST & | hlist, | |||
| logical | create_new_hs = FALSE, |
|||
| AcisOptions * | ao = NULL | |||
| ) |
Restores a HISTORY_STREAM and associated entities and entity id information from a file.
Role: This routine is equivalent to api_restore_history, taking a FileInterface* rather than a FILE*. Please refer to the description of that routine, api_restore_history.
If create_new_hs is set TRUE and the restored file has no history, this function will create a new HISTORY_STREAM.
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.
Effect: Changes model
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| file_ptr | open file descriptor. | |
| hlist | restored history streams. | |
| create_new_hs | flag for creating new history stream. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_save_entity_list | ( | FILE * | file_ptr, | |
| logical | text_mode, | |||
| ENTITY_LIST const & | entity_list_save, | |||
| AcisOptions * | ao = NULL | |||
| ) |
Writes entities to a file in text or binary format.
Role: This function saves the entities contained in the supplied ENTITY_LIST to the file stream specified by the file pointer argument. The entities are stored in text format (SAT) if the text mode argument is true, otherwise they are stored in binary format (SAB). The file pointer should be an open file positioned at the point where the writing should begin. When the save is complete, the file pointer will be correctly positioned to the end of the saved data. The file pointer is repositioned to the original writing position in the event of an error.
See the SAT Save and Restore Technical Article for more information.
Note: Beginning with ACIS release 6.3, it is required that the product ID and units to be populated for the file header (using class FileInfo) before you can save a SAT file. Refer to the reference templates for the class FileInfo and function api_set_file_info for more information. The Technical Article Save and Restore Examples may also be useful.
Errors: Failed to save entities; e.g., unable to write disk file.
Effect: Read-only
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| file_ptr | open file descriptor. | |
| text_mode | TRUE if file is text, FALSE if binary. | |
| entity_list_save | list of entities to save. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_save_entity_list_file | ( | FileInterface * | file_ptr, | |
| ENTITY_LIST const & | entity_list_save, | |||
| AcisOptions * | ao = NULL | |||
| ) |
Writes entities to a custom output target.
Role: This function saves the entities contained in the supplied ENTITY_LIST to the custom output target specified by the FileInterface argument. The writing location in the output target should be positioned at the point where the writing should begin. When the save is complete, the writing location will be correctly positioned to the end of the saved data. The writing location is repositioned to the original position in the event of an error.
See the SAT Save and Restore Technical Article for more information.
Note: Beginning with ACIS release 6.3, it is required that the product ID and units to be populated for the file header (using class FileInfo) before you can save a SAT file. Refer to the reference templates for the class FileInfo and function api_set_file_info for more information. The Technical Article Save and Restore Examples may also be useful.
Errors: Failed to save entities; e.g., unable to write disk file.
Effect: Read-only
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| file_ptr | pointer to custom FileInterface object. | |
| entity_list_save | list of entities to save. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_save_entity_list_with_history | ( | FILE * | file_ptr, | |
| logical | text_mode, | |||
| ENTITY_LIST const & | entity_list, | |||
| HISTORY_STREAM_LIST & | hslist, | |||
| DELTA_STATE_LIST & | dslist, | |||
| AcisOptions * | ao = NULL | |||
| ) |
Writes an ENTITY_LIST to a file as text or in binary mode.
Role: The file pointer argument should be an open file positioned at the point where this API begins the entity save. When the save is complete, the file will be correctly positioned at the end of the entity save; therefore, an application can save multiple bodies intermixed with other application specific data in a single save file.
The entities are written to the file as a sequence of records, one per model entity. Writing records in binary is roughly twice as fast as writing in text and the files are some 20 percent shorter however, use binary save files only for short-term storage. Write and read binary files only by the same version running on the same type of hardware.
Each entity record begins with a string identifier denoting its type. When a file is restored, records of unrecognized derived classes will be ignored.
The floating point precision for real numbers in text files is six digits for single precision and 15 digits for double precision.
History data is saved after active entities in a form allowing api_restore_entity_list to restore without history if desired.
The returned dslist can be used by the application to map DELTA_STATE pointers to unique integers and back again during save and restore to maintain an association between DELTA_STATEs and application data. For example, one might use the following pseudo code:
class app_data {
DELTA_STATE* ds;
void save(DELTA_STATE_LIST& dslist) {
write_int(dslist.lookup(ds));
}
void restore(DELTA_STATE_LIST& dslist) {
ds = read_int();
}
void fix_pointers(DELTA_STATE_LIST& dslist) {
if( (int) < 0 ) {
ds = NULL;
} else {
ds = dslist[i];
}
}
};
DELTA_STATE_LIST dslist; HISTORY_STREAM_LIST hslist; ENTITY_LIST elist; elist.add(entity_to_save); api_save_entity_list_with_history (file, TRUE, elist, hslist,dslist);
foreach(app_data* ap) {
ap->save(dslist);
} See api_restore_entity_list_with_history for an example of how to restore the above app_data HISTORY_STREAMs attached via an ATTRIB_HISTORY. In this case the hslist would be larger on return than on entry. The returned list can be used as with the dslist when saving application data. FileInfo) before you can save a SAT file. Refer to the reference templates for the class FileInfo and function api_set_file_info for more information. | file_ptr | open file descriptor. | |
| text_mode | TRUE if file is text, FALSE if binary. | |
| const&entity_list | entities to save. | |
| hslist | history streams to save. | |
| dslist | returns delta states saved. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_save_entity_list_with_history_file | ( | FileInterface * | file_ptr, | |
| ENTITY_LIST const & | entity_list, | |||
| HISTORY_STREAM_LIST & | hslist, | |||
| DELTA_STATE_LIST & | dslist, | |||
| logical | mainline_only = FALSE, |
|||
| AcisOptions * | ao = NULL | |||
| ) |
Writes an ENTITY_LIST to file as text or in binary mode.
Role: The file pointer argument should describe an open file positioned at the point where this API begins the entity save. When the save is complete, the file will be correctly positioned at the end of the entity save; therefore, an application can save multiple bodies intermixed with other application specific data in a single save file.
The entities are written to the file as a sequence of records, one per model entity. Writing records in binary is roughly twice as fast as writing in text and the files are some 20 percent shorter however, use binary save files only for short-term storage. Write and read binary files only by the same version running on the same type of hardware.
Each entity record begins with a string identifier denoting its type. When a file is restored, records of unrecognized derived classes will be ignored.
The floating point precision for real numbers in text files is six digits for single precision and 15 digits for double precision.
History data is saved after active entities in a form allowing api_restore_entity_list to restore without history if desired.
The returned dslist can be used by the application to map DELTA_STATE pointers to unique integers and back again during save and restore to maintain an association between DELTA_STATEs and application data. For example, one might use the following pseudo code:
class app_data {
DELTA_STATE* ds;
void save(DELTA_STATE_LIST& dslist) {
write_int(dslist.lookup(ds));
}
void restore(DELTA_STATE_LIST& dslist) {
ds = read_int();
}
void fix_pointers(DELTA_STATE_LIST& dslist) {
if( (int) < 0 ) {
ds = NULL;
} else {
ds = dslist[i];
}
}
};
DELTA_STATE_LIST dslist; HISTORY_STREAM_LIST hslist; ENTITY_LIST elist; elist.add(entity_to_save); api_save_entity_list_with_history_file (fileInt, elist, hslist,dslist);
foreach(app_data* ap) {
ap->save(dslist);
} See api_restore_entity_list_with_history_file for an example of how to restore the above app_data. HISTORY_STREAMs attached via an ATTRIB_HISTORY. In this case the hslist would be larger on return than on entry. The returned list can be used as with the dslist when saving application data. FileInfo) before you can save a SAT file. Refer to the reference templates for the class FileInfo and function api_set_file_info for more information. | file_ptr | open file descriptor. | |
| entity_list | entities to save. | |
| hslist | HISTORY_STREAMs to save. | |
| dslist | returns saved DELTA_STATEs. | |
| mainline_only | save only active DELTA_STATEs. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_save_history | ( | FILE * | file_ptr, | |
| logical | text_mode, | |||
| HISTORY_STREAM * | hs = NULL, |
|||
| logical | active_ents_only = FALSE, |
|||
| logical | mainline_only = FALSE, |
|||
| AcisOptions * | ao = NULL | |||
| ) |
Writes a HISTORY_STREAM and associated entities and entity ID information to a file.
Role: This API saves a complete HISTORY_STREAM to a file. History data is saved after active entities in the same format as api_save_entity_list_with_history, in a form that can be restored without history by api_restore_entity_list, if desired. If the history stream passed in is NULL, the default stream will be saved.
The active_ents_only and mainline_only flags can be used to reduce the size of the saved file. If mainline_only is TRUE, then only DELTA_STATEs needed to get from the beginning of the HISTORY_STREAM to the current state (the main line) are saved. This is equivalent to ignoring all rolled delta states. If active_ents_only is TRUE, then the active entities from hs are saved, along with HISTORY_STREAM information containing only create bulletins for these entities. active_ents_only is a more stringent condition than mainline_only; the mainline_only flag has no effect when active_ents_only is TRUE.
Unhooked annotations are not considered active entities by this API; rather they are stored with the history data. This means that they will not be restored when using api_restore_entity_list and will not be saved at all (even in the history data) when active_ents_only is TRUE. If a user wants unhooked annotations to be saved in the active entities section, he should find the unowned active entities using api_get_active_entities (with unowned_only = TRUE) and then call api_save_entity_list_with_history.
In addition to managing roll information, history streams also manage entity id information; an entity id is unique to a history stream. Entity IDs can only only be persisted by saving with history (using api_save_history or api_save_entity_list_with_history). Entity IDs are ignored when reading in with api_restore_entity_list; they are only restored when using api_restore_entity_list_with_history or api_restore_history. The main difference between using api_save_entity_list and api_save_history with active_ents_only = TRUE is that api_save_history maintains the tag information.
The file pointer argument should be an open file positioned at the point where this API begins the entity save. When the save is complete, the file will be correctly positioned at the end of the entity save. An application can save multiple histories intermixed with other application specific data in a single save file.
The entities are written to a file as a sequence of records, one per model entity. Writing records in binary is roughly twice as fast as writing in text and the files are some 20 percent shorter. It is recommended you use binary save files only for short-term storage. Write and read binary files only by the same version running on the same type of hardware.
Errors can also occur if you use two different C runtime DLLs (for example, one release and one debug) when using ACIS. Refer to the Technical Article Using Shared Libraries (DLLs) in the Spatial Product Documentation for more details.
Each entity record begins with a string identifier denoting its type. When a file is restored, records of unrecognized derived classes will be ignored.
The floating point precision for real numbers in text files is 6 digits for single precision and 15 digits for double precision.
Errors: Failed to save entities; for example, unable to write disk file.
Effect: Read-only
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| file_ptr | open file descriptor. | |
| text_mode | TRUE if file is text, FALSE if binary. | |
| hs | history stream to save. | |
| active_ents_only | TRUE to ignore roll information. | |
| mainline_only | TRUE to ignore rolled delta states. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_save_history_file | ( | FileInterface * | file_ptr, | |
| HISTORY_STREAM * | hs = NULL, |
|||
| logical | active_ents_only = FALSE, |
|||
| logical | mainline_only = FALSE, |
|||
| AcisOptions * | ao = NULL | |||
| ) |
Writes a HISTORY_STREAM and associated entities and entity id information to a file.
Role: This routine is equivalent to api_save_history, taking a FileInterface* rather than a FILE*. Please refer to the description of that routine.
Errors: Failed to save entities; e.g., unable to write disk file.
Effect: Read-only
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| file_ptr | open file descriptor. | |
| hs | stream to save. | |
| active_ents_only | TRUE to ignore roll information and unhooked ANNOTATIONs. | |
| mainline_only | TRUE to ignore rolled delta states. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_save_state | ( | FILE * | file_ptr, | |
| AcisOptions * | ao = NULL | |||
| ) |
Saves the current state of global variables into a text file.
Role: This API saves the current states of global variables such as global options and global tolerances to a text file. You may use this function to save a specific state of your application to a file and load the state through the file into Scheme AIDE to compare the behaviors between your application and the test applications.
Effect: Read-only
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| file_ptr | file descriptor. | |
| ao | ACIS options. |
include <kernapi.hxx>
| outcome api_save_version | ( | int | major_version, | |
| int | minor_version | |||
| ) |
Sets the save file format.
Role: This API sets the output file format. The system can output data in a format that a previous version can read. This is only true for objects that are compatible in the previous release.
The value for the save version is obtained by multiplying the major version by 100 and adding the minor version. For example, version 2.1 is represented as 201, version 3.0 is represented as 300, and release 19 is represented as 1900. The save version number does not change with service packs. The default value is the currently installed version of ACIS.
Note: The terms "version" and "release" are synonymous and can be used interchangeably. The term "release" and thus "Rn" (where "n" is the major version number) began with R10.
Limitations: New functionality or structures in the higher release are not correctly handled by the modeler, and therefore, are not supported.
Effect: Read-only
Journal: Not Available
Product(s): 3D ACIS Exchange, 3D Viz Exchange, 3D ACIS Modeler
| major_version | major version. Valid major and minor versions are: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8 2.0, 2.1 3.0, 3.1 4.0, 5.0, 6.0, 7.0, 8.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0 | |
| minor_version | minor version. |
include <kernapi.hxx>
Sets required header info to be written to ACIS save files.
Role: The API sets the information to be written to the header of later saved files. Does not alter the model. Beginning with ACIS release 6.3, it is required that the product ID and units to be populated for the file header before you can save a SAT file.
The mask value indicates which values in the supplied FileInfo structure are to be set. It is composed by "OR-ing" together mask values as indicated below.
The FileInfo structure contains the following fields which can be set:
product_id units units values for common modeling units are: | mask | mask indicating fields to set. | |
| info | info to be set. |
include <kernapi.hxx>
| FileInterface* GetActiveFile | ( | void | ) |
Obtain the currently installed FileInterface.
Role: Obtain the currently installed FileInterface.
include <fileif.hxx>
Converts ENTITY indices back to pointers; use in FIX_POINTER_DEF.
Role: Used in FIX_POINTER_DEF (ENTITY::fix_common) during restore to convert ENTITY indices back into pointers.
Background: Entity pointers are converted to indices when saved. When restored, these indices are converted back into pointers in FIX_POINTER_DEF (ENTITY::fix_common).
The array argument is local data within FIX_POINTER_DEF. The second argument, SPAptr, is treated (read: casted) as an integral index used to index the array. Effectively, this call is equivalent to the other version of read_array; this is provided for convenience.
| array | array of entities. | |
| p | pointer (really an index) of desired entity. |
include <savres_small.hxx>
Converts ENTITY indices back to pointers; use in FIX_POINTER_DEF.
Role: Used in FIX_POINTER_DEF (ENTITY::fix_common) during restore to convert ENTITY indices back into pointers.
Background: Entity pointers are converted to indices when saved. When restored, these indices are converted back into pointers in FIX_POINTER_DEF (ENTITY::fix_common).
The array argument is local data within FIX_POINTER_DEF. The second argument, i, indexes the array and returns the pointer.
| array | array of entities. | |
| i | index of desired entity. |
include <savres.hxx>
| TaggedData* read_data | ( | FileInterface * | = NULL |
) |
Read a TaggedData item.
Role: As part of the restore process, this function reads the next field from the restore file and returns it as a TaggedData item using the currently installed FileInterface's read_data method.
This is mainly used by the restore process when reading unknown entities or unknown subtypes.
This function returns a new object allocated on the heap. It is the caller's responsibility to free it when it is done with it (use ACIS_DELETE).
We suggest appending the returned data to a TaggedDataList, which will assume responsibility for deleting its entries.
include <fileio.hxx>
| int read_enum | ( | enum_table const & | tbl, | |
| FileInterface * | = NULL | |||
| ) |
Read an enumeration value.
Role: As part of the restore process, this function reads an enumeration value using the currently installed FileInterface's read_enum method.
| tbl | enumeration table. |
include <fileio.hxx>
| logical read_header | ( | int & | i1, | |
| int & | i2, | |||
| int & | i3, | |||
| int & | i4 | |||
| ) |
Read a header.
Role: As part of the restore process, this function reads a header using the currently installed FileInterface's read_header method.
The ACIS header is comprised of four integers, e.g. 200 0 1 0
200. This value is 100 times the major version plus the minor version (e.g., 107 for ACIS version 1.7). For point releases, the final value is truncated. Part save data for the .sat files is not affected by a point release (e.g., 105 for ACIS version 1.5.2). | i1 | release version. | |
| i2 | number of data records. | |
| i3 | number of entities. | |
| i4 | history. |
include <fileio.hxx>
| int read_id | ( | char * | buf, | |
| int | buflen = 0, |
|||
| FileInterface * | = NULL | |||
| ) |
Read an entity identifier.
Role: As part of the restore process, this function reads an identifier using the currently installed FileInterface's read_id method.
When an ENTITY is saved its identifier is a "path" describing its derivation. For example, ATTRIB_RGB's entity identifier is rgb_color-st-attrib. This says that ATTRIB_RGB is derived from ATTRIB_ST, which is derived from ATTRIB. Similarly, when an ELLIPSE is saved its entity identifier is ellipse-curve. This says that ELLIPSE is derived from CURVE.
Using the ATTRIB_RGB example, rgb_color and st are thought of as sub-id's with level=2, and the last one, attrib, is thought of simply as an id with level=1.
| buf | id string. | |
| buflen | length of buffer. |
include <fileio.hxx>
| int read_int | ( | FileInterface * | = NULL |
) |
Read an integer.
Role: As part of the restore process, this function reads an integer using the currently installed FileInterface's read_int method.
include <fileio.hxx>
| SPAinterval read_interval | ( | void | ) |
Read an interval.
Role: As part of the restore process, this function reads an interval using the currently installed FileInterface's read_real and read_logical methods.
include <fileio.hxx>
| logical read_logical | ( | char const * | false_str = "F", |
|
| char const * | true_str = "T", |
|||
| FileInterface * | = NULL | |||
| ) |
Read a logical.
Role: As part of the restore process, this function reads a logical value using the currently installed FileInterface's read_logical method.
| false_str | string for FALSE. | |
| true_str | string for TRUE. |
include <fileio.hxx>
| long read_long | ( | FileInterface * | = NULL |
) |
Read a long.
Role: As part of the restore process, this function reads a long using the currently installed FileInterface's read_long method.
include <fileio.hxx>
| SPAmatrix read_matrix | ( | void | ) |
Read a SPAmatrix as three row vectors.
Role: As part of the restore process, this function reads a SPAmatrix by making three calls to read_vector.
include <fileio.hxx>
| SPAposition read_position | ( | void | ) |
Read a position.
Role: As part of the restore process, this function reads a position using the currently installed FileInterface's read_double method.
include <fileio.hxx>
| ENTITY* read_ptr | ( | void | ) |
Read an ENTITY pointer.
Role: As part of the restore process, this function reads an ENTITY pointer using the currently installed FileInterface's read_pointer method.
include <savres_small.hxx>
| double read_real | ( | FileInterface * | = NULL |
) |
Read a double.
Role: As part of the restore process, this function reads a double using the currently installed FileInterface's read_double method.
include <fileio.hxx>
| int read_sequence | ( | FileInterface * | = NULL |
) |
Read an explicit record sequence number.
Role: As part of the restore process, this function reads a sequence number using the currently installed FileInterface's read_sequence method.
An ACIS SAT file can be thought of as a series of records. When sequencing is enabled, each record in the written SAT file is preceded by this sequence number. When using the default FileInterface for SAT files (SatFile), sequence numbers consist of a minus sign following by a sequential non-negative integer.
Sequence numbers do not appear in binary files.
include <fileio.hxx>
| char* read_string | ( | int & | len | ) |
Read a string.
Role: As part of the restore process, this function reads a string using the currently installed FileInterface's read_string(int& len) method.
When using the default FileInterface, memory for the string is allocated on the caller's behalf. Caller should free allocated memory using ACIS_DELETE [] STD_CAST [str].
| len | length of string returned. |
include <fileio.hxx>
| int read_string | ( | char * | buf | ) |
Read a string.
Role: As part of the restore process, this function reads a string using the currently installed FileInterface's read_string(char* buf, size_t max_len) method (with max_len set to 0).
When using the default FileInterface, if the supplied buffer isn't big enough, a buffer overrun will occur, likely causing a crash. For this reason, we suggest using the other version of read_string, which allocates memory on your behalf.
Returns the length of the string read.
| buf | character string. |
include <fileio.hxx>
| logical read_subtype_end | ( | void | ) |
Read a subtype end identifier.
Role: As part of the restore process, this function reads a subtype end identifier using the currently installed FileInterface's read_subtype_end method.
The subtype end identifer for the SatFile FileInterface is "} ".
include <fileio.hxx>
| logical read_subtype_start | ( | void | ) |
Read a subtype start identifier.
Role: As part of the restore process, this function reads a subtype start identifier using the currently installed FileInterface's read_subtype_start method.
The subtype start identifer for the SatFile FileInterface is "{ ".
include <fileio.hxx>
| SPAtransf read_transf | ( | ) |
Reads a transformation.
Role: As part of the restore process, this function reads a SPAtransf.
Although this internal function is intended strictly for ACIS usage, a minimal amount of information about this function is provided for the sole purpose of being able to understand and trace restoration from a SAT file. This function should never be called directly, because it makes assumptions about the availability of a SAT file, the location of the input pointer into the SAT file, and the validity of SAT data it expects to read in. It also may start a lengthy process of nested function or class method calls, which have many of the same assumptions.
Uses the currently installed FileInterface's read_real and read_logical methods.
include <fileio.hxx>
| SPAunit_vector read_unit_vector | ( | void | ) |
Read a SPAunit_vector as a vector and then normalize it.
Role: As part of the restore process, this function reads a vector using read_vector, then normalizes it.
include <fileio.hxx>
| SPAvector read_vector | ( | ) |
Read a vector.
Role: As part of the restore process, this function reads a vector using the currently installed FileInterface's read_double method.
include <fileio.hxx>
| SPAWCHAR_T* read_wstring | ( | void | ) |
Read a wide character string.
Role: As part of the restore process, this function reads a wide character string using the currently installed FileInterface's read_wstring method.
When using the default FileInterface, memory for the wstring is allocated on the caller's behalf. Caller should free allocated memory using ACIS_DELETE [] STD_CAST [wstr].
include <fileio.hxx>
| void set_restore_progress_callback | ( | proc_restore_progress_callback | callback_func_ptr | ) |
Function for setting the restore progress callback pointer.
Role: The callback mechanism is enabled by installing a custom callback function with the set_restore_progress_callback function. The set_restore_progress_callback function accepts one argument, which is the custom callback function.
| callback_func_ptr | custom callback function pointer. |
include <savres.hxx>
| void SetActiveFile | ( | FileInterface * | fi | ) |
Install a new FileInterface.
Role: Install a new FileInterface.
include <fileif.hxx>
| void write_data | ( | const TaggedData & | td | ) |
Write a TaggedData item.
Role: As part of the save process, this function writes a TaggedData item using the currently installed FileInterface's write_data method.
This is mainly used by the restore process when writing unknown entities or unknown subtypes.
| td | Given TaggedData. |
include <fileio.hxx>
| void write_enum | ( | int | val, | |
| enum_table const & | tbl | |||
| ) |
Write an enumeration value.
Role: As part of the save process, this function writes an enumeration value using the currently installed FileInterface's write_enum method.
| val | integral value of enumeration. | |
| tbl | enumeration table. |
include <fileio.hxx>
| void write_header | ( | int | i1, | |
| int | i2, | |||
| int | i3, | |||
| int | i4 | |||
| ) |
Write a header.
Role: As part of the save process, this function writes a header using the currently installed FileInterface's write_header method.
The ACIS header is comprised of four integers, e.g. 200 0 1 0.
200. This value is 100 times the major version plus the minor version (e.g., 107 for ACIS version 1.7). For point releases, the final value is truncated. Part save data for the .sat files is not affected by a point release (e.g., 105 for ACIS version 1.5.2). | i1 | release version. | |
| i2 | number of data records. | |
| i3 | number of entities. | |
| i4 | history. |
include <fileio.hxx>
| void write_id | ( | char const * | buf | ) |
Write an entity identifier.
Role: As part of the save process, this function writes a (level == 1) entity identifier using the currently installed FileInterface's write_id method.
See read_id for a description of entity id's and levels.
| buf | id string. |
include <fileio.hxx>
| void write_id_level | ( | char const * | buf, | |
| int | level | |||
| ) |
Write an entity identifier.
Role: As part of the save process, this function writes an entity identifier using the currently installed FileInterface's write_id method.
See read_id for a description of entity id's and levels.
| buf | id string. | |
| level | entity level. |
include <fileio.hxx>
| void write_int | ( | int | val | ) |
Write an integer.
Role: As part of the save process, this function writes an integer using the currently installed FileInterface's write_int method.
| val | integral value to write. |
include <fileio.hxx>
| void write_interval | ( | SPAinterval const & | inter | ) |
Write an interval.
Role: As part of the save process, this function writes an interval using the currently installed FileInterface's write_real and write_logical methods.
| inter | Given interval to write. |
include <fileio.hxx>
| void write_literal | ( | char const * | buf, | |
| int | maxlen = 0 | |||
| ) |
Write a literal string.
Role: As part of the save process, this function writes a string using the currently installed FileInterface's write_string method.
| buf | character string. | |
| maxlen | Maximum number of characters to write; 0 means write all. |
include <fileio.hxx>
| void write_logical | ( | logical | val, | |
| char const * | false_str = "F", |
|||
| char const * | true_str = "T" | |||
| ) |
Write a logical.
Role: As part of the save process, this function writes a logical value using the currently installed FileInterface's write_logical method.
| val | logical value to write. | |
| false_str | string for FALSE. | |
| true_str | string for TRUE. |
include <fileio.hxx>
| void write_long | ( | long | val | ) |
Write a long.
Role: As part of the restore process, this function writes a long using the currently installed FileInterface's write_long method.
| val | long value to write. |
include <fileio.hxx>
| void write_matrix | ( | SPAmatrix const & | matr | ) |
Write a SPAmatrix as three row vectors.
Role: As part of the save process, this function writes a SPAmatrix by making three calls to write_vector.
| matr | Given matrix to write. |
include <fileio.hxx>
| void write_position | ( | SPAposition const & | pos | ) |
Write a position.
Role: As part of the save process, this function writes a position using the currently installed FileInterface's write_double method.
| pos | Given position to write. |
include <fileio.hxx>
| void write_ptr | ( | ENTITY * | ent, | |
| ENTITY_LIST & | list | |||
| ) |
Write an ENTITY pointer.
Role: As part of the save process, this function writes an ENTITY pointer using the currently installed FileInterface's write_pointer method.
| ent | Given entity pointer. | |
| list | list is provided as local data within your SAVE_DEF implementation. |
include <savres_small.hxx>
| void write_real | ( | double | val | ) |
Write a double.
Role: As part of the save process, this function writes a double using the currently installed FileInterface's write_double method.
| val | double value to write. |
include <fileio.hxx>
| void write_sequence | ( | int | num | ) |
Write an explicit record sequence number.
Role: As part of the save process, this function writes a sequence number using the currently installed FileInterface's write_sequence method.
An ACIS SAT file can be thought of as a series of records. When sequencing is enabled, each record in the written SAT file is preceded by this sequence number. When using the default FileInterface for SAT files (SatFile), sequence numbers consist of a minus sign following by a sequential non-negative integer.
Sequence numbers do not appear in binary files.
include <fileio.hxx>
| void write_string | ( | char const * | buf | ) |
Write a string.
Role: As part of the save process, this function writes a string using the currently installed FileInterface's write_string method.
| buf | character string. |
include <fileio.hxx>
| void write_sub_id | ( | char const * | buf | ) |
Write an entity "sub" identifier.
Role: As part of the save process, this function writes an entity "sub" (level > 1) identifier using the currently installed FileInterface's write_id method.
See read_id for a description of entity id's and levels.
| buf | id string. |
include <fileio.hxx>
| void write_subtype_end | ( | void | ) |
Write a subtype end identifier.
Role: As part of the save process, this function writes a subtype end identifier using the currently installed FileInterface's write_subtype_end method.
The subtype end identifer for the SatFile FileInterface is "} ".
include <fileio.hxx>
| void write_subtype_start | ( | void | ) |
Write a subtype start identifier.
Role: As part of the save process, this function writes a subtype start identifier using the currently installed FileInterface's write_subtype_start method.
The subtype start identifer for the SatFile FileInterface is "{ ".
include <fileio.hxx>
| void write_transf | ( | SPAtransf const & | tr | ) |
Write a transformation.
Role: As part of the save process, this function writes a SPAtransf.
| tr | Given transform to write. |
include <fileio.hxx>
| void write_vector | ( | SPAvector const & | vec | ) |
Write a vector.
Role: As part of the save process, this function writes a vector using the currently installed FileInterface's write_double method.
| vec | Given vector to write. |
include <fileio.hxx>
| void write_wstring | ( | const SPAWCHAR_T * | wstr | ) |
Write a wide character string.
Role: As part of the save process, this function writes a wide character string using the currently installed FileInterface's write_wstring method.
| wstr | Given wide string to write. |
include <fileio.hxx>