Public Member Functions | List of all members
ECRelationshipClass Struct Referenceabstract

The in-memory representation of a relationship class as defined by ECSchemaXML. More...

#include <ECSchema.h>

Inheritance diagram for ECRelationshipClass:
ECClass IECCustomAttributeContainer

Public Member Functions

ECObjectsStatus GetOrderedRelationshipPropertyName (WString &propertyName, ECRelationshipEnd end) const
 Returns pointer to ECRelationshipClassP, used to avoid dynamic_cast. More...
 
ECObjectsStatus SetStrength (StrengthType value)
 Sets the StrengthType of this constraint. More...
 
StrengthType GetStrength () const
 Gets the StrengthType of this constraint. More...
 
ECObjectsStatus SetStrengthDirection (ECRelatedInstanceDirection value)
 Sets the StrengthDirection (either Forward or Backward) of this constraint. More...
 
ECRelatedInstanceDirection GetStrengthDirection () const
 Gets the StrengthDirection (either Forward or Backward) of this constraint. More...
 
ECRelationshipConstraintR GetTarget () const
 Gets the constraint at the target end of the relationship. More...
 
ECRelationshipConstraintR GetSource () const
 Gets the constraint at the source end of the relationship. More...
 
bool GetIsExplicit () const
 Returns true if the constraint is explicit. More...
 
bool GetIsOrdered () const
 Returns true if the constraint is ordered. This is determined by seeing if the custom attribute signifying a Ordered relationship is defined. More...
 
- Public Member Functions inherited from ECClass
ECClassId GetId () const
 Return unique id (May return 0 until it has been explicitly set by ECDb or a similar system) More...
 
StandaloneECEnablerP GetDefaultStandaloneEnabler () const
 Returns the StandaloneECEnabler for this class. More...
 
ECRelationshipClassCP GetRelationshipClassCP () const
 Used to avoid dynamic_cast. More...
 
ECRelationshipClassP GetRelationshipClassP ()
 Used to avoid dynamic_cast. More...
 
ECSchemaCR GetSchema () const
 The ECSchema that this class is defined in. More...
 
WStringCR GetName () const
 The name of this ECClass. More...
 
WCharCP GetFullName () const
 {SchemaName}:{ClassName} The pointer will remain valid as long as the ECClass exists. More...
 
bool GetIsDisplayLabelDefined () const
 Whether the display label is explicitly defined or not. More...
 
ECPropertyIterable GetProperties () const
 Returns an iterable of all the ECProperties defined on this class. More...
 
size_t GetPropertyCount (bool includeBaseProperties=true) const
 Returns the number of ECProperties in this class. More...
 
const ECBaseClassesListGetBaseClasses () const
 Returns a list of the classes this ECClass is derived from. More...
 
const ECDerivedClassesListGetDerivedClasses () const
 Returns a list of the classes that derive from this class. More...
 
ECObjectsStatus SetDescription (WStringCR value)
 Sets the description of this ECClass. More...
 
WStringCR GetDescription () const
 Gets the description of this ECClass. Returns the localized description if one exists. More...
 
WStringCR GetInvariantDescription () const
 Gets the invariant description for this ECClass. More...
 
ECObjectsStatus SetDisplayLabel (WStringCR value)
 Sets the display label of this ECClass. More...
 
WStringCR GetDisplayLabel () const
 Gets the display label of this ECClass. If no display label has been set explicitly, it will return the name of the ECClass. More...
 
WStringCR GetInvariantDisplayLabel () const
 Gets the invariant display label for this ECClass. More...
 
ECPropertyIterable GetProperties (bool includeBaseProperties) const
 Returns a list of properties for this class. More...
 
ECObjectsStatus SetIsStruct (WCharCP isStruct)
 Sets the bool value of whether this class can be used as a struct. More...
 
ECObjectsStatus SetIsStruct (bool value)
 Sets the bool value of whether this class can be used as a struct. More...
 
bool GetIsStruct () const
 Returns whether this class can be used as a struct. More...
 
ECObjectsStatus SetIsCustomAttributeClass (WCharCP isCustomAttribute)
 Sets the bool value of whether this class can be used as a custom attribute. More...
 
ECObjectsStatus SetIsCustomAttributeClass (bool value)
 Sets the bool value of whether this class can be used as a custom attribute. More...
 
bool GetIsCustomAttributeClass () const
 Returns whether this class can be used as a custom attribute. More...
 
ECObjectsStatus SetIsDomainClass (WCharCP isDomainClass)
 Sets the bool value of whether this class can be used as a domain object. More...
 
ECObjectsStatus SetIsDomainClass (bool value)
 Sets the bool value of whether this class can be used as a domain object. More...
 
bool GetIsDomainClass () const
 Gets whether this class can be used as a domain object. More...
 
ECObjectsStatus SetIsFinal (WCharCP isFinal)
 Sets the bool value of whether this class is final and can't be subclassed. More...
 
