CFx SDK Documentation  2020SP3
Public Member Functions | Static Public Member Functions | List of all members
OdIfc::OdIfcFile Class Reference

#include <IfcFile.h>

Inheritance diagram for OdIfc::OdIfcFile:
OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdIfcFile)
 
 OdIfcFile ()
 
OdString getFileName () const
 
void setFileName (const OdString &name)
 
OdIfcHostAppServicesgetAppServices () const
 
void setAppServices (OdIfcHostAppServices *svcs)
 
OdResult initialize (InitialSchema modelScheme)
 
virtual OdResult readFile (const OdString &fileName)
 
virtual OdResult readFile (OdStreamBufPtr pStream)
 
virtual OdResult writeFile (const OdString &filename, bool saveLogFile=false)
 
OdHeaderSectionPtr getHeaderSection ()
 
virtual OdIfcModelPtr getModel () const
 
virtual OdIfcModelPtr getModelRW ()
 
OdDAIObjectId getProjectId ()
 
OdIfcModelContext getContext () const
 
void setContext (const OdIfcModelContext &context)
 
void setActiveView (OdGsView *pActiveView)
 
OdGsViewgetActiveView () const
 
OdDAI::RepositoryPtr getRepository () const
 
virtual void setGsNode (OdGsCache *pGsNode)
 
virtual OdGsCachegsNode () const
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Static Public Member Functions

static OdSmartPtr< OdIfcFilecreateObject (OdIfcHostAppServices *svcs, OdDAI::RepositoryPtr repository)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

A class that implements working with an IFC file header and data sections (header and model).

Definition at line 45 of file IfcFile.h.

Constructor & Destructor Documentation

◆ OdIfcFile()

OdIfc::OdIfcFile::OdIfcFile ( )

Creates a new IFC file object with default parameters.

Member Function Documentation

◆ createObject()

static OdSmartPtr<OdIfcFile> OdIfc::OdIfcFile::createObject ( OdIfcHostAppServices svcs,
OdDAI::RepositoryPtr  repository 
)
static

◆ getActiveView()

OdGsView* OdIfc::OdIfcFile::getActiveView ( ) const

Retrieves the current active view of the IFC file object.

Returns
Returns a raw pointer to the <exref target="https://docs.opendesign.com/tv/OdGsView.html">OdGsView</exref> object that represents the currently active view.

◆ getAppServices()

OdIfcHostAppServices* OdIfc::OdIfcFile::getAppServices ( ) const

Retrieves the application services object that is associated with the IFC file object.

Returns
Returns a raw pointer to the <link OdIfcHostAppServices, OdIfcHostAppServices> object associated with the file object.

◆ getContext()

OdIfcModelContext OdIfc::OdIfcFile::getContext ( ) const

Retrieves the current model context of the file object.

Returns
Returns an instance of the <link OdIfc::OdIfcModelContext, OdIfcModelContext> class.

◆ getFileName()

OdString OdIfc::OdIfcFile::getFileName ( ) const

Retrieves the current name (file name) of a physical file associated with the repository object.

Returns
Returns a string that contains the file name.

◆ getHeaderSection()

OdHeaderSectionPtr OdIfc::OdIfcFile::getHeaderSection ( )

Retrieves the file object's header section.

Returns
Returns a smart pointer to the <link OdDAI::OdHeaderSection, OdHeaderSection> object that represents the file object's header section.

◆ getModel()

virtual OdIfcModelPtr OdIfc::OdIfcFile::getModel ( ) const
virtual

Retrieves the model object associated with the file.

Returns
Returns a smart pointer to the instance of the <link , OdIfcModel> class that represents the current model of the file in read only mode.

◆ getModelRW()

virtual OdIfcModelPtr OdIfc::OdIfcFile::getModelRW ( )
virtual

Retrieves the model object associated with the file.

Returns
Returns a smart pointer to the instance of the <link , OdIfcModel> class that represents the current model of the file in read/write mode.

