cgma
NCubitFile::CCubitFile Class Reference

#include <CCubitFile.hpp>

List of all members.

Classes

struct  SCubitFileContentsHeader
struct  SCubitFileModelEntry

Public Types

enum  EErrorCode {
  eSuccess = 0, eFileReadError, eFileSeekError, eFileTellError,
  eFileWriteError, eFileUnrecognizedFormat, eDuplicateWrite, eCorruptBlock,
  eNotFound, eOrderError, eMemoryError, ePassedNullPointer,
  eUnknownError
}
enum  EMetaDataOwnerType {
  eModelMetaData, eGeomMetaData, eNodeMetaData, eElemMetaData,
  eGroupMetaData, eBlockMetaData, eNodeSetMetaData, eSideSetMetaData,
  eBCSetMetaData, eMaterialMetaData, eConstraintMetaData
}
enum  EModelType {
  eFEModel, eACISText, eACISBinary, eAssemblyModel,
  eSimModel, eBoundaryLayerModel
}
enum  ESideSetSenseSize { eSideSetSenseNone, eSideSetSenseByte, eSideSetSenseInt32 }
enum  EConstraintType { eConstraintDistributing, eConstraintKinematic, eConstraintRigidBody }
enum  ECompression { eNoCompression }
typedef UnsignedInt32 HModel

Public Member Functions

 CCubitFile ()
virtual ~CCubitFile ()
EErrorCode Open (const char *xstrReadFileName, const char *xstrWriteFileName, const char *xstrBackupFileName=NULL)
EErrorCode Close ()
UnsignedInt32 GetModelList (UnsignedInt32 &xintNumModels, const SModelData *&xpaModels)
UnsignedInt32 IsModel (HModel xintModel)
UnsignedInt32 GetReadModelLength (HModel xintModel, UnsignedInt32 &xintLength)
UnsignedInt32 CreateModel (EModelType xeModelType, HModel &xintModel)
UnsignedInt32 DeleteModel (HModel xintModel)
UnsignedInt32 GetModelOwner (HModel xintModel, HModel &xintOwner)
UnsignedInt32 SetModelOwner (HModel xintModel, HModel xintOwner)
UnsignedInt32 BeginWriteModel (HModel xintModelId, EModelType type, FILE *&writeable_file)
UnsignedInt32 EndWriteModel (HModel xintModelId)
UnsignedInt32 BeginReadModel (HModel xintGeomModel, EModelType type, FILE *&readable_file)
UnsignedInt32 EndReadModel ()
UnsignedInt32 BeginWriteGeomModel (HModel xintGeomModel, const char *xstrGeomFile)
UnsignedInt32 EndWriteGeomModel ()
UnsignedInt32 BeginReadGeomModel (HModel xintGeomModel, FILE *xpGeomFile)
UnsignedInt32 EndReadGeomModel ()
UnsignedInt32 BeginWriteFEModel (HModel xintFEModel, UnsignedInt32 xintGeomCount, UnsignedInt32 xintGroupCount, UnsignedInt32 xintBlockCount, UnsignedInt32 xintNodeSetCount, UnsignedInt32 xintSideSetCount)
UnsignedInt32 WriteNodes (UnsignedInt32 xintIndex, UnsignedInt32 xintGeomID, UnsignedInt32 xintNodeCount, UnsignedInt32 *xpaintNodeIDs, double *xpadblX, double *xpadblY, double *xpadblZ)
UnsignedInt32 WriteElems (UnsignedInt32 xintIndex, UnsignedInt32 xintNumTypes, SElemData *xpaElemData)
UnsignedInt32 WriteGroup (UnsignedInt32 xintIndex, UnsignedInt32 xintGroupID, UnsignedInt32 xintGroupType, ConstCharPtr xpachrGroupName, UnsignedInt32 xintNumTypes, SGroupData *xpaGroupData)
UnsignedInt32 WriteBlock (UnsignedInt32 xintIndex, UnsignedInt32 xintBlockID, int block_unique_id, UnsignedInt32 xintBlockType, UnsignedInt32 xintBlockColor, UnsignedInt32 xintMixedElemType, UnsignedInt32 xintDefPyramidType, UnsignedInt32 xintMaterialID, UnsignedInt32 xintBlockDimension, UnsignedInt32 xintNumTypes, SBlockData *xpaBlockData, UnsignedInt32 xintAttributeOrder, double *xpadblAttributes)
UnsignedInt32 WriteNodeSet (UnsignedInt32 xintIndex, UnsignedInt32 xintNodeSetID, int nodeset_unique_id, UnsignedInt32 xintColor, UnsignedInt32 xintPointSymbol, UnsignedInt32 xintNumTypes, SNodeSetData *xpaNodeSetData, const std::vector< char > &bcdata)
UnsignedInt32 WriteSideSet_11 (UnsignedInt32 xintIndex, UnsignedInt32 xintSideSetID, int sideset_unique_id, UnsignedInt32 xintColor, UnsignedInt32 xintUseShells, UnsignedInt32 xintNumTypes, SSideSetData_11 *xpaSideSetData, UnsignedInt32 xintNumDistFact, double *xpadblDistribution, const std::vector< char > &bcdata)
UnsignedInt32 EndWriteFEModel ()
UnsignedInt32 BeginReadFEModel (HModel xintFEModel, UnsignedInt32 &xintGeomCount, UnsignedInt32 &xintGroupCount, UnsignedInt32 &xintBlockCount, UnsignedInt32 &xintNodeSetCount, UnsignedInt32 &xintSideSetCount)
UnsignedInt32 ReadNodes (UnsignedInt32 xintIndex, UnsignedInt32 &xintGeomID, UnsignedInt32 &xintNodeCount, UnsignedInt32 *&xpaintNodeIDs, double *&xpadblX, double *&xpadblY, double *&xpadblZ)
UnsignedInt32 ReadElems (HModel xintFEModel, UnsignedInt32 xintIndex, UnsignedInt32 &xintGeomID, UnsignedInt32 &xintNumTypes, SElemData *&xpaElemData)
UnsignedInt32 ReadGroupIdentity (UnsignedInt32 xintIndex, UnsignedInt32 &xintGroupID, UnsignedInt32 &xintGroupType, ConstCharPtr &xpachrGroupName)
UnsignedInt32 ReadGroupMembers (UnsignedInt32 xintIndex, UnsignedInt32 &xintNumTypes, SGroupData *&xpaGroupData)
UnsignedInt32 ReadBlock (UnsignedInt32 xintIndex, UnsignedInt32 &xintBlockID, int &unique_id, UnsignedInt32 &xintBlockType, UnsignedInt32 &xintBlockColor, UnsignedInt32 &xintMixedElemType, UnsignedInt32 &xintDefPyramidType, UnsignedInt32 &xintMaterialID, UnsignedInt32 &xintBlockDimension, UnsignedInt32 &xintNumTypes, SBlockData *&xpaBlockData, UnsignedInt32 &xintAttributeOrder, double *&xpadblAttributes)
UnsignedInt32 ReadNodeSet (UnsignedInt32 xintIndex, UnsignedInt32 &xintNodeSetID, int &unique_id, UnsignedInt32 &xintColor, UnsignedInt32 &xintPointSymbol, UnsignedInt32 &xintNumTypes, SNodeSetData *&xpaNodeSetData, std::vector< char > &bcdata)
UnsignedInt32 ReadSideSet_10 (UnsignedInt32 xintIndex, UnsignedInt32 &xintSideSetID, UnsignedInt32 &xintColor, UnsignedInt32 &xintUseShells, UnsignedInt32 &xintNumTypes, SSideSetData_10 *&xpaSideSetData, UnsignedInt32 &xintNumDistFact, double *&xpadblDistribution)
UnsignedInt32 ReadSideSet_11 (UnsignedInt32 xintIndex, UnsignedInt32 &xintSideSetID, int &unique_id, UnsignedInt32 &xintColor, UnsignedInt32 &xintUseShells, UnsignedInt32 &xintNumTypes, SSideSetData_11 *&xpaSideSetData, UnsignedInt32 &xintNumDistFact, double *&xpadblDistribution, std::vector< char > &bcdata)
UnsignedInt32 EndReadFEModel ()
UnsignedInt32 BeginWriteSimModel (HModel xintGeomModel, UnsignedInt32 xintBCCount, UnsignedInt32 xintICCount, UnsignedInt32 xintBCSetCount, UnsignedInt32 xintMaterialCount, UnsignedInt32 xintAmplitudeCount, UnsignedInt32 xintConstraintCount)
UnsignedInt32 WriteBCSet (UnsignedInt32 xintIndex, UnsignedInt32 xintBCSetID, UnsignedInt32 xintBCSetUniqueID, UnsignedInt32 xintBCSetAnalysisType, UnsignedInt32 xintRestraintTypesCount, UnsignedInt32 xintLoadTypesCount, UnsignedInt32 xintContactPairTypesCount, SBCSetData *xpaBCSetRestraintData, SBCSetData *xpaBCSetLoadData, SBCSetData *xpaBCSetContactPairData)
UnsignedInt32 WriteMaterial (UnsignedInt32 xintIndex, UnsignedInt32 xintMaterialID, UnsignedInt32 xintMaterialUniqueID, UnsignedInt32 xintPropertiesCount, SMaterialData *xpaMaterialData)
UnsignedInt32 WriteConstraint (UnsignedInt32 xintIndex, UnsignedInt32 xintConstraintID, UnsignedInt32 xintConstraintUniqueID, UnsignedInt32 xintConstraintType, UnsignedInt32 xintIndependentTypeCount, SConstraintData *xpaIndependentData, UnsignedInt32 xintDependentTypeCount, SConstraintData *xpaDependentData)
UnsignedInt32 EndWriteSimModel ()
UnsignedInt32 BeginReadSimModel (HModel xintGeomModel, UnsignedInt32 &xintBCCount, UnsignedInt32 &xintICCount, UnsignedInt32 &xintBCSetCount, UnsignedInt32 &xintMaterialCount, UnsignedInt32 &xintAmplitudeCount, UnsignedInt32 &xintConstraintCount)
UnsignedInt32 ReadBCSet (UnsignedInt32 xintIndex, UnsignedInt32 &xintBCSetID, UnsignedInt32 &xintBCSetUniqueID, UnsignedInt32 &xintBCSetAnalysisType, UnsignedInt32 &xintRestraintTypesCount, UnsignedInt32 &xintLoadTypesCount, UnsignedInt32 &xintContactPairTypesCount, SBCSetData *&xpaBCSetRestraintData, SBCSetData *&xpaBCSetLoadData, SBCSetData *&xpaBCSetContactPairData)
UnsignedInt32 ReadMaterial (UnsignedInt32 xintIndex, UnsignedInt32 &xintMaterialID, UnsignedInt32 &xintMaterialUniqueID, UnsignedInt32 &xintPropertiesCount, SMaterialData *&xpaMaterialData)
UnsignedInt32 ReadConstraint (UnsignedInt32 xintIndex, UnsignedInt32 &xintConstraintID, UnsignedInt32 &xintConstraintUniqueID, UnsignedInt32 &xintConstraintType, UnsignedInt32 &xintIndependentTypeCount, SConstraintData *&xpaIndependentData, UnsignedInt32 &xintDependentTypeCount, SConstraintData *&xpaDependentData)
UnsignedInt32 EndReadSimModel ()
UnsignedInt32 GetReadMetaData (EMetaDataOwnerType xeType, CMetaData *&xpMetaData)
UnsignedInt32 GetWriteMetaData (EMetaDataOwnerType xeType, CMetaData *&xpMetaData)
EErrorCode GetError () const

