Home

FileInfo Class Reference
[Save and Restore]

Contains additional required file header information. More...

#include <fileinfo.hxx>

Inheritance diagram for FileInfo:

Inheritance graph
[legend]
Collaboration diagram for FileInfo:

Collaboration graph
[legend]

List of all members.

Public Member Functions

const char * acis_version () const
 Returns the ACIS version number used to save the model.
const char * date () const
 Returns the date on the save file.
int file_version () const
 Returns the save file version used in storing the file.
 FileInfo (FileInfo const &finfo)
 C++ copy constructor requests memory for this object and populates it with the data from the object supplied as an argument.
 FileInfo ()
 C++ allocation constructor requests memory for this object but does not populate it.
FileInfooperator= (FileInfo const &finfo)
 Performs an assignment operation.
const char * product_id () const
 Returns the ID of the product.
void reset ()
 Resets the values to the default settings for the file information.
void reset_vars ()
 Routine to reset the values for the file information to the default values.
void restore ()
 Restores the file information from a save file.
void save ()
 Saves the product ID, version, time, units, SPAresabs and SPAresnor.
void set_masked (unsigned long field, FileInfo const &file)
 Copies selected fields from another instance.
void set_product_id (const char *id)
 Sets the product ID.
void set_units (double count)
 Sets the model units scale (in millimeters).
double tol_abs () const
 Returns the value of the SPAresabs when the model was saved.
double tol_nor () const
 Returns the value of the SPAresnor when the model was saved.
double units () const
 Returns the value of the millimeters per model unit.
void valid ()
 Checks the values of the units and product id.
 ~FileInfo ()
 C++ destructor for FileInfo which deallocates memory.


Detailed Description

Contains additional required file header information.


Role: Contains additional file header information, such as ID of the product used to save the model, ACIS version, millimeters per model unit, date model was saved, ACIS save file version, and other relevant model data.

Beginning with ACIS Release 6.3, it is required that the product ID and units scale be populated for the file header before you can save a SAT file, regardless of the save file version. If you do not set both of these data, ACIS will generate an error. Refer to the set_product_id and set_units methods of this class.


Constructor & Destructor Documentation

FileInfo::FileInfo (  ) 

C++ allocation constructor requests memory for this object but does not populate it.

FileInfo::FileInfo ( FileInfo const &  finfo  ) 

C++ copy constructor requests memory for this object and populates it with the data from the object supplied as an argument.



Parameters:
finfo file name.

FileInfo::~FileInfo (  ) 

C++ destructor for FileInfo which deallocates memory.


Member Function Documentation

const char* FileInfo::acis_version (  )  const [inline]

Returns the ACIS version number used to save the model.

const char* FileInfo::date (  )  const [inline]

Returns the date on the save file.

int FileInfo::file_version (  )  const [inline]

Returns the save file version used in storing the file.

FileInfo& FileInfo::operator= ( FileInfo const &  finfo  ) 

Performs an assignment operation.



Parameters:
finfo file name.

const char* FileInfo::product_id (  )  const [inline]

Returns the ID of the product.

void FileInfo::reset (  ) 

Resets the values to the default settings for the file information.

void FileInfo::reset_vars (  ) 

Routine to reset the values for the file information to the default values.

void FileInfo::restore (  ) 

Restores the file information from a save file.



Role:

 if (restore_version_number >= FILEINFO_VERSION)
 	read_string			Product
 	read_string			ACIS Version
 	read_string			Date
 	read_real			Units
 	read_real			Tolerance, abs
 	read_real			Tolerance, nor
 

void FileInfo::save (  ) 

Saves the product ID, version, time, units, SPAresabs and SPAresnor.

void FileInfo::set_masked ( unsigned long  field,
FileInfo const &  file 
)

Copies selected fields from another instance.



Parameters:
field number of fields.
file file name.

void FileInfo::set_product_id ( const char *  id  ) 

Sets the product ID.



Role: The product ID can be any string greater than 4 characters. Spatial recommends that the string contain your product name and the product version, so that SAT files generated by your product can be easily identified.

Beginning with ACIS Release 6.3, it is required that the product ID and units scale be populated for the file header before you can save a SAT file.

Parameters:
id ID.

void FileInfo::set_units ( double  count  ) 

Sets the model units scale (in millimeters).



Role: Sets the scale to the appropriate units for your product (1.0 indicates that 1 unit equals 1 millimeter).

Beginning with ACIS Release 6.3, it is required that the product ID and units scale be populated for the file header before you can save a SAT file.

Parameters:
count number of millimeters.

double FileInfo::tol_abs (  )  const [inline]

Returns the value of the SPAresabs when the model was saved.

double FileInfo::tol_nor (  )  const [inline]

Returns the value of the SPAresnor when the model was saved.

double FileInfo::units (  )  const [inline]

Returns the value of the millimeters per model unit.

void FileInfo::valid (  ) 

Checks the values of the units and product id.