CFx SDK Documentation  2022 SP0
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
OdDAIObjectId Class Reference

#include <daiObjectId.h>

Public Types

typedef OdDbHandle handle_type
 

Public Member Functions

 OdDAIObjectId ()
 
 OdDAIObjectId (OdDbStub *objectId)
 
bool isNull () const
 
void setNull ()
 
bool isValid () const
 
OdDAIObjectIdoperator= (const OdDAIObjectId &objectId)
 
OdDAIObjectIdoperator= (OdDbStub *objectId)
 
bool operator< (const OdDAIObjectId &objectId) const
 
bool operator> (const OdDAIObjectId &objectId) const
 
bool operator>= (const OdDAIObjectId &objectId) const
 
bool operator<= (const OdDAIObjectId &objectId) const
 
bool operator== (const OdDAIObjectId &objectId) const
 
bool operator!= (const OdDAIObjectId &objectId) const
 
bool operator! () const
 
 operator OdDbStub * () const
 
OdDbStuboperator-> () const
 
OdDbBaseDatabasemodel () const
 
void erase () const
 
bool isErased () const
 
const OdDbHandlegetHandle () const
 
OdDAI::EntityInstancePtr openObject (OdDAI::OpenMode openMode=OdDAI::kForRead, bool openErasedOne=false) const
 
OdDAI::EntityInstancePtr get () const
 

Static Public Attributes

static DAI_EXPORT_STATIC const OdDAIObjectId kNull
 
static DAI_EXPORT_STATIC const handle_type kNullHandle
 

Protected Member Functions

OdDbStubid () const
 

Protected Attributes

OdDbStubm_Id
 

Friends

class OdDbStub
 

Detailed Description

A class that implements an identifier of the Data Access Interface (DAI) object functionality.

Definition at line 67 of file daiObjectId.h.

Member Typedef Documentation

◆ handle_type

Definition at line 70 of file daiObjectId.h.

Constructor & Destructor Documentation

◆ OdDAIObjectId() [1/2]

OdDAIObjectId::OdDAIObjectId ( )

Creates a new empty object identifier.

◆ OdDAIObjectId() [2/2]

OdDAIObjectId::OdDAIObjectId ( OdDbStub objectId)

Creates a new object identifier based on a specified value.

Parameters
objectId[in] A pointer to an OdDbStub object that stores data for the newly created identifier.

Member Function Documentation

◆ erase()

void OdDAIObjectId::erase ( ) const

Erases the object associated with the identifier.

◆ get()

OdDAI::EntityInstancePtr OdDAIObjectId::get ( ) const

Retrieves the object that is referenced by the identifier.

Returns
Returns a smart pointer to the <link OdDAI::EntityInstance, entity instance>.

◆ getHandle()

const OdDbHandle& OdDAIObjectId::getHandle ( ) const

Retrieves the database handle of the object referenced by the identifier.

Returns
Returns the object's database handle.
Remarks
Returns a NULL handle if no database object is referenced by the identifier. The handle equals the file's step-id if the owning model of the entity was loaded from a file.

◆ id()

OdDbStub* OdDAIObjectId::id ( ) const
protected

◆ isErased()

bool OdDAIObjectId::isErased ( ) const

Determines whether the object associated with the identifier was erased.

Returns
Returns true if the object associated with the identifier was erased; otherwise, the method returns false.

◆ isNull()

bool OdDAIObjectId::isNull ( ) const

Returns whether the identifier is NULL.

Returns
Returns true if the identifier is NULL; otherwise, the method returns false.

◆ isValid()

bool OdDAIObjectId::isValid ( ) const

Retrieves whether the identifier is valid.

Returns
Returns true if the identifier is valid; otherwise, the method returns false.

◆ model()

OdDbBaseDatabase* OdDAIObjectId::model ( ) const

Retrieves the model identifier object is associated with.

Returns
Returns a raw pointer to the database object.
Remarks
Returns a NULL pointer if the identifier object is not associated with any database.

◆ openObject()

OdDAI::EntityInstancePtr OdDAIObjectId::openObject ( OdDAI::OpenMode  openMode = OdDAI::kForRead,
bool  openErasedOne = false 
) const

Opens the database object referenced by the identifier in a specified mode.