Static Public Attributes

static const UnsignedInt32 mintNativeEndian = 0xFFFFFFFF

Private Types

enum  EModelStat { eStatNotWritten, eStatWritten, eStatDelete, eStatWriting }

Private Member Functions

void WriteModelTable ()
UnsignedInt32 FindModel (HModel xintModel, SCubitFileModelEntry *xpaModels, UnsignedInt32 xintNumModels, UnsignedInt32 &xintIndex)
void CopyModel (UnsignedInt32 xintReadOffset, UnsignedInt32 &xintWriteOffset, UnsignedInt32 xintLength, FILE *xpReadFile, FILE *xpWriteFile)
void FreeAll ()

Private Attributes

char * mstrReadFileName
char * mstrWriteFileName
char * mstrBackupFileName
UnsignedInt32 mintWriteTempFile
CubitFile mpReadFile
CubitFile mpWriteFile
EErrorCode meErrorState
UnsignedInt32 mintWriteBuffNumModels
UnsignedInt32 mintNextModelID
struct
NCubitFile::CCubitFile::SCubitFileContentsHeader 
mReadContents
struct
NCubitFile::CCubitFile::SCubitFileContentsHeader 
mWriteContents
struct
NCubitFile::CCubitFile::SCubitFileModelEntry
mpaReadModels
struct
NCubitFile::CCubitFile::SCubitFileModelEntry
mpaWriteModels
EModelStatmpaReadModelStat
UnsignedInt32 mintFEModelIndex
UnsignedInt32 mintSimModelIndex
CFEModelmpReadFEModel
CFEModelmpWriteFEModel
CSimModelmpReadSimModel
CSimModelmpWriteSimModel
CMetaDatampMetaData
struct {
   UnsignedInt32   mintNumModels
   SModelData *   mpaModelData
mModelBuff

Static Private Attributes

static const UnsignedInt32 mintSizeOfContents
static const UnsignedInt32 mintSizeOfModel

Detailed Description

Definition at line 99 of file CCubitFile.hpp.


Member Typedef Documentation

Definition at line 102 of file CCubitFile.hpp.


Member Enumeration Documentation

Enumerator:
eNoCompression 

Definition at line 336 of file CCubitFile.hpp.

Enumerator:
eConstraintDistributing 
eConstraintKinematic 
eConstraintRigidBody 

Definition at line 123 of file CCubitFile.hpp.

Enumerator:
eSuccess 
eFileReadError 
eFileSeekError 
eFileTellError 
eFileWriteError 
eFileUnrecognizedFormat 
eDuplicateWrite 
eCorruptBlock 
eNotFound 
eOrderError 
eMemoryError 
ePassedNullPointer 
eUnknownError 

Definition at line 103 of file CCubitFile.hpp.

Enumerator:
eModelMetaData 
eGeomMetaData 
eNodeMetaData 
eElemMetaData 
eGroupMetaData 
eBlockMetaData 
eNodeSetMetaData 
eSideSetMetaData 
eBCSetMetaData 
eMaterialMetaData 
eConstraintMetaData 

Definition at line 111 of file CCubitFile.hpp.

Enumerator:
eStatNotWritten 
eStatWritten 
eStatDelete 
eStatWriting 

Definition at line 367 of file CCubitFile.hpp.

Enumerator:
eFEModel 
eACISText 
eACISBinary 
eAssemblyModel 
eSimModel 
eBoundaryLayerModel 

Definition at line 117 of file CCubitFile.hpp.

Enumerator:
eSideSetSenseNone 
eSideSetSenseByte 
eSideSetSenseInt32 

Definition at line 120 of file CCubitFile.hpp.


Constructor & Destructor Documentation

CCubitFile::~CCubitFile ( ) [virtual]

Definition at line 72 of file CCubitFile.cpp.

{
    // auto-save?
    // delete incomplete temp files
    FreeAll();

    // Assume if any FE models are still around now (i.e. EndRead/Write hasn't
    // been called) there was an error, so free their memory.
    if(mpReadFEModel)
        delete mpReadFEModel;
    if(mpWriteFEModel)
        delete mpWriteFEModel;
    if(mpReadSimModel)
        delete mpReadSimModel;
    if(mpWriteSimModel)
        delete mpWriteSimModel;

    if(mModelBuff.mpaModelData)
        delete [] mModelBuff.mpaModelData;
}

Member Function Documentation

UnsignedInt32 CCubitFile::BeginReadFEModel ( HModel  xintFEModel,
UnsignedInt32 xintGeomCount,
UnsignedInt32 xintGroupCount,
UnsignedInt32 xintBlockCount,
UnsignedInt32 xintNodeSetCount,
UnsignedInt32 xintSideSetCount 
)

Definition at line 1075 of file CCubitFile.cpp.

{
    try {
        if(!mpReadFile)  throw eFileReadError;
        if(mpReadFEModel)  throw eOrderError;

        UnsignedInt32 lintIndex;
        if(!FindModel(xintFEModel, mpaReadModels, mReadContents.mintNumModels,
            lintIndex))
            throw eNotFound;
        if(mpaReadModels[lintIndex].mintModelType != eFEModel)
            throw eNotFound;

        mpReadFEModel = new CFEModel();
        if(!mpReadFEModel)  throw eMemoryError;
        
        mpReadFEModel->InitRead(mpReadFile.file(), mpaReadModels[lintIndex].mintModelOffset,
            xintGeomCount, xintGroupCount,
            xintBlockCount, xintNodeSetCount, xintSideSetCount);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}
UnsignedInt32 CCubitFile::BeginReadGeomModel ( HModel  xintGeomModel,
FILE *  xpGeomFile 
)

Definition at line 683 of file CCubitFile.cpp.

{
    if(!mpReadFile)  return eFileReadError;
    if(!xpGeomFile)  return eFileWriteError;

    UnsignedInt32 lintStartFilePos = GetLocation(xpGeomFile);

    // Determine the size of the geometry file and then copy it into the
    // cubit file.
    EErrorCode leReturn = eSuccess;
    try {
        UnsignedInt32 lintReadIndex, lintWriteOffset;
        // Locate the model's index in the read contents and make sure it is
        // not an FEA model.
        if(!FindModel(xintGeomModel, mpaReadModels,
            mReadContents.mintNumModels, lintReadIndex))
            throw eNotFound;
        if(mpaReadModels[lintReadIndex].mintModelType == eFEModel)
            throw eNotFound;

        // Copy the geometry model file out of the cubit file.
        CopyModel(mpaReadModels[lintReadIndex].mintModelOffset,
            lintWriteOffset, mpaReadModels[lintReadIndex].mintModelLength,
            mpReadFile.file(), xpGeomFile);
    }
    catch(EErrorCode xeErrorCode)  {  leReturn = xeErrorCode;  }
    catch(...)  {  leReturn = eUnknownError;  }

    NCubitFile::SetLocation(xpGeomFile, lintStartFilePos, SEEK_SET);
    return leReturn;
}
UnsignedInt32 CCubitFile::BeginReadModel ( HModel  xintGeomModel,
EModelType  type,
FILE *&  readable_file 
)

Definition at line 827 of file CCubitFile.cpp.

{
  f = NULL;
  
  if(!mpReadFile)
    return eFileReadError;
  
    // Determine the size of the geometry file and then copy it into the
    // cubit file.
  EErrorCode leReturn = eSuccess;
  try
  {
    UnsignedInt32 lintReadIndex;
      // Locate the model's index in the read contents and make sure it is
      // an assembly model.
    if(!FindModel(xintModelId, mpaReadModels,
                  mReadContents.mintNumModels, lintReadIndex))
      throw eNotFound;
    if(mpaReadModels[lintReadIndex].mintModelType != type)
      throw eNotFound;
    
      // Set the read pointer to the correct location
    NCubitFile::SetLocation(mpReadFile.file(), mpaReadModels[lintReadIndex].mintModelOffset, SEEK_SET);
    
      // Set the FILE*
    f = mpReadFile.file();
  }
  catch(EErrorCode xeErrorCode)
  { leReturn = xeErrorCode; }
  catch(...)
  { leReturn = eUnknownError; }
  
  return leReturn;
}
UnsignedInt32 CCubitFile::BeginReadSimModel ( HModel  xintGeomModel,
UnsignedInt32 xintBCCount,
UnsignedInt32 xintICCount,
UnsignedInt32 xintBCSetCount,
UnsignedInt32 xintMaterialCount,
UnsignedInt32 xintAmplitudeCount,
UnsignedInt32 xintConstraintCount 
)

Definition at line 1524 of file CCubitFile.cpp.

{
    try {
        if(!mpReadFile)  throw eFileReadError;
        if(mpReadSimModel)  throw eOrderError;

        UnsignedInt32 lintIndex;
        if(!FindModel(xintSimModel, mpaReadModels, mReadContents.mintNumModels,
            lintIndex))
            throw eNotFound;
        if(mpaReadModels[lintIndex].mintModelType != eSimModel)
            throw eNotFound;

        mpReadSimModel = new CSimModel();
        if(!mpReadSimModel)  throw eMemoryError;

        mpReadSimModel->InitRead(mpReadFile.file(), mpaReadModels[lintIndex].mintModelOffset,
                                 xintBCCount, xintICCount, xintBCSetCount,
                                 xintMaterialCount, xintAmplitudeCount,
                                 xintConstraintCount);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}
UnsignedInt32 CCubitFile::BeginWriteFEModel ( HModel  xintFEModel,
UnsignedInt32  xintGeomCount,
UnsignedInt32  xintGroupCount,
UnsignedInt32  xintBlockCount,
UnsignedInt32  xintNodeSetCount,
UnsignedInt32  xintSideSetCount 
)

Definition at line 873 of file CCubitFile.cpp.

{
    try {
        if(!mpWriteFile)  throw eFileWriteError;
        if(mpWriteFEModel)  throw eOrderError;

        // Write the model table first to try to guarentee that it will be
        // at the beginning of the file.
        WriteModelTable();

        // Lookup the requested model in the model table and make sure it is
        // an FEA model.
        if(!FindModel(xintFEModel, mpaWriteModels, mWriteContents.mintNumModels,
            mintFEModelIndex))
            throw eNotFound;
        if(mpaWriteModels[mintFEModelIndex].mintModelType != eFEModel)
            throw eNotFound;

        // Create the object that manages FEA model file transactions and have
        // it begin its model write.
        mpWriteFEModel = new CFEModel();
        if(!mpWriteFEModel)
            throw eMemoryError;
        
        mpaWriteModels[mintFEModelIndex].mintModelOffset =
            mpWriteFEModel->InitWrite(mpWriteFile.file(), xintGeomCount, xintGroupCount,
            xintBlockCount, xintNodeSetCount, xintSideSetCount);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}
UnsignedInt32 CCubitFile::BeginWriteGeomModel ( HModel  xintGeomModel,
const char *  xstrGeomFile 
)

Definition at line 629 of file CCubitFile.cpp.

{
    if(!mpWriteFile)  return eFileWriteError;

    // Try to open the geometry model file for reading.
    CubitFile lpGeomFile(xstrGeomFile, "rb");
    if(!lpGeomFile)
        return eFileReadError;

    // Determine the size of the geometry file and then copy it into the
    // cubit file.
    EErrorCode leReturn = eSuccess;
    try {
        UnsignedInt32 lintReadIndex, lintWriteIndex;
        // Locate the model's index in the write contents and make sure it is
        // not an FEA model.
        if(!FindModel(xintGeomModel, mpaWriteModels,
            mWriteContents.mintNumModels, lintWriteIndex))
            throw eNotFound;
        if(mpaWriteModels[lintWriteIndex].mintModelType == eFEModel)
            throw eNotFound;
        // Locate the model's index in the read contents, if possible, and
        // make sure the model has not already been written or deleted, and
        // then mark it written.
        if(FindModel(xintGeomModel, mpaReadModels,
            mReadContents.mintNumModels, lintReadIndex)) {
            if(mpaReadModelStat[lintReadIndex] != eStatNotWritten)
                throw eOrderError;
            mpaReadModelStat[lintReadIndex] = eStatWritten;
        }

        // Measure the length of the geometry model file and then copy it into
        // to cubit file.
        if(NCubitFile::SetLocation(lpGeomFile.file(), 0, SEEK_END))
            throw CCubitFile::eFileSeekError;
        UnsignedInt32 lintGeomLength = GetLocation(lpGeomFile.file());
        CopyModel(0, mpaWriteModels[lintWriteIndex].mintModelOffset,
            lintGeomLength, lpGeomFile.file(), mpWriteFile.file());
        mpaWriteModels[lintWriteIndex].mintModelLength = lintGeomLength;
    }
    catch(EErrorCode xeErrorCode)  {  leReturn = xeErrorCode;  }
    catch(...)  {  leReturn = eUnknownError;  }

    return leReturn;
}
UnsignedInt32 CCubitFile::BeginWriteModel ( HModel  xintModelId,
EModelType  type,
FILE *&  writeable_file 
)

Definition at line 724 of file CCubitFile.cpp.

{
    // Let's not return a FILE* until we know it's going to be OK to write to.
  writeable_file = NULL;
  
  if(!mpWriteFile)
    return eFileWriteError;
  
  EErrorCode leReturn = eSuccess;
  try
  {
    UnsignedInt32 lintReadIndex, lintWriteIndex;
      // Locate the model's index in the write contents and make sure it is
      // the right kind of model.
    if(!FindModel(xintModelId,
                  mpaWriteModels,
                  mWriteContents.mintNumModels,
                  lintWriteIndex))
      throw eNotFound;
    
    if(mpaWriteModels[lintWriteIndex].mintModelType != type)
      throw eNotFound;
    
      // Locate the model's index in the read contents, if possible, and
      // make sure the model has not already been written or deleted, and
      // then mark it as being written.
    if(FindModel(xintModelId, mpaReadModels,
                 mReadContents.mintNumModels, lintReadIndex))
    {
      if(mpaReadModelStat[lintReadIndex] != eStatNotWritten)
        throw eOrderError;
      mpaReadModelStat[lintReadIndex] = eStatWriting;
    }
    
      // Move the FILE* to the correct write position so the FILE*
      // can be written to directly.  From CopyFile, it looks like the
      // correct location is the end of the file.
    if (NCubitFile::SetLocation(mpWriteFile.file(), 0, SEEK_END))
      throw eFileSeekError;
    
      // Save our current FILE* position so we can detect the size of
      // data written to the model.
    mpaWriteModels[lintWriteIndex].mintModelOffset = GetLocation(mpWriteFile.file());
    
      // set the FILE*
    writeable_file = mpWriteFile.file();
  }
  catch(EErrorCode xeErrorCode)
  {  leReturn = xeErrorCode;  }
  catch(...)
  {  leReturn = eUnknownError;  }
  
  return leReturn;
}
UnsignedInt32 CCubitFile::BeginWriteSimModel ( HModel  xintGeomModel,
UnsignedInt32  xintBCCount,
UnsignedInt32  xintICCount,
UnsignedInt32  xintBCSetCount,
UnsignedInt32  xintMaterialCount,
UnsignedInt32  xintAmplitudeCount,
UnsignedInt32  xintConstraintCount 
)

Definition at line 1390 of file CCubitFile.cpp.

{
    try {
        if(!mpWriteFile)  throw eFileWriteError;
        if(mpWriteSimModel)  throw eOrderError;

        // Write the model table first to try to guarentee that it will be
        // at the beginning of the file.
        WriteModelTable();

        // Lookup the requested model in the model table and make sure it is
        // an FEA model.
        if(!FindModel(xintSimModel, mpaWriteModels, mWriteContents.mintNumModels,
            mintSimModelIndex))
            throw eNotFound;
        if(mpaWriteModels[mintSimModelIndex].mintModelType != eSimModel)
            throw eNotFound;

        // Create the object that manages FEA model file transactions and have
        // it begin its model write.
        mpWriteSimModel = new CSimModel();
        if(!mpWriteSimModel)
            throw eMemoryError;

        mpaWriteModels[mintSimModelIndex].mintModelOffset =
            mpWriteSimModel->InitWrite(mpWriteFile.file(), xintBCCount,
                                       xintICCount, xintBCSetCount,
                                       xintMaterialCount, xintAmplitudeCount,
                                       xintConstraintCount);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}

Definition at line 327 of file CCubitFile.cpp.

{
    try {

        if(mpWriteFile) {
            // Write file scoped (model) metadata and update the file's table
            // of contents one last time.
            UnsignedInt32 lintMetaDataLength;
            mpMetaData->WriteMetaData(mpWriteFile.file(),
                mWriteContents.mintModelMetaDataOffset, lintMetaDataLength);
            WriteModelTable();

// throw away erroneously written files?!?

            // If the written file was a temporary file, delete the original
            // file and replace it with the temporary file.
            if(mintWriteTempFile) {             
                // Close any open files.
                mpReadFile.close();
                mpWriteFile.close();

                // If there was a backup name specified for the old read file
                // rename it instead of deleting it.
                if(mstrBackupFileName)
                    CubitFileUtil::rename_file(mstrReadFileName, mstrBackupFileName);
                else
                    CubitFileUtil::remove_file(mstrReadFileName);
                if(CUBIT_SUCCESS != CubitFileUtil::rename_file(mstrWriteFileName, mstrReadFileName))
                    throw eUnknownError;
            }
        }

        // Close any open files and clean up allocated memory.
        FreeAll();
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode) {
        FreeAll();
        return xeErrorCode;
    }
    catch(...)  {
        FreeAll();
        return eUnknownError;
    }
}
void CCubitFile::CopyModel ( UnsignedInt32  xintReadOffset,
UnsignedInt32 xintWriteOffset,
UnsignedInt32  xintLength,
FILE *  xpReadFile,
FILE *  xpWriteFile 
) [private]

Definition at line 584 of file CCubitFile.cpp.

{
    // Create a 16 kilobyte memory buffer to try to improve copy IO efficiency
    // over a byte-per-byte copy.
    char* lpachrCopyBuffer = new char[0x4000]; //16KB
    if(!lpachrCopyBuffer)
        throw eMemoryError;
    
    // Position the files pointers for the copy.
    CIOWrapper lReadIO(xpReadFile);
    CIOWrapper lWriteIO(xpWriteFile);
    lReadIO.BeginReadBlock(xintReadOffset);
    xintWriteOffset = lWriteIO.BeginWriteBlock();
    
    // Copy the models 16K at a time.
    UnsignedInt32 lintRemaining = xintLength;
    UnsignedInt32 lintCopyBytes = 0x4000;
    while(lintRemaining) {
        if(lintRemaining > 0x4000)  // More than 16K left, copy 16K.
            lintRemaining -= 0x4000;
        else {  // 16K or less left, copy all of what's left.
            lintCopyBytes = lintRemaining;
            lintRemaining = 0;
        }
        lReadIO.Read(lpachrCopyBuffer, lintCopyBytes);
        lWriteIO.Write(lpachrCopyBuffer, lintCopyBytes);
    }

    // Make sure the copy was complete and free the buffer.
    lReadIO.EndReadBlock();
    if(lWriteIO.EndWriteBlock() != xintLength)
        throw eCorruptBlock;
    delete [] lpachrCopyBuffer;
}
UnsignedInt32 CCubitFile::CreateModel ( EModelType  xeModelType,
HModel xintModel 
)

Definition at line 439 of file CCubitFile.cpp.

{
    if(!mpWriteFile)  return eFileWriteError;

    // Allocate a new bigger model table, copy the existing table (if any)
    // into the new one and then replace the old one.
    SCubitFileModelEntry* lpaModels =
        new SCubitFileModelEntry[mWriteContents.mintNumModels + 1];
    if(!lpaModels)  return eMemoryError;
    if(mpaWriteModels) {
        memcpy(lpaModels, mpaWriteModels,
            sizeof(SCubitFileModelEntry) * mWriteContents.mintNumModels);
        delete [] mpaWriteModels;
    }
    mpaWriteModels = lpaModels;
    
    // Initialize the new model's table entry.
    mpaWriteModels[mWriteContents.mintNumModels].mintModelHandle =
        xintModel;// = mintNextModelID++;
    mpaWriteModels[mWriteContents.mintNumModels].mintModelOffset = 0;
    mpaWriteModels[mWriteContents.mintNumModels].mintModelLength = 0;
    mpaWriteModels[mWriteContents.mintNumModels].mintModelType = xeModelType;
    mpaWriteModels[mWriteContents.mintNumModels].mintModelOwner = 0;
    mpaWriteModels[mWriteContents.mintNumModels].mintModel64bitOSPad = 0;
    mWriteContents.mintNumModels++;
    
    return eSuccess;
}

Definition at line 469 of file CCubitFile.cpp.

{
    if(!mpWriteFile)  return eFileWriteError;

    // Flag the model in the old file as marked for deletion.
    UnsignedInt32 lintIndex;
    if(!FindModel(xintModel, mpaReadModels, mReadContents.mintNumModels, lintIndex))
        return eNotFound;
    if(mpaReadModelStat[lintIndex] == eStatWritten)
        return eOrderError;
    mpaReadModelStat[lintIndex] = eStatDelete;

    // Remove the model from the write file's table and close up the position in
    // the model table (if applicable).
    if(FindModel(xintModel, mpaWriteModels, mWriteContents.mintNumModels, lintIndex)) {
        mWriteContents.mintNumModels--;
        if(mWriteContents.mintNumModels &&
            (lintIndex < mWriteContents.mintNumModels)) {
            for(UnsignedInt32 lintCopyTo = lintIndex; lintCopyTo <
                mWriteContents.mintNumModels; lintCopyTo++) {
                memcpy(&mpaWriteModels[lintCopyTo],
                    &mpaWriteModels[lintCopyTo + 1],
                    sizeof(SCubitFileModelEntry));
            }
        }
    }

    // Find any models that have the deleted model as their owner and reset
    // the owner to no owner (0).
    if(mWriteContents.mintNumModels) {
        for(UnsignedInt32 lintModel = 0; lintModel <
            mWriteContents.mintNumModels; lintModel++) {
            if(mpaWriteModels[lintModel].mintModelOwner == xintModel)
                mpaWriteModels[lintModel].mintModelOwner = 0;
        }
    }

    // Delete any meta-data that belonged with the deleted model.
    mpMetaData->ClearMetaDataForID(xintModel);

    return eSuccess;
}

Definition at line 1373 of file CCubitFile.cpp.

{
    try {
        if(!mpReadFEModel)
            return eOrderError;
        mpReadFEModel->EndRead();
        delete mpReadFEModel;
        mpReadFEModel = NULL;
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}

Definition at line 717 of file CCubitFile.cpp.

{
    return eSuccess;
}

Definition at line 863 of file CCubitFile.cpp.

{
  return eSuccess;
}

Definition at line 1656 of file CCubitFile.cpp.

{
    try {
        if(!mpReadSimModel)
            return eOrderError;
        mpReadSimModel->EndRead();
        delete mpReadSimModel;
        mpReadSimModel = NULL;
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}

Definition at line 1049 of file CCubitFile.cpp.

{
    try {
        if(!mpWriteFEModel)
            throw eOrderError;
        mpaWriteModels[mintFEModelIndex].mintModelLength =
            mpWriteFEModel->EndWrite();
        delete mpWriteFEModel;
        mpWriteFEModel = NULL;

        UnsignedInt32 lintReadIndex;
        if(FindModel(mpaWriteModels[mintFEModelIndex].mintModelHandle,
            mpaReadModels, mReadContents.mintNumModels, lintReadIndex))
            mpaReadModelStat[lintReadIndex] = eStatWritten;

        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}

Definition at line 677 of file CCubitFile.cpp.

{
    return eSuccess;
}

Definition at line 780 of file CCubitFile.cpp.

{
  if (!mpWriteFile)
    return eFileWriteError;
  
    // Find the model's write record
  UnsignedInt32 lintWriteIndex;
  if(!FindModel(xintModelId,
                mpaWriteModels,
                mWriteContents.mintNumModels,
                lintWriteIndex))
    return eNotFound;

    // Make sure we saved the start position
  if (mpaWriteModels[lintWriteIndex].mintModelOffset == 0)
    return eOrderError;
  
    // Get the end of the FILE.
  if (NCubitFile::SetLocation(mpWriteFile.file(), 0, SEEK_END))
    return eFileSeekError;
  UnsignedInt32 cur_pos = GetLocation(mpWriteFile.file());
  
    // See how many bytes that is past our saved position.
  UnsignedInt32 size_in_bytes = cur_pos - mpaWriteModels[lintWriteIndex].mintModelOffset;
  
    // Locate the model's index in the read contents, if possible, and
    // make sure the model has not already been written or deleted, and
    // then mark it as written.
  UnsignedInt32 lintReadIndex;
  if(FindModel(xintModelId, mpaReadModels,
               mReadContents.mintNumModels, lintReadIndex))
  {
    if(mpaReadModelStat[lintReadIndex] != eStatWriting)
      throw eOrderError;
    mpaReadModelStat[lintReadIndex] = eStatWritten;
  }
  
    // Save the size to the model header.
  mpaWriteModels[lintWriteIndex].mintModelLength = size_in_bytes;
  
  return eSuccess;
}

Definition at line 1503 of file CCubitFile.cpp.

{
    try {
        if(!mpWriteSimModel)
            throw eOrderError;
        mpaWriteModels[mintSimModelIndex].mintModelLength =
            mpWriteSimModel->EndWrite();
        delete mpWriteSimModel;
        mpWriteSimModel = NULL;

        UnsignedInt32 lintReadIndex;
        if(FindModel(mpaWriteModels[mintSimModelIndex].mintModelHandle,
            mpaReadModels, mReadContents.mintNumModels, lintReadIndex))
            mpaReadModelStat[lintReadIndex] = eStatWritten;

        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}
UnsignedInt32 CCubitFile::FindModel ( HModel  xintModel,
SCubitFileModelEntry xpaModels,
UnsignedInt32  xintNumModels,
UnsignedInt32 xintIndex 
) [private]

Definition at line 538 of file CCubitFile.cpp.

{
    if(xintNumModels) {
        for(UnsignedInt32 lintMod = 0; lintMod < xintNumModels; lintMod++) {
            if(xpaModels[lintMod].mintModelHandle == xintModel) {
                xintIndex = lintMod;
                return 1; // success
            }
        }
    }
    return 0; // failure
}
void CCubitFile::FreeAll ( ) [private]

Definition at line 93 of file CCubitFile.cpp.

{
    // Free all allocated memory.
    if(mstrReadFileName)
        delete [] mstrReadFileName;
    if(mstrWriteFileName)
        delete [] mstrWriteFileName;
    if(mstrBackupFileName)
        delete [] mstrBackupFileName;
    mstrReadFileName = mstrWriteFileName = mstrBackupFileName = NULL;
    if(mpaReadModels)
        delete [] mpaReadModels;
    if(mpaWriteModels)
        delete [] mpaWriteModels;
    mpaReadModels = mpaWriteModels = NULL;
    if(mpaReadModelStat)
        delete [] mpaReadModelStat;
    mpaReadModelStat = NULL;
    if(mpMetaData)
        delete mpMetaData;
    mpMetaData = NULL;

    // Close any open files.
    try {
        if(mpReadFile)
            mpReadFile.close();
        if(mpWriteFile)
            mpWriteFile.close();
    }
    catch(...)  { }
}
UnsignedInt32 NCubitFile::CCubitFile::GetModelList ( UnsignedInt32 xintNumModels,
const SModelData *&  xpaModels 
)
UnsignedInt32 CCubitFile::GetModelOwner ( HModel  xintModel,
HModel xintOwner 
)

Definition at line 513 of file CCubitFile.cpp.

{
    // Flag the model in the old file as marked for deletion.
    UnsignedInt32 lintIndex;
    if(!FindModel(xintModel, mpaWriteModels, mWriteContents.mintNumModels, lintIndex))
        return eNotFound;
    xintOwner = mpaWriteModels[lintIndex].mintModelOwner;
    return eSuccess;
}

Definition at line 1674 of file CCubitFile.cpp.

{
    xpMetaData = NULL;
    if(xeType == eModelMetaData)
        xpMetaData = mpMetaData;
    else if(mpReadFEModel) {
        switch(xeType) {
        case eGeomMetaData:
            xpMetaData = &mpReadFEModel->GetGeomMetaData();
            break;
        case eNodeMetaData:
            xpMetaData = &mpReadFEModel->GetNodeMetaData();
            break;
        case eElemMetaData:
            xpMetaData = &mpReadFEModel->GetElemMetaData();
            break;
        case eGroupMetaData:
            xpMetaData = &mpReadFEModel->GetGroupMetaData();
            break;
        case eBlockMetaData:
            xpMetaData = &mpReadFEModel->GetBlockMetaData();
            break;
        case eNodeSetMetaData:
            xpMetaData = &mpReadFEModel->GetNodeSetMetaData();
            break;
        case eSideSetMetaData:
            xpMetaData = &mpReadFEModel->GetSideSetMetaData();
            break;
          default:
            break;
        }
    }
    else if (mpReadSimModel) {
        switch (xeType) {
            case eBCSetMetaData:
                xpMetaData = &mpReadSimModel->GetBCSetMetaData();
                break;
            case eMaterialMetaData:
                xpMetaData = &mpReadSimModel->GetMaterialMetaData();
                break;
            case eConstraintMetaData:
                xpMetaData = &mpReadSimModel->GetConstraintMetaData();
                break;
            default:
                break;
        }
    }
    else
        return eOrderError;
    return xpMetaData ? eSuccess : eNotFound;
}

Definition at line 423 of file CCubitFile.cpp.

{
    UnsignedInt32 lintIndex;
    if(FindModel(xintModel, mpaReadModels, mReadContents.mintNumModels, lintIndex)) {
        xintLength = mpaReadModels[lintIndex].mintModelLength;
        return eSuccess;
    }
    else {
        xintLength = 0;
        return eNotFound;
    }
}

Definition at line 1728 of file CCubitFile.cpp.

{
    xpMetaData = NULL;
    if(xeType == eModelMetaData)
        xpMetaData = mpMetaData;
    else if(mpWriteFEModel) {
        switch(xeType) {
        case eGeomMetaData:
            xpMetaData = &mpWriteFEModel->GetGeomMetaData();
            break;
        case eNodeMetaData:
            xpMetaData = &mpWriteFEModel->GetNodeMetaData();
            break;
        case eElemMetaData:
            xpMetaData = &mpWriteFEModel->GetElemMetaData();
            break;
        case eGroupMetaData:
            xpMetaData = &mpWriteFEModel->GetGroupMetaData();
            break;
        case eBlockMetaData:
            xpMetaData = &mpWriteFEModel->GetBlockMetaData();
            break;
        case eNodeSetMetaData:
            xpMetaData = &mpWriteFEModel->GetNodeSetMetaData();
            break;
        case eSideSetMetaData:
            xpMetaData = &mpWriteFEModel->GetSideSetMetaData();
            break;
          default:
              break;
        }
    }
    else if (mpWriteSimModel) {
        switch (xeType) {
            case eBCSetMetaData:
                xpMetaData = &mpWriteSimModel->GetBCSetMetaData();
                break;
            case eMaterialMetaData:
                xpMetaData = &mpWriteSimModel->GetMaterialMetaData();
                break;
            case eConstraintMetaData:
                xpMetaData = &mpWriteSimModel->GetConstraintMetaData();
                break;
            default:
                break;
        }
    }
    else
        return eOrderError;
    return xpMetaData ? eSuccess : eNotFound;
}

Definition at line 413 of file CCubitFile.cpp.

{
    UnsignedInt32 lintIndex;
    if(mWriteContents.mintNumModels)
        return FindModel(xintModel, mpaWriteModels, mWriteContents.mintNumModels, lintIndex);
    else if(mReadContents.mintNumModels)
        return FindModel(xintModel, mpaReadModels, mReadContents.mintNumModels, lintIndex);
    return 0;  // failure
}
CCubitFile::EErrorCode CCubitFile::Open ( const char *  xstrReadFileName,
const char *  xstrWriteFileName,
const char *  xstrBackupFileName = NULL 
)

Definition at line 127 of file CCubitFile.cpp.

{
    try {
        if(!xstrReadFileName && !xstrWriteFileName)
            throw ePassedNullPointer;

        mpMetaData = new CMetaData;

        // If a file has been designated for reading, copy its name and try to
        // open it.
        if(xstrReadFileName ) {
            UnsignedInt32 lintFileName = std::strlen(xstrReadFileName);
            mstrReadFileName = new char[lintFileName + 1];
            std::strcpy(mstrReadFileName, xstrReadFileName);     

            if( !xstrWriteFileName )
            {
              mpReadFile.open(mstrReadFileName, "rb");
              if(!mpReadFile)
                  throw eFileReadError;

              // Test to see if the file is a cubit file... it should begin with
              // the string 'CUBE'.
              unsigned char lachrMagic[4];
              if(fread(lachrMagic, 1, 4, mpReadFile.file()) != 4)
                  throw eFileUnrecognizedFormat;
              if((lachrMagic[0] != 'C') || (lachrMagic[1] != 'U') ||
                  (lachrMagic[2] != 'B') || (lachrMagic[3] != 'E'))
                  throw eFileUnrecognizedFormat;
              
              // Load the file's "table of contents".
              CIOWrapper lIO(mpReadFile.file(), 4, 0);
              lIO.BeginReadBlock(4);
              lIO.Read((UnsignedInt32*)&mReadContents, mintSizeOfContents);
              lIO.EndReadBlock();
              
              if(mReadContents.mintHeaderSchema > 0)
                  throw eFileUnrecognizedFormat;
              
              if(mReadContents.mintNumModels) {
                  mpaReadModels =
                      new SCubitFileModelEntry[mReadContents.mintNumModels];
                  mpaReadModelStat = new EModelStat[mReadContents.mintNumModels];
                  if(!mpaReadModels || !mpaReadModelStat)  throw eMemoryError;

                  lIO.BeginReadBlock(mReadContents.mintModelTableOffset);
                  lIO.Read((UnsignedInt32*)mpaReadModels,
                      mReadContents.mintNumModels * mintSizeOfModel);
                  lIO.EndReadBlock();

                  UnsignedInt32 lintMod;
                  for(lintMod = 0; lintMod < mReadContents.mintNumModels; lintMod++) {
                      mpaReadModelStat[lintMod] = eStatNotWritten;
                      if(mpaReadModels[lintMod].mintModelHandle >= mintNextModelID)
                          mintNextModelID = mpaReadModels[lintMod].mintModelHandle + 1;
                  }
              }
              
              // Read the file-scoped (model) meta-data.
              mpMetaData->ReadMetaData(mpReadFile.file(),
                  mReadContents.mintModelMetaDataOffset, 0,
                  mReadContents.mintHeaderSourceEndian);
            }
            else
            {
               mReadContents.mintHeaderSourceEndian = mintNativeEndian;
               mReadContents.mintHeaderSchema = 0;
               mReadContents.mintNumModels = 0;
               mReadContents.mintModelTableOffset = 0;
               mReadContents.mintModelMetaDataOffset = 0;
               mReadContents.mintActiveFEModel = 0;

              // Copy the backup file name, if specified.
              if(xstrBackupFileName) {
                  UnsignedInt32 lintFileName = std::strlen(xstrBackupFileName);
                  mstrBackupFileName = new char[lintFileName + 1];
                  std::strcpy(mstrBackupFileName, xstrBackupFileName);
              }
            }
          }
          else {
              // If there wasn't a file to read, initialize the read contents to
              // nothing.
              mReadContents.mintHeaderSourceEndian = mintNativeEndian;
              mReadContents.mintHeaderSchema = 0;
              mReadContents.mintNumModels = 0;
              mReadContents.mintModelTableOffset = 0;
              mReadContents.mintModelMetaDataOffset = 0;
              mReadContents.mintActiveFEModel = 0;
        }
        
        // If a file has been designated for writing
        if(xstrWriteFileName) {
            UnsignedInt32 lintFileName = std::strlen(xstrWriteFileName);
            mstrWriteFileName = new char[lintFileName + 10];

            // If the read and write file names don't match, then the write
            // file can be opened by name.
            if(!mstrReadFileName || std::strcmp(mstrReadFileName, xstrWriteFileName)) {
                mintWriteTempFile = 0;
                std::strcpy(mstrWriteFileName, xstrWriteFileName);       
                mpWriteFile.open(mstrWriteFileName, "wb");
            }
            // Otherwise, generate a temporary file name to write to so that
            // the read file's contents will not be destroyed until it is 
            // verifiable that any new writes are successful.
            else {
                mintWriteTempFile = 1;
                UnsignedInt32 lintTempFile = 0;
                while(!mpWriteFile && (lintTempFile < 0xFF)) {
                    sprintf(mstrWriteFileName, "%s~%.2x.tmp",
                        mstrReadFileName, lintTempFile);
                    mpWriteFile.open(mstrWriteFileName, "wb");
                    lintTempFile++;
                }
            }
            if(!mpWriteFile)
                throw eFileWriteError;
            
            // Initialize the write file contents - copy the model inventory
            // (but not actual contents yet) from the read file.
            mWriteContents.mintHeaderSourceEndian = mintNativeEndian;
            mWriteContents.mintHeaderSchema = 0;
            mWriteContents.mintNumModels = mReadContents.mintNumModels;
            mWriteContents.mintModelTableOffset = 0;
            mWriteContents.mintModelMetaDataOffset = 0;
            mWriteContents.mintActiveFEModel = mReadContents.mintActiveFEModel;
            mintWriteBuffNumModels = 0;

            if(mWriteContents.mintNumModels) {
                mpaWriteModels =
                    new SCubitFileModelEntry[mWriteContents.mintNumModels];
                if(!mpaWriteModels)  throw eMemoryError;

                UnsignedInt32 lintMod;
                for(lintMod = 0; lintMod < mWriteContents.mintNumModels; lintMod++) {
                    mpaWriteModels[lintMod].mintModelHandle =
                        mpaReadModels[lintMod].mintModelHandle;
                    mpaWriteModels[lintMod].mintModelOffset = 0;
                    mpaWriteModels[lintMod].mintModelLength = 0;
                    mpaWriteModels[lintMod].mintModelType =
                        mpaReadModels[lintMod].mintModelType;
                    mpaWriteModels[lintMod].mintModelOwner =
                        mpaReadModels[lintMod].mintModelOwner;
                }
            }

            // Initialize the write file by writing its identity and an initial
            // table of contents.
            CIOWrapper lIO(mpWriteFile.file());
            lIO.BeginWriteBlock(0);
            lIO.Write("CUBE", 4);
            lIO.Write((UnsignedInt32*)&mWriteContents, mintSizeOfContents);
            lIO.EndWriteBlock();

            WriteModelTable();
        }
        else {
            // If there wasn't a file to written, initialize the write contents
            // to nothing.
            mWriteContents.mintHeaderSourceEndian = mintNativeEndian;
            mWriteContents.mintHeaderSchema = 0;
            mWriteContents.mintNumModels = 0;
            mWriteContents.mintModelTableOffset = 0;
            mWriteContents.mintModelMetaDataOffset = 0;
            mWriteContents.mintActiveFEModel = 0;
        }
        
        return eSuccess;
    }

    // Handle all open errors by reseting the file object.
    catch(EErrorCode xeErrorCode) {
        FreeAll();
        return xeErrorCode;
    }
    catch(...)  {
        FreeAll();
        return eUnknownError;
    }
}
UnsignedInt32 CCubitFile::ReadBCSet ( UnsignedInt32  xintIndex,
UnsignedInt32 xintBCSetID,
UnsignedInt32 xintBCSetUniqueID,
UnsignedInt32 xintBCSetAnalysisType,
UnsignedInt32 xintRestraintTypesCount,
UnsignedInt32 xintLoadTypesCount,
UnsignedInt32 xintContactPairTypesCount,
SBCSetData *&  xpaBCSetRestraintData,
SBCSetData *&  xpaBCSetLoadData,
SBCSetData *&  xpaBCSetContactPairData 
)

Definition at line 1556 of file CCubitFile.cpp.

{
    UnsignedInt32 lintErrorCode;
    try {
        if(!mpReadSimModel)
            throw eOrderError;

        mpReadSimModel->ReadBCSet(xintIndex,xintBCSetID,xintBCSetUniqueID,
            xintBCSetAnalysisType,xintRestraintTypesCount,
            xintLoadTypesCount,xintContactPairTypesCount,xpaBCSetRestraintData,
            xpaBCSetLoadData,xpaBCSetContactPairData);

        return eSuccess;
    }
    catch(EErrorCode xeErrorCode) {
        lintErrorCode = xeErrorCode;
    }
    catch(...) {
        lintErrorCode = eUnknownError;
    }
    xintBCSetID = xintBCSetUniqueID = xintBCSetAnalysisType = 0;
    xintRestraintTypesCount = xintLoadTypesCount = xintContactPairTypesCount = 0;
    xpaBCSetRestraintData = NULL;
    xpaBCSetLoadData = NULL;
    xpaBCSetContactPairData = NULL;
    return lintErrorCode;
}
UnsignedInt32 CCubitFile::ReadBlock ( UnsignedInt32  xintIndex,
UnsignedInt32 xintBlockID,
int &  unique_id,
UnsignedInt32 xintBlockType,
UnsignedInt32 xintBlockColor,
UnsignedInt32 xintMixedElemType,
UnsignedInt32 xintDefPyramidType,
UnsignedInt32 xintMaterialID,
UnsignedInt32 xintBlockDimension,
UnsignedInt32 xintNumTypes,
SBlockData *&  xpaBlockData,
UnsignedInt32 xintAttributeOrder,
double *&  xpadblAttributes 
)

Definition at line 1233 of file CCubitFile.cpp.

{
    UnsignedInt32 lintErrorCode;
    try {
        if(!mpReadFEModel)
            throw eOrderError;
        mpReadFEModel->ReadBlock(xintIndex, xintBlockID, unique_id,
            xintBlockType, xintBlockColor, xintMixedElemType,
            xintDefPyramidType, xintMaterialID, xintBlockDimension,
            xintNumTypes, xpaBlockData, xintAttributeOrder, xpadblAttributes);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode) {
        lintErrorCode = xeErrorCode;
    }
    catch(...) {
        lintErrorCode = eUnknownError;
    }
    xintBlockID = xintBlockType = xintBlockColor = xintMixedElemType =
        xintDefPyramidType = xintMaterialID = xintNumTypes =
        xintAttributeOrder = 0;
    xpaBlockData = NULL;
    xpadblAttributes = NULL;
    return lintErrorCode;
}
UnsignedInt32 CCubitFile::ReadConstraint ( UnsignedInt32  xintIndex,
UnsignedInt32 xintConstraintID,
UnsignedInt32 xintConstraintUniqueID,
UnsignedInt32 xintConstraintType,
UnsignedInt32 xintIndependentTypeCount,
SConstraintData *&  xpaIndependentData,
UnsignedInt32 xintDependentTypeCount,
SConstraintData *&  xpaDependentData 
)

Definition at line 1624 of file CCubitFile.cpp.

{
    UnsignedInt32 lintErrorCode;
    try {
        if(!mpReadSimModel)
            throw eOrderError;

        mpReadSimModel->ReadConstraint(xintIndex,xintConstraintID,xintConstraintUniqueID,
            xintConstraintType,xintIndependentTypeCount,xpaIndependentData,
            xintDependentTypeCount,xpaDependentData);

        return eSuccess;
    }
    catch(EErrorCode xeErrorCode) {
        lintErrorCode = xeErrorCode;
    }
    catch(...) {
        lintErrorCode = eUnknownError;
    }
    xintConstraintID = xintConstraintUniqueID = xintConstraintType = 0;
    xpaIndependentData = xpaDependentData = NULL;
    return lintErrorCode;
}
UnsignedInt32 CCubitFile::ReadElems ( HModel  xintFEModel,
UnsignedInt32  xintIndex,
UnsignedInt32 xintGeomID,
UnsignedInt32 xintNumTypes,
SElemData *&  xpaElemData 
)

Definition at line 1140 of file CCubitFile.cpp.

{
    UnsignedInt32 lintErrorCode;
    try {

      CMetaData *mmd = NULL;
      this->GetReadMetaData(CCubitFile::eModelMetaData, mmd);
      if( !mmd )
      {
        throw eFileReadError;
      }

      // get the data version from the file.
      // Version 1.0 has an old element type enum
      double data_version = 0.0;
      mmd->GetValue(meshModelId, "DataVersion", data_version);
      
      if(!mpReadFEModel)
            throw eOrderError;
        mpReadFEModel->ReadElems(data_version, xintIndex, xintGeomID,
            xintNumTypes, xpaElemData);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode) {
        lintErrorCode = xeErrorCode;
    }
    catch(...) {
        lintErrorCode = eUnknownError;
    }
    xintNumTypes = 0;
    xpaElemData = NULL;
    return lintErrorCode;
}
UnsignedInt32 CCubitFile::ReadGroupIdentity ( UnsignedInt32  xintIndex,
UnsignedInt32 xintGroupID,
UnsignedInt32 xintGroupType,
ConstCharPtr xpachrGroupName 
)

Definition at line 1181 of file CCubitFile.cpp.

{
    UnsignedInt32 lintErrorCode;
    try {
        if(!mpReadFEModel)
            throw eOrderError;
        mpReadFEModel->ReadGroupIdentity(xintIndex,
            xintGroupID, xintGroupType, xpachrGroupName);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode) {
        lintErrorCode = xeErrorCode;
    }
    catch(...) {
        lintErrorCode = eUnknownError;
    }
    xintGroupID = xintGroupType = 0;
    xpachrGroupName = NULL;
    return lintErrorCode;
}
UnsignedInt32 CCubitFile::ReadGroupMembers ( UnsignedInt32  xintIndex,
UnsignedInt32 xintNumTypes,
SGroupData *&  xpaGroupData 
)

Definition at line 1208 of file CCubitFile.cpp.

{
    UnsignedInt32 lintErrorCode;
    try {
        if(!mpReadFEModel)
            throw eOrderError;
        mpReadFEModel->ReadGroupMembers(xintIndex, xintNumTypes, xpaGroupData);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode) {
        lintErrorCode = xeErrorCode;
    }
    catch(...) {
        lintErrorCode = eUnknownError;
    }
    xintNumTypes = 0;
    xpaGroupData = NULL;
    return lintErrorCode;
}
UnsignedInt32 CCubitFile::ReadMaterial ( UnsignedInt32  xintIndex,
UnsignedInt32 xintMaterialID,
UnsignedInt32 xintMaterialUniqueID,
UnsignedInt32 xintPropertiesCount,
SMaterialData *&  xpaMaterialData 
)

Definition at line 1596 of file CCubitFile.cpp.

{
    UnsignedInt32 lintErrorCode;
    try {
        if(!mpReadSimModel)
            throw eOrderError;

        mpReadSimModel->ReadMaterial(xintIndex,xintMaterialID,xintMaterialUniqueID,
            xintPropertiesCount,xpaMaterialData);

        return eSuccess;
    }
    catch(EErrorCode xeErrorCode) {
        lintErrorCode = xeErrorCode;
    }
    catch(...) {
        lintErrorCode = eUnknownError;
    }
    xintMaterialID = xintMaterialUniqueID = xintPropertiesCount = 0;
    xpaMaterialData = NULL;
    return lintErrorCode;
}
UnsignedInt32 CCubitFile::ReadNodes ( UnsignedInt32  xintIndex,
UnsignedInt32 xintGeomID,
UnsignedInt32 xintNodeCount,
UnsignedInt32 *&  xpaintNodeIDs,
double *&  xpadblX,
double *&  xpadblY,
double *&  xpadblZ 
)

Definition at line 1109 of file CCubitFile.cpp.

{
    UnsignedInt32 lintErrorCode;
    try {
        if(!mpReadFEModel)
            throw eOrderError;
        mpReadFEModel->ReadNodes(xintIndex, xintGeomID,
            xintNodeCount, xpaintNodeIDs, xpadblX, xpadblY, xpadblZ);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode) {
        lintErrorCode = xeErrorCode;
    }
    catch(...) {
        lintErrorCode = eUnknownError;
    }
    xintNodeCount = 0;
    xpaintNodeIDs = NULL;
    xpadblX = xpadblY = xpadblZ = NULL;
    return lintErrorCode;
}
UnsignedInt32 CCubitFile::ReadNodeSet ( UnsignedInt32  xintIndex,
UnsignedInt32 xintNodeSetID,
int &  unique_id,
UnsignedInt32 xintColor,
UnsignedInt32 xintPointSymbol,
UnsignedInt32 xintNumTypes,
SNodeSetData *&  xpaNodeSetData,
std::vector< char > &  bcdata 
)

Definition at line 1274 of file CCubitFile.cpp.

{
    UnsignedInt32 lintErrorCode;
    try {
        if(!mpReadFEModel)
            throw eOrderError;
        mpReadFEModel->ReadNodeSet(xintIndex, xintNodeSetID, unique_id,
            xintColor, xintPointSymbol, xintNumTypes, xpaNodeSetData, bcdata);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode) {
        lintErrorCode = xeErrorCode;
    }
    catch(...) {
        lintErrorCode = eUnknownError;
    }
    xintNodeSetID = xintColor = xintPointSymbol = xintNumTypes = 0;
    xpaNodeSetData = NULL;
    return lintErrorCode;
}
UnsignedInt32 CCubitFile::ReadSideSet_10 ( UnsignedInt32  xintIndex,
UnsignedInt32 xintSideSetID,
UnsignedInt32 xintColor,
UnsignedInt32 xintUseShells,
UnsignedInt32 xintNumTypes,
SSideSetData_10 *&  xpaSideSetData,
UnsignedInt32 xintNumDistFact,
double *&  xpadblDistribution 
)

Definition at line 1305 of file CCubitFile.cpp.

{
    UnsignedInt32 lintErrorCode;
    try {
        if(!mpReadFEModel)
            throw eOrderError;
        mpReadFEModel->ReadSideSet_10(xintIndex, xintSideSetID,
            xintColor, xintUseShells, xintNumTypes, xpaSideSetData,
            xintNumDistFact, xpadblDistribution);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode) {
        lintErrorCode = xeErrorCode;
    }
    catch(...) {
        lintErrorCode = eUnknownError;
    }
    xintSideSetID = xintColor = xintNumTypes = xintNumDistFact = 0;
    xpaSideSetData = NULL;
    xpadblDistribution = NULL;
    return lintErrorCode;
}
UnsignedInt32 CCubitFile::ReadSideSet_11 ( UnsignedInt32  xintIndex,
UnsignedInt32 xintSideSetID,
int &  unique_id,
UnsignedInt32 xintColor,
UnsignedInt32 xintUseShells,
UnsignedInt32 xintNumTypes,
SSideSetData_11 *&  xpaSideSetData,
UnsignedInt32 xintNumDistFact,
double *&  xpadblDistribution,
std::vector< char > &  bcdata 
)

Definition at line 1338 of file CCubitFile.cpp.

{
    UnsignedInt32 lintErrorCode;
    try {
        if(!mpReadFEModel)
            throw eOrderError;
        mpReadFEModel->ReadSideSet_11(xintIndex, xintSideSetID, unique_id,
            xintColor, xintUseShells, xintNumTypes, xpaSideSetData,
            xintNumDistFact, xpadblDistribution, bcdata);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode) {
        lintErrorCode = xeErrorCode;
    }
    catch(...) {
        lintErrorCode = eUnknownError;
    }
    xintSideSetID = xintColor = xintNumTypes = xintNumDistFact = 0;
    xpaSideSetData = NULL;
    xpadblDistribution = NULL;
    return lintErrorCode;
}
UnsignedInt32 CCubitFile::SetModelOwner ( HModel  xintModel,
HModel  xintOwner 
)

Definition at line 524 of file CCubitFile.cpp.

{
    // Flag the model in the old file as marked for deletion.
    UnsignedInt32 lintIndex;
    if(xintOwner &&  // don't allow the model to have a non-existant owner.
        !FindModel(xintOwner, mpaWriteModels, mWriteContents.mintNumModels, lintIndex))
        return eNotFound;
    if(!FindModel(xintModel, mpaWriteModels, mWriteContents.mintNumModels, lintIndex))
        return eNotFound;
    mpaWriteModels[lintIndex].mintModelOwner = xintOwner;
    return eSuccess;
}
UnsignedInt32 CCubitFile::WriteBCSet ( UnsignedInt32  xintIndex,
UnsignedInt32  xintBCSetID,
UnsignedInt32  xintBCSetUniqueID,
UnsignedInt32  xintBCSetAnalysisType,
UnsignedInt32  xintRestraintTypesCount,
UnsignedInt32  xintLoadTypesCount,
UnsignedInt32  xintContactPairTypesCount,
SBCSetData xpaBCSetRestraintData,
SBCSetData xpaBCSetLoadData,
SBCSetData xpaBCSetContactPairData 
)

Definition at line 1431 of file CCubitFile.cpp.

{
    try {
        if(!mpWriteSimModel)
            throw eOrderError;

        mpWriteSimModel->WriteBCSet(xintIndex,xintBCSetID,xintBCSetUniqueID,
            xintBCSetAnalysisType,xintRestraintTypesCount,xintLoadTypesCount,
            xintContactPairTypesCount,xpaBCSetRestraintData,
            xpaBCSetLoadData,xpaBCSetContactPairData);

        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}
UnsignedInt32 CCubitFile::WriteBlock ( UnsignedInt32  xintIndex,
UnsignedInt32  xintBlockID,
int  block_unique_id,
UnsignedInt32  xintBlockType,
UnsignedInt32  xintBlockColor,
UnsignedInt32  xintMixedElemType,
UnsignedInt32  xintDefPyramidType,
UnsignedInt32  xintMaterialID,
UnsignedInt32  xintBlockDimension,
UnsignedInt32  xintNumTypes,
SBlockData xpaBlockData,
UnsignedInt32  xintAttributeOrder,
double *  xpadblAttributes 
)

Definition at line 973 of file CCubitFile.cpp.

{
    try {
        if(!mpWriteFEModel)
            throw eOrderError;
        mpWriteFEModel->WriteBlock(xintIndex, xintBlockID, unique_id, xintBlockType,
            xintBlockColor, xintMixedElemType, xintDefPyramidType,
            xintMaterialID, xintBlockDimension, xintNumTypes, xpaBlockData,
            xintAttributeOrder, xpadblAttributes);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}
UnsignedInt32 CCubitFile::WriteConstraint ( UnsignedInt32  xintIndex,
UnsignedInt32  xintConstraintID,
UnsignedInt32  xintConstraintUniqueID,
UnsignedInt32  xintConstraintType,
UnsignedInt32  xintIndependentTypeCount,
SConstraintData xpaIndependentData,
UnsignedInt32  xintDependentTypeCount,
SConstraintData xpaDependentData 
)

Definition at line 1479 of file CCubitFile.cpp.

{
    try {
        if(!mpWriteSimModel)
            throw eOrderError;

        mpWriteSimModel->WriteConstraint(xintIndex,xintConstraintID,xintConstraintUniqueID,
            xintConstraintType,xintIndependentTypeCount,xpaIndependentData,
            xintDependentTypeCount,xpaDependentData);

        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}
UnsignedInt32 CCubitFile::WriteElems ( UnsignedInt32  xintIndex,
UnsignedInt32  xintNumTypes,
SElemData xpaElemData 
)

Definition at line 937 of file CCubitFile.cpp.

{
    try {
        if(!mpWriteFEModel)
            throw eOrderError;
        mpWriteFEModel->WriteElems(xintIndex, xintNumTypes, xpaElemData);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}
UnsignedInt32 CCubitFile::WriteGroup ( UnsignedInt32  xintIndex,
UnsignedInt32  xintGroupID,
UnsignedInt32  xintGroupType,
ConstCharPtr  xpachrGroupName,
UnsignedInt32  xintNumTypes,
SGroupData xpaGroupData 
)

Definition at line 953 of file CCubitFile.cpp.

{
    try {
        if(!mpWriteFEModel)
            throw eOrderError;
        mpWriteFEModel->WriteGroup(xintIndex, xintGroupID,
            xintGroupType, xpachrGroupName, xintNumTypes, xpaGroupData);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}
UnsignedInt32 CCubitFile::WriteMaterial ( UnsignedInt32  xintIndex,
UnsignedInt32  xintMaterialID,
UnsignedInt32  xintMaterialUniqueID,
UnsignedInt32  xintPropertiesCount,
SMaterialData xpaMaterialData 
)

Definition at line 1459 of file CCubitFile.cpp.

{
    try {
        if(!mpWriteSimModel)
            throw eOrderError;

        mpWriteSimModel->WriteMaterial(xintIndex,xintMaterialID,xintMaterialUniqueID,
            xintPropertiesCount,xpaMaterialData);

        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}
void CCubitFile::WriteModelTable ( ) [private]

Definition at line 556 of file CCubitFile.cpp.

{
    if(!mpWriteFile)  throw eFileWriteError;

    if(!mWriteContents.mintNumModels)  return;  // no models... nothing to do!

    CIOWrapper lIO(mpWriteFile.file());

    // Write the model table, if the number of models has increased, write the
    // table to a new location in the file, otherwise reuse the previous
    // table's file space.
    if(mWriteContents.mintNumModels > mintWriteBuffNumModels) {
        mintWriteBuffNumModels = mWriteContents.mintNumModels;
        mWriteContents.mintModelTableOffset = lIO.BeginWriteBlock();
    }
    else
        lIO.BeginRewriteBlock(mWriteContents.mintModelTableOffset, 0);
    lIO.Write((UnsignedInt32*)mpaWriteModels,
        mWriteContents.mintNumModels * mintSizeOfModel);
    lIO.EndWriteBlock();

    // Rewrite the contents header to reflect any model table changes.
    lIO.BeginRewriteBlock(4, 0);
    lIO.Write((UnsignedInt32*)&mWriteContents, mintSizeOfContents);
    lIO.EndWriteBlock();
}
UnsignedInt32 CCubitFile::WriteNodes ( UnsignedInt32  xintIndex,
UnsignedInt32  xintGeomID,
UnsignedInt32  xintNodeCount,
UnsignedInt32 xpaintNodeIDs,
double *  xpadblX,
double *  xpadblY,
double *  xpadblZ 
)

Definition at line 916 of file CCubitFile.cpp.

{
  try
  {
    if(!mpWriteFEModel)
      throw eOrderError;
    mpWriteFEModel->WriteNodes(xintIndex, xintGeomID,
                               xintNodeCount, xpaintNodeIDs,
                               xpadblX, xpadblY, xpadblZ);
  }
  catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
  catch(...)  {  return eUnknownError;  }
  return eSuccess;
}
UnsignedInt32 CCubitFile::WriteNodeSet ( UnsignedInt32  xintIndex,
UnsignedInt32  xintNodeSetID,
int  nodeset_unique_id,
UnsignedInt32  xintColor,
UnsignedInt32  xintPointSymbol,
UnsignedInt32  xintNumTypes,
SNodeSetData xpaNodeSetData,
const std::vector< char > &  bcdata 
)

Definition at line 1002 of file CCubitFile.cpp.

{
    try {
        if(!mpWriteFEModel)
            throw eOrderError;
        mpWriteFEModel->WriteNodeSet(xintIndex, xintNodeSetID, unique_id, xintColor,
            xintPointSymbol, xintNumTypes, xpaNodeSetData, bcdata);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}
UnsignedInt32 CCubitFile::WriteSideSet_11 ( UnsignedInt32  xintIndex,
UnsignedInt32  xintSideSetID,
int  sideset_unique_id,
UnsignedInt32  xintColor,
UnsignedInt32  xintUseShells,
UnsignedInt32  xintNumTypes,
SSideSetData_11 xpaSideSetData,
UnsignedInt32  xintNumDistFact,
double *  xpadblDistribution,
const std::vector< char > &  bcdata 
)

Definition at line 1024 of file CCubitFile.cpp.

{
    try {
        if(!mpWriteFEModel)
            throw eOrderError;
        mpWriteFEModel->WriteSideSet_11(xintIndex, xintSideSetID, unique_id, xintColor,
            xintUseShells, xintNumTypes, xpaSideSetData, xintNumDistFact,
            xpadblDistribution, bcdata);
        return eSuccess;
    }
    catch(EErrorCode xeErrorCode)  {  return xeErrorCode;  }
    catch(...)  {  return eUnknownError;  }
}

Member Data Documentation

Definition at line 345 of file CCubitFile.hpp.

const UnsignedInt32 CCubitFile::mintNativeEndian = 0xFFFFFFFF [static]

Definition at line 335 of file CCubitFile.hpp.

Initial value:
        sizeof(SCubitFileContentsHeader) / sizeof(UnsignedInt32)

Definition at line 357 of file CCubitFile.hpp.

const UnsignedInt32 CCubitFile::mintSizeOfModel [static, private]
Initial value:
        sizeof(SCubitFileModelEntry) / sizeof(UnsignedInt32)

Definition at line 366 of file CCubitFile.hpp.

struct { ... } NCubitFile::CCubitFile::mModelBuff [private]

Definition at line 383 of file CCubitFile.hpp.

Definition at line 379 of file CCubitFile.hpp.

Definition at line 343 of file CCubitFile.hpp.

Definition at line 381 of file CCubitFile.hpp.

Definition at line 380 of file CCubitFile.hpp.

Definition at line 344 of file CCubitFile.hpp.

Definition at line 382 of file CCubitFile.hpp.

Definition at line 341 of file CCubitFile.hpp.

Definition at line 339 of file CCubitFile.hpp.

Definition at line 340 of file CCubitFile.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines