Public Member Functions | List of all members
IECCustomAttributeContainer Struct Referenceabstract

Interface adopted by a container object which can hold custom attributes, such as those associated with an ECProperty, ECSchema, or ECClass. More...

#include <ECSchema.h>

Inheritance diagram for IECCustomAttributeContainer:
ECClass ECProperty ECRelationshipConstraint ECRelationshipClass ArrayECProperty PrimitiveECProperty StructECProperty

Public Member Functions

bool IsDefined (WStringCR schemaName, WStringCR className) const
 Returns true if the container has a custom attribute of a class of the specified name. More...
 
bool IsDefined (ECClassCR classDefinition) const
 Returns true if the container has a custom attribute of a class of the specified class definition. More...
 
IECInstancePtr GetCustomAttribute (WStringCR schemaName, WStringCR className) const
 Retrieves the custom attribute matching the class name. More...
 
IECInstancePtr GetCustomAttribute (ECClassCR classDefinition) const
 Retrieves the custom attribute matching the class definition. More...
 
IECInstancePtr GetCustomAttributeLocal (WStringCR schemaName, WStringCR className) const
 Retrieves the custom attribute matching the class name. More...
 
IECInstancePtr GetCustomAttributeLocal (ECClassCR classDefinition) const
 Retrieves the custom attribute matching the class definition. More...
 
IECInstancePtr GetPrimaryCustomAttribute (WStringCR schemaName, WStringCR className) const
 Retrieves the custom attribute matching the class name. More...
 
IECInstancePtr GetPrimaryCustomAttribute (ECClassCR classDefinition) const
 Retrieves the custom attribute matching the class definition. More...
 
ECCustomAttributeInstanceIterable GetCustomAttributes (bool includeBase) const
 Retrieves all custom attributes from the container including supplemental custom attributes. More...
 
ECCustomAttributeInstanceIterable GetPrimaryCustomAttributes (bool includeBase) const
 Retrieves all custom attributes from the container NOT including supplemental custom attributes. More...
 
ECObjectsStatus SetCustomAttribute (IECInstanceR customAttributeInstance)
 Adds a custom attribute to the container. More...
 
bool RemoveCustomAttribute (WStringCR schemaName, WStringCR className)
 Removes a custom attribute from the container. More...
 
bool RemoveCustomAttribute (ECClassCR classDefinition)
 Removes a custom attribute from the container. More...
 
bool IsDefined (WStringCR className) const
 LEGECY METHODS. More...
 
IECInstancePtr GetCustomAttribute (WStringCR className) const
 
IECInstancePtr GetCustomAttributeLocal (WStringCR className) const
 
IECInstancePtr GetPrimaryCustomAttribute (WStringCR className) const
 
bool RemoveCustomAttribute (WStringCR className)
 

Detailed Description

Interface adopted by a container object which can hold custom attributes, such as those associated with an ECProperty, ECSchema, or ECClass.

See also
ECSchema::GetCustomAttributeContainer()

Member Function Documentation

IECInstancePtr GetCustomAttribute ( WStringCR  schemaName,
WStringCR  className 
) const

Retrieves the custom attribute matching the class name.

Includes supplemental custom attributes and custom attributes from the base containers

Parameters
[in]schemaNameThe name of the schema the CustomAttribute is defined in
[in]classNameThe name of the CustomAttribute Class to look for an instance of
Returns
An IECInstancePtr. If IsValid(), will be the matching custom attribute. Otherwise, no instance of the custom attribute was found on the container.
IECInstancePtr GetCustomAttribute ( ECClassCR  classDefinition) const

Retrieves the custom attribute matching the class definition.

Includes supplemental custom attributes and custom attributes from the base containers

Parameters
[in]classDefinitionThe ECClass to look for an instance of
Returns
An IECInstancePtr. If IsValid(), will be the matching custom attribute. Otherwise, no instance of the custom attribute was found on the container.
IECInstancePtr GetCustomAttribute ( WStringCR  className) const
IECInstancePtr GetCustomAttributeLocal ( WStringCR  schemaName,
WStringCR  className 
) const

Retrieves the custom attribute matching the class name.

Includes supplemental custom attributes but not base containers

Parameters
[in]schemaNameThe name of the schema the CustomAttribute is defined in
[in]classNameThe name of the CustomAttribute Class to look for an instance of
Returns
An IECInstancePtr. If IsValid(), will be the matching custom attribute. Otherwise, no instance of the custom attribute was found on the container.
IECInstancePtr GetCustomAttributeLocal ( ECClassCR  classDefinition) const

Retrieves the custom attribute matching the class definition.

Includes supplemental custom attributes but not base containers

Parameters
[in]classDefinitionThe ECClass to look for an instance of
Returns
An IECInstancePtr. If IsValid(), will be the matching custom attribute. Otherwise, no instance of the custom attribute was found on the container.
IECInstancePtr GetCustomAttributeLocal ( WStringCR  className) const
ECCustomAttributeInstanceIterable GetCustomAttributes ( bool  includeBase) const

Retrieves all custom attributes from the container including supplemental custom attributes.

Parameters
[in]includeBaseWhether to include custom attributes from the base containers
IECInstancePtr GetPrimaryCustomAttribute ( WStringCR  schemaName,
WStringCR  className 
) const

Retrieves the custom attribute matching the class name.

Includes custom attributes from base containers but not supplemental custom attributes

Parameters
[in]schemaNameThe name of the schema the CustomAttribute is defined in
[in]classNameThe name of the CustomAttribute Class to look for an instance of
Returns
An IECInstancePtr. If IsValid(), will be the matching custom attribute. Otherwise, no instance of the custom attribute was found on the container.
IECInstancePtr GetPrimaryCustomAttribute ( ECClassCR  classDefinition) const

Retrieves the custom attribute matching the class definition.

Includes custom attributes from base containers but not supplemental custom attributes

Parameters
[in]classDefinitionThe ECClass to look for an instance of
Returns
An IECInstancePtr. If IsValid(), will be the matching custom attribute. Otherwise, no instance of the custom attribute was found on the container.
IECInstancePtr GetPrimaryCustomAttribute ( WStringCR  className) const
ECCustomAttributeInstanceIterable GetPrimaryCustomAttributes ( bool  includeBase) const

Retrieves all custom attributes from the container NOT including supplemental custom attributes.

Parameters
[in]includeBaseWhether to include custom attributes from the base containers
bool IsDefined ( WStringCR  schemaName,
WStringCR  className 
) const

Returns true if the container has a custom attribute of a class of the specified name.

bool IsDefined ( ECClassCR  classDefinition) const

Returns true if the container has a custom attribute of a class of the specified class definition.

bool IsDefined ( WStringCR  className) const

LEGECY METHODS.

bool RemoveCustomAttribute ( WStringCR  schemaName,
WStringCR  className 
)

Removes a custom attribute from the container.

Parameters
[in]schemaNameThe name of the schema the CustomAttribute is defined in
[in]classNameName of the class of the custom attribute to remove
bool RemoveCustomAttribute ( ECClassCR  classDefinition)

Removes a custom attribute from the container.

Parameters
[in]classDefinitionECClass of the custom attribute to remove
bool RemoveCustomAttribute ( WStringCR  className)
ECObjectsStatus SetCustomAttribute ( IECInstanceR  customAttributeInstance)

Adds a custom attribute to the container.


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

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.