CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
OdIfcFile Class Reference

#include <IfcFile.h>

Inheritance diagram for OdIfcFile:

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdIfcFile)
 
 OdIfcFile ()
 
 ~OdIfcFile ()
 
OdIfcHostAppServicesgetAppServices () const
 
void setAppServices (OdIfcHostAppServices *svcs)
 
OdResult initialize (IfcSchema schema)
 
OdDAIObjectId getProjectId () const
 
OdDAIObjectId getEntityId (const OdIfcGUID &ifcGUID) const
 
OdIfcModelContext getContext () const
 
void setContext (const OdIfcModelContext &context)
 
void setActiveView (OdGsView *pActiveView)
 
OdGsViewgetActiveView () const
 
OdResult composeEntities ()
 
OdResult unresolveEntities ()
 
OdResult setContextSelection (const OdDAIObjectIds &contexts)
 
bool getContextSelected (const OdDAIObjectId &idCtx) const
 
OdResult getGeomExtents (OdGeExtents3d &extents) const
 
OdIfcUnitConverterPtr getUnitConverter ()
 
OdIfc::OdIfcEntityPtr get (const OdDAIObjectId &id) const
 
OdResult get (const OdDAIObjectIds &ids) const
 
virtual void setGsNode (OdGsCache *pGsNode)
 
virtual OdGsCachegsNode () const
 
OdResult initializeUnitConverter ()
 

Public Attributes

OdMutex m_mutex
 

Protected Member Functions

virtual OdResult onReadFileEnd () override
 
virtual OdResult checkSchema (const OdAnsiString &schemaIdentifier) const override
 
virtual OdResult checkRepo (const OdDAI::Repository *repo) const override
 

Detailed Description

A class that implements working with an IFC file header and data sections (header and model), takes responsibility for the geometry creation and visualization, higher-level features like the access to unit conversions and mapping IfcGuid - OdDAIObjectId.

Definition at line 48 of file IfcFile.h.

Constructor & Destructor Documentation

◆ OdIfcFile()

OdIfcFile::OdIfcFile ( )

Creates a new IFC file object with default parameters.

◆ ~OdIfcFile()

OdIfcFile::~OdIfcFile ( )

Destroys the IFC file object.

Member Function Documentation

◆ checkRepo()

virtual OdResult OdIfcFile::checkRepo ( const OdDAI::Repository *  repo) const
overrideprotectedvirtual

Checks if repository contains single model based on IFC schema.

Parameters
repo[in] A raw pointer to the repository object to be attached to the file object.
Returns
true if repository can be attached to OdIfcFile instance; otherwise returns false.

◆ checkSchema()

virtual OdResult OdIfcFile::checkSchema ( const OdAnsiString &  schemaIdentifier) const
overrideprotectedvirtual

Checks if schema with identifier provided is supported by OdIfcFile.

Parameters
schemaIdentifier[in] A string that contains the schema identifier.
Returns
true if schema is supported by OdIfcFile instance; otherwise returns false.
Remarks
Schema identifier may be empty, or must contain IFC letters.

◆ composeEntities()

OdResult OdIfcFile::composeEntities ( )

Composes geometry of entities in the IFC model using the assigned resolver object.

See also
<link OdIfc::OdIfcModel::setResolver@OdIfcEntResolver *, setResolver()> method.

◆ get() [1/2]

OdIfc::OdIfcEntityPtr OdIfcFile::get ( const OdDAIObjectId &  id) const

Performs an attempt to compose an entity using the specified resolver object.

Parameters
id[in] An <link OdDAIObjectId, identifier> of an object to compose.
Returns
A smart pointer to the entity with the attached compound object.

◆ get() [2/2]

OdResult OdIfcFile::get ( const OdDAIObjectIds &  ids) const

Performs an attempt to compose entities using the specified resolver object.

Parameters
ids[in] An array of <link OdDAIObjectId, identifiers> of objects to compose.
Returns
eOk if the compose operation was successful; otherwise the method returns an appropriate error code.

