Archicad 28 C++ API
Loading...
Searching...
No Matches
API_ElemType Struct Reference

The type of an element. More...

#include <APIdefs_Elements.h>

Public Member Functions

 API_ElemType ()=default
 Default constructor.
 
 API_ElemType (API_ElemTypeID typeID)
 Constructor with generic type.
 
 API_ElemType (API_ElemTypeID typeID, API_ElemVariationID variationID)
 Constructor.
 
 API_ElemType (const API_Guid &classID)
 Constructor with external element.
 
API_ElemTypeoperator= (API_ElemTypeID newTypeID)
 Assignment operator (by element type).
 
API_ElemTypeoperator= (const API_Guid &newClassID)
 Assignment operator (by element class identifier).
 
bool operator== (const API_ElemType &other) const
 Comparison operator (by element type).
 
bool operator!= (const API_ElemType &other) const
 Comparison operator (by element type).
 
bool operator== (API_ElemTypeID otherTypeID) const
 Comparison operator (by element type ID).
 
bool operator!= (API_ElemTypeID otherTypeID) const
 Comparison operator (by element type ID).
 
bool operator== (const API_Guid &otherClassID) const
 Comparison operator (by class ID; for external elements).
 
bool operator!= (const API_Guid &otherClassID) const
 Comparison operator (by class ID; for external elements).
 
ULong GenerateHashValue (void) const
 Generates unique identifier.
 

Public Attributes

API_ElemTypeID typeID
 The typeID of the element (see API_ElemTypeID).
 
API_ElemVariationID variationID
 Subcategory of the element (see API_ElemVariationID).
 
API_Guid classID
 The classID of the element. It is used when the typeID is API_ExternalElemType.
 

Detailed Description

The type of an element.

Since
Archicad 26

Constructor & Destructor Documentation

◆ API_ElemType() [1/3]

API_ElemType::API_ElemType ( API_ElemTypeID  typeID)
inline

Constructor with generic type.

Parameters
typeIDThe typeID of the element.

◆ API_ElemType() [2/3]

API_ElemType::API_ElemType ( API_ElemTypeID  typeID,
API_ElemVariationID  variationID 
)
inline

Constructor.

Parameters
typeIDThe typeID of the element.
variationIDSubcategory of the element.

◆ API_ElemType() [3/3]

API_ElemType::API_ElemType ( const API_Guid classID)
inline

Constructor with external element.

Parameters
classIDThe classID of the element.

Member Function Documentation

◆ GenerateHashValue()

ULong API_ElemType::GenerateHashValue ( void  ) const
inline

Generates unique identifier.

Returns
the unique value

◆ operator!=() [1/3]

bool API_ElemType::operator!= ( API_ElemTypeID  otherTypeID) const
inline

Comparison operator (by element type ID).

Parameters
otherTypeIDThe type of the element to compare to.
Returns
True if it is not equal to otherTypeID.

◆ operator!=() [2/3]

bool API_ElemType::operator!= ( const API_ElemType other) const
inline

Comparison operator (by element type).

Parameters
otherThe element type to compare to.
Returns
True if it is not equal to the other.

◆ operator!=() [3/3]

bool API_ElemType::operator!= ( const API_Guid otherClassID) const
inline

Comparison operator (by class ID; for external elements).

Parameters
otherClassIDthe identifier of the element type to compare to
Returns
True if it is not equal to otherClassID

◆ operator=() [1/2]

API_ElemType & API_ElemType::operator= ( API_ElemTypeID  newTypeID)
inline

Assignment operator (by element type).

Parameters
newTypeIDThe new element type.
Returns
Returns with reference to this.

◆ operator=() [2/2]

API_ElemType & API_ElemType::operator= ( const API_Guid newClassID)
inline

Assignment operator (by element class identifier).

Parameters
newClassIDThe new element type (for external elements).
Returns
Returns with reference to this.

◆ operator==() [1/3]

bool API_ElemType::operator== ( API_ElemTypeID  otherTypeID) const
inline

Comparison operator (by element type ID).

Parameters
otherTypeIDThe type of the element to compare to.
Returns
True if it is equal to the otherTypeID.

◆ operator==() [2/3]

bool API_ElemType::operator== ( const API_ElemType other) const
inline

Comparison operator (by element type).

Parameters
otherThe element type to compare to.
Returns
True if it is equal to the other.

◆ operator==() [3/3]

bool API_ElemType::operator== ( const API_Guid otherClassID) const
inline

Comparison operator (by class ID; for external elements).

Parameters
otherClassIDThe identifier of the element type to compare to.
Returns
True if it is equal to otherClassID.