CFx SDK Documentation  2023 SP0
Public Member Functions | Protected Member Functions | List of all members
OdIfc::OdIfcModel Class Reference

#include <IfcModel.h>

Inheritance diagram for OdIfc::OdIfcModel:
OdDAI::Model OdDAI::SessionInstance OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdIfcModel)
 
 OdIfcModel ()
 
 ~OdIfcModel ()
 
void setResolver (OdIfcEntResolver *pEntResolver)
 
void setProjectId (OdDAIObjectId projectId)
 
OdDAIObjectId getProjectId ()
 
void composeEntities ()
 
OdIfcEntityPtr get (const OdDAIObjectId id) const
 
OdResult get (const OdArray< OdDAIObjectId > &ids) const
 
OdResult setContextSelection (const OdDAIObjectIds &contexts)
 
bool getContextSelected (const OdDAIObjectId &h) const
 
OdResult getGeomExtents (OdGeExtents3d &ext) const
 
OdIfcEntityPtr createEntityInstanceBT (OdIfcEntityType entityType)
 
OdIfcModelContext getContext () const
 
void setContext (const OdIfcModelContext &context)
 
- Public Member Functions inherited from OdDAI::Model
 ODRX_DECLARE_MEMBERS (Model)
 
 Model ()
 
void initialize (const OdAnsiString &schemaName)
 
void initialize (OdDAI::SchemaPtr schema)
 
OdAnsiString name () const
 
Repositoryrepository () const
 
void RenameModel (const OdAnsiString &modelName)
 
const OdDAI::Entity * getEntityDefinition (const char *entityName) const
 
const OdDAI::SchemaPtr underlyingSchema () const
 
const OdAnsiString & underlyingSchemaName () const
 
OdDAIObjectId getEntityInstance (const OdDbHandle &h)
 
EntityInstancePtr createEntityInstance (const OdDAI::EntityPtr &entityDef)
 
EntityInstancePtr createEntityInstance (const char *entityTypeName)
 
OdDAIObjectId appendEntityInstance (EntityInstancePtr pInst)
 
OdDAIObjectId insertEntityInstance (EntityInstancePtr pInstanceToInsert, const OdDbHandle &insertHandle)
 
OdDAI::InstanceIteratorPtr newIterator ()
 
OdDAIObjectIdAggrgetEntityExtent (EntityPtr entityDef) const
 
OdDAIObjectIds getEntityExtent (const char *entityName) const
 
SdaiAccessMode mode () const
 
void closeModel ()
 
void closeModel () const
 
void PromoteModelToReadWrite () const
 
- Public Member Functions inherited from OdDAI::SessionInstance
 ODRX_DECLARE_MEMBERS (SessionInstance)
 
- 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
 

Protected Member Functions

OdResult setGeomResource ()
 
virtual void subInitialize ()
 
- Protected Member Functions inherited from OdDAI::Model
OdResult in (OdDAI::OdSpfFilerBasePtr &rdFiler)
 
void out (OdDAI::OdSpfFilerBasePtr &wrFiler)
 
void name (const OdAnsiString &name)
 
void repository (Repository *repo)
 
ModelContentsPtr createModelContents (const OdAnsiString &schemaName)
 
OdDAI::SchemaPtr getSchemaDef (const OdAnsiString &schemaName)
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
- Protected Attributes inherited from OdDAI::Model
OdAnsiString m_name
 
SchemaPtr m_underlyingSchema
 
SchemaModulePtr m_schemaModule
 
ModelContentsPtr m_contents
 
Repositorym_repository
 

Detailed Description

A class that implements working with IFC model functionality.

Definition at line 50 of file IfcModel.h.

Constructor & Destructor Documentation

◆ OdIfcModel()

OdIfc::OdIfcModel::OdIfcModel ( )

Creates a new IFC model object.

◆ ~OdIfcModel()

OdIfc::OdIfcModel::~OdIfcModel ( )

Destructs an IFC model object.

Member Function Documentation

◆ composeEntities()

void OdIfc::OdIfcModel::composeEntities ( )

Composes entities in the model using the assigned resolver object.

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

◆ createEntityInstanceBT()

OdIfcEntityPtr OdIfc::OdIfcModel::createEntityInstanceBT ( OdIfcEntityType  entityType)

Creates a new instance of a specified entity type.

Parameters
entityType[in] A type of a new entity to be created.
Returns
Returns a smart pointer to the created entity instance.
Remarks
If the current schema does not support the specified type, the method returns a NULL smart pointer. In this case, the isNull() method of the smart pointer object returns true.

◆ get() [1/2]

OdResult OdIfc::OdIfcModel::get ( const OdArray< OdDAIObjectId > &  ids) const

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

Parameters
ids[in] An array of <link OdDAIObjectId, identifiers> of objects to compose.
Returns
Returns a result of compose operation.

◆ get() [2/2]

OdIfcEntityPtr OdIfc::OdIfcModel::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
Returns a smart pointer to the entity with the attached compound object.

◆ getContext()

OdIfcModelContext OdIfc::OdIfcModel::getContext ( ) const

Retrieves the current model's context.

Returns
Returns an instance of the <link OdIfc::OdIfcModelContext, OdIfcModelContext> class that represents the current model's context.

◆ getContextSelected()

bool OdIfc::OdIfcModel::getContextSelected ( const OdDAIObjectId h) const

◆ getGeomExtents()

OdResult OdIfc::OdIfcModel::getGeomExtents ( OdGeExtents3d ext) const

Retrieves the current geometrical extents of the model.

Parameters
ext[out] A placeholder for the current geometry extents object to be returned to a calling subroutine.
Returns
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 OdIfc::OdIfcModel::getProjectId ( )

Retrieves the current SDAI project of the model object.

Returns
Returns an <link OdDAIObjectId, identifier of the current SDAI object>.

◆ ODRX_DECLARE_MEMBERS()

OdIfc::OdIfcModel::ODRX_DECLARE_MEMBERS ( OdIfcModel  )

◆ setContext()

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

Sets a new context for the model.

Parameters
context[in] An <link OdIfc::OdIfcModelContext, OdIfcModelContext> object that represents the new context to be set.

◆ setContextSelection()

OdResult OdIfc::OdIfcModel::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
Returns eOk if the new context selection was successfully set; otherwise, the method returns an appropriate error code.

◆ setGeomResource()

OdResult OdIfc::OdIfcModel::setGeomResource ( )
protected

◆ setProjectId()

void OdIfc::OdIfcModel::setProjectId ( OdDAIObjectId  projectId)

Sets an <link OdIfc::OdIfcProject IfcProject> entity that is the root entity for the IFC model.

Parameters
projectId[in] An <link OdDAIObjectId, object identifier> of the root entity.
Remarks
This method is for internal use only.

◆ setResolver()

void OdIfc::OdIfcModel::setResolver ( OdIfcEntResolver pEntResolver)

Sets a new entity resolver object for the model.

Parameters
pEntResolver[in] A raw pointer to an entity resolver object to be set.

◆ subInitialize()

virtual void OdIfc::OdIfcModel::subInitialize ( )
protectedvirtual

Implements OdDAI::Model.


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