◆ getActiveView()

OdGsView * 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 * 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 OdIfcFile::getContext ( ) const

Retrieves the current model context of the file object.

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

◆ getContextSelected()

bool OdIfcFile::getContextSelected ( const OdDAIObjectId &  idCtx) const

Determines whether an instance of the IfcGeometricRepresentationContext class is selected to build the geometry.

Parameters
idCtx[in] Object ID of geometric context to test.
Returns
true if an IfcGeometricRepresentationContext object is selected; otherwise, the method returns false.

◆ getEntityId()

OdDAIObjectId OdIfcFile::getEntityId ( const OdIfcGUID ifcGUID) const

Retrieves entity database id by IFC GUID.

Parameters
ifcGUID[in] An IFC GUID identifier of entity.
Returns
An <link OdDAIObjectId, identifier> of the entity.

◆ getGeomExtents()

OdResult OdIfcFile::getGeomExtents ( OdGeExtents3d extents) const

Retrieves the current geometrical extents of the model.

Parameters
extents[out] A placeholder for the current geometry extents object to be returned to a calling subroutine.
Returns
eOk if the current extents were successfully returned; otherwise, the method returns an appropriate error code.
Remarks
The method returns the model extents only if the model was created by calling the setGeomResource() method. The method accepts an instance of the OdGeExtents3d class, fills it with the data about the model's extents and returns it to a calling subroutine.

◆ getProjectId()

OdDAIObjectId OdIfcFile::getProjectId ( ) const

Retrieves the IFC model's root entity.

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

◆ getUnitConverter()

OdIfcUnitConverterPtr OdIfcFile::getUnitConverter ( )

Retrieves the current model's unit converter.

Returns
An instance of the <link OdIfc::OdIfcUnitConverter, OdIfcUnitConverter> class that represents the current model's unit converter.

◆ gsNode()

virtual OdGsCache * 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 200 of file IfcFile.h.

◆ initialize()

OdResult OdIfcFile::initialize ( IfcSchema  schema)

Initializes the IFC file object with a specified schema.

Parameters
schema[in] A schema identifier.
Returns
eOk if the file was successfully initialized; otherwise, the method returns an appropriate error code.
Remarks
If the schema parameter equals the kScmUndefined value, the IFC file object will be created without an underlying <link OdDAI::Model, OdDAI::Model> object.

◆ initializeUnitConverter()

OdResult OdIfcFile::initializeUnitConverter ( )

Sets convertible unit from current <OdDAI::Model, Model> class.

Returns
eOk if initialization operation was successful; otherwise the method returns an appropriate error code.

◆ ODRX_DECLARE_MEMBERS()

OdIfcFile::ODRX_DECLARE_MEMBERS ( OdIfcFile  )

◆ onReadFileEnd()

virtual OdResult OdIfcFile::onReadFileEnd ( )
overrideprotectedvirtual

Method is called just after file reading has ended, it initializes units converter for loaded model.

Returns
eOk if operation successfully done; otherwise, the method returns an appropriate error code.

◆ setActiveView()

void 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 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 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.

◆ setContextSelection()

OdResult OdIfcFile::setContextSelection ( const OdDAIObjectIds &  contexts)

Sets geometrical context selection to build a geometrical representation for selected geometrical contexts. Only selected contexts will be composed and drawn.

Parameters
contexts[in] A set of <link OdDAIObjectId, identifiers of SDAI objects>, which represent the context selection.
Returns
eOk if the new context selection was successfully set; otherwise, the method returns an appropriate error code.

◆ setGsNode()

virtual void 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 191 of file IfcFile.h.

◆ unresolveEntities()

OdResult OdIfcFile::unresolveEntities ( )

Unresolve entities in the IFC model.

Returns
eOk if the unresolve was successful; otherwise, the method returns an appropriate error code.

Member Data Documentation

◆ m_mutex

OdMutex OdIfcFile::m_mutex

Definition at line 259 of file IfcFile.h.


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