ECObjectsStatus SetIsFinal (bool value)
 Sets the bool value of whether this class is final and can't be subclassed. More...
 
bool GetIsFinal () const
 Gets whether this class is final and can't be subclassed. More...
 
ECObjectsStatus AddBaseClass (ECClassCR baseClass)
 Adds a base class You cannot add a base class if it creates a cycle. More...
 
bool HasBaseClasses () const
 Returns whether there are any base classes for this class. More...
 
ECObjectsStatus RemoveBaseClass (ECClassCR baseClass)
 Removes a base class. More...
 
bool Is (ECClassCP targetClass) const
 Returns true if the class is the type specified or derived from it. More...
 
bool Is (WCharCP name) const
 Returns true if the class name is of the type specified or derived from it. More...
 
bool Is (WCharCP schemaName, WCharCP className) const
 Returns true if this class matches the specified schema and class name, or is derived from a matching class. More...
 
ECObjectsStatus CreatePrimitiveProperty (PrimitiveECPropertyP &ecProperty, WStringCR name)
 If the given name is valid, creates a primitive property object with the default type of STRING. More...
 
ECObjectsStatus CreatePrimitiveProperty (PrimitiveECPropertyP &ecProperty, WStringCR name, PrimitiveType primitiveType)
 If the given name is valid, creates a primitive property object with the given primitive type. More...
 
ECObjectsStatus CreateStructProperty (StructECPropertyP &ecProperty, WStringCR name)
 If the given name is valid, creates a struct property object using the current class as the struct type. More...
 
ECObjectsStatus CreateStructProperty (StructECPropertyP &ecProperty, WStringCR name, ECClassCR structType)
 If the given name is valid, creates a struct property object using the specified class as the struct type. More...
 
ECObjectsStatus CreateArrayProperty (ArrayECPropertyP &ecProperty, WStringCR name)
 If the given name is valid, creates an array property object using the current class as the array type. More...
 
ECObjectsStatus CreateArrayProperty (ArrayECPropertyP &ecProperty, WStringCR name, PrimitiveType primitiveType)
 If the given name is valid, creates an array property object using the specified primitive type as the array type. More...
 
ECObjectsStatus CreateArrayProperty (ArrayECPropertyP &ecProperty, WStringCR name, ECClassCP structType)
 If the given name is valid, creates an array property object using the specified class as the array type. More...
 
ECObjectsStatus RemoveProperty (WStringCR name)
 Remove the named property. More...
 
ECPropertyP GetPropertyP (WCharCP name, bool includeBaseClasses=true) const
 Get a property by name within the context of this class and its base classes. More...
 
ECPropertyP GetPropertyP (WStringCR name, bool includeBaseClasses=true) const
 Get a property by name within the context of this class and its base classes. More...
 
ECPropertyP GetPropertyP (Utf8CP name, bool includeBaseClasses=true) const
 Get a property by name within the context of this class and its base classes. More...
 
- Public Member Functions inherited from IECCustomAttributeContainer
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)
 

Additional Inherited Members

- Static Public Member Functions inherited from ECClass
static ECObjectsStatus ParseClassName (WStringR prefix, WStringR className, WStringCR qualifiedClassName)
 Given a qualified class name, will parse out the schema's namespace prefix and the class name. More...
 
static WString GetQualifiedClassName (ECSchemaCR primarySchema, ECClassCR ecClass)
 Given a schema and a class, will return the fully qualified class name. More...
 
static bool ClassesAreEqualByName (ECClassCP currentBaseClass, const void *arg)
 Given two ECClass's, checks to see if they are equal by name. More...
 

Detailed Description

The in-memory representation of a relationship class as defined by ECSchemaXML.

Member Function Documentation

bool GetIsExplicit ( ) const

Returns true if the constraint is explicit.

bool GetIsOrdered ( ) const

Returns true if the constraint is ordered. This is determined by seeing if the custom attribute signifying a Ordered relationship is defined.

ECObjectsStatus GetOrderedRelationshipPropertyName ( WString propertyName,
ECRelationshipEnd  end 
) const

Returns pointer to ECRelationshipClassP, used to avoid dynamic_cast.

Returns
Returns NULL if not an ECRelationshipClass
ECRelationshipConstraintR GetSource ( ) const

Gets the constraint at the source end of the relationship.

StrengthType GetStrength ( ) const

Gets the StrengthType of this constraint.

ECRelatedInstanceDirection GetStrengthDirection ( ) const

Gets the StrengthDirection (either Forward or Backward) of this constraint.

ECRelationshipConstraintR GetTarget ( ) const

Gets the constraint at the target end of the relationship.

ECObjectsStatus SetStrength ( StrengthType  value)

Sets the StrengthType of this constraint.

ECObjectsStatus SetStrengthDirection ( ECRelatedInstanceDirection  value)

Sets the StrengthDirection (either Forward or Backward) of this constraint.


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

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