Parameters
openMode[in] An <link OdDAI::OpenMode, open mode>.
openErasedOne[in] A flag that determines whether erased objects are open (equal to true) or not (equal to false).
Returns
Returns a smart pointer to the <link OdDAI::EntityInstance, entity instance> if the object was successfull opened; otherwise, the method returns a NULL smart pionter.
Remarks
The open mode parameter must have one of the following values:
Value Description OdDb::kForRead 0 Object is open for reading. OdDb::kForWrite 1 Object is open for reading and/or writing. OdDb::kForNotify 2 Object is open for notifying.

◆ operator OdDbStub *()

OdDAIObjectId::operator OdDbStub * ( ) const
inline

The operator for convertion to a raw pointer to the OdDbStub object.

Remarks
This method is for internal use.

Definition at line 171 of file daiObjectId.h.

◆ operator!()

bool OdDAIObjectId::operator! ( ) const
inline

The negation operator for the object identifier.

Returns
Returns true if the object identifier is NULL; otherwise, the method returns false.

Definition at line 164 of file daiObjectId.h.

◆ operator!=()

bool OdDAIObjectId::operator!= ( const OdDAIObjectId objectId) const

The non-equality operator for the object identifier.

Parameters
objectId[in] Another identifier (right-hand operand of the operation) to be compared with.
Returns
Returns true if the object identifier is not equal to another one; otherwise, the method returns false.

◆ operator->()

OdDbStub* OdDAIObjectId::operator-> ( ) const
inline

The operator for the access through a pointer to an identifier.

Remarks
This method is for internal use.

Definition at line 178 of file daiObjectId.h.

◆ operator<()

bool OdDAIObjectId::operator< ( const OdDAIObjectId objectId) const

The "less than" operator for the object identifier.

Parameters
objectId[in] Another identifier (right-hand operand of the operation) to be compared with.
Returns
Returns true if the object identifier is less than another one; otherwise, the method returns false.

◆ operator<=()

bool OdDAIObjectId::operator<= ( const OdDAIObjectId objectId) const

The "less or equal than" operator for the object identifier.

Parameters
objectId[in] Another identifier (right-hand operand of the operation) to be compared with.
Returns
Returns true if the object identifier is less or equal than another one; otherwise, the method returns false.

◆ operator=() [1/2]

OdDAIObjectId& OdDAIObjectId::operator= ( const OdDAIObjectId objectId)

The assignment operator for the object identifier.

Parameters
objectId[in] Another identifier (right-hand operand of the assignment operation).
Returns
Returns the reference to the object identifier after the assignment operation is finished.

◆ operator=() [2/2]

OdDAIObjectId& OdDAIObjectId::operator= ( OdDbStub objectId)

The assignment operator for the object identifier.

Parameters
objectId[in] Another identifier (right-hand operand of the assignment operation) represented with a raw pointer to an OdDbStub object.
Returns
Returns the reference to the object identifier after the assignment operation is finished.

◆ operator==()

bool OdDAIObjectId::operator== ( const OdDAIObjectId objectId) const

The equality operator for the object identifier.

Parameters
objectId[in] Another identifier (right-hand operand of the operation) to be compared with.
Returns
Returns true if the object identifier is equal to another one; otherwise, the method returns false.

◆ operator>()

bool OdDAIObjectId::operator> ( const OdDAIObjectId objectId) const

The "more than" operator for the object identifier.

Parameters
objectId[in] Another identifier (right-hand operand of the operation) to be compared with.
Returns
Returns true if the object identifier is more than another one; otherwise, the method returns false.

◆ operator>=()

bool OdDAIObjectId::operator>= ( const OdDAIObjectId objectId) const

The "more or equal than" operator for the object identifier.

Parameters
objectId[in] Another identifier (right-hand operand of the operation) to be compared with.
Returns
Returns true if the object identifier is more or equal than another one; otherwise, the method returns false.

◆ setNull()

void OdDAIObjectId::setNull ( )

Sets the identifier to the NULL state.

Friends And Related Function Documentation

◆ OdDbStub

friend class OdDbStub
friend

Definition at line 237 of file daiObjectId.h.

Member Data Documentation

◆ kNull

DAI_EXPORT_STATIC const OdDAIObjectId OdDAIObjectId::kNull
static

Definition at line 72 of file daiObjectId.h.

◆ kNullHandle

DAI_EXPORT_STATIC const handle_type OdDAIObjectId::kNullHandle
static

Definition at line 73 of file daiObjectId.h.

◆ m_Id

OdDbStub* OdDAIObjectId::m_Id
protected

Definition at line 238 of file daiObjectId.h.


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