◆ getProjectId()

OdDAIObjectId OdIfc::OdIfcFile::getProjectId ( )

Retrieves the IFC model's root entity.

Returns
Returns the identifier of the root entity of the model.
Remarks
Each valid IFC file must have exactly one root entity.

◆ getRepository()

OdDAI::RepositoryPtr OdIfc::OdIfcFile::getRepository ( ) const

◆ gsNode()

virtual OdGsCache* OdIfc::OdIfcFile::gsNode ( ) const
inlinevirtual

Retrieves the current Gs node object of the entity.

Returns
Returns a raw pointer to the <exref target="https://docs.opendesign.com/tv/OdGsCache.html">OdGsCache</exref> object associated with the entity.

Definition at line 180 of file IfcFile.h.

◆ initialize()

OdResult OdIfc::OdIfcFile::initialize ( InitialSchema  modelScheme)

Initializes the IFC file object with a specified scheme.

Parameters
modelScheme[in] A string that contains the scheme name.
Returns
Returns eOk if the file was successfully initialized; otherwise, the method returns an appropriate error.

◆ ODRX_DECLARE_MEMBERS()

OdIfc::OdIfcFile::ODRX_DECLARE_MEMBERS ( OdIfcFile  )

◆ readFile() [1/2]

virtual OdResult OdIfc::OdIfcFile::readFile ( const OdString fileName)
virtual

Reads data from a specified IFC file.

Parameters
fileName[in] A string that contains the full path to the input file to read data from.
Returns
Returns eOk if the data was successfully read; otherwise, the method returns an appropriate error.

◆ readFile() [2/2]

virtual OdResult OdIfc::OdIfcFile::readFile ( OdStreamBufPtr  pStream)
virtual

Reads data from a specified IFC file.

Parameters
fileName[in] A string that contains the full path to the input file to read data from.
Returns
Returns eOk if the data was successfully read; otherwise, the method returns an appropriate error.

◆ setActiveView()

void OdIfc::OdIfcFile::setActiveView ( OdGsView pActiveView)

Sets a new active view for the IFC file's content.

Parameters
pActiveView[in] A raw pointer to the <exref target="https://docs.opendesign.com/tv/OdGsView.html">OdGsView</exref> object.

◆ setAppServices()

void OdIfc::OdIfcFile::setAppServices ( OdIfcHostAppServices svcs)

Sets a new application services object with the IFC file object.

Parameters
svcs[in] A raw pointer to the <link OdIfcHostAppServices, OdIfcHostAppServices> object to be assigned with the file.

◆ setContext()

void OdIfc::OdIfcFile::setContext ( const OdIfcModelContext context)

Sets a new model context for the IFC file object.

Parameters
context[in] An instance of the <link OdIfc::OdIfcModelContext, OdIfcModelContext> class to be set as the model context object.

◆ setFileName()

void OdIfc::OdIfcFile::setFileName ( const OdString name)

Assigns a name (file name) to the OdIfcFile container.

◆ setGsNode()

virtual void OdIfc::OdIfcFile::setGsNode ( OdGsCache pGsNode)
inlinevirtual

Sets a new Gs node cache for the drawable.

Parameters
pGsNode[in] A raw pointer to an <exref target="https://docs.opendesign.com/tv/OdGsCache.html">OdGsCache</exref> object.

Definition at line 171 of file IfcFile.h.

◆ writeFile()

virtual OdResult OdIfc::OdIfcFile::writeFile ( const OdString filename,
bool  saveLogFile = false 
)
virtual

Writes data from the file object to a physical file.

Parameters
filename[in] A string that contains the full path to the output file to write data.
saveLogFile[in] A flag that determines whether the log file should be also written (if equal to true) or not (if equal to false).
Returns
Returns eOk if the data was successfully written; otherwise, the method returns an appropriate error.

The documentation for this class was generated from the following file: