API Reference > OdDAI Namespace > Classes > InverseAttribute Class > InverseAttribute Methods > InverseAttribute::createObject Method
InverseAttribute::createObject Method
Syntax
C++
static OdSmartPtr<InverseAttribute> createObject(const char * name, Entity * parentEntity, const Entity * domain, const ExplicitAttribute * invertedAttr, int minCardinality = Consts::OdIntUnset, int maxCardinality = Consts::OdIntUnset, bool duplicates = false);
Parameters 
Description 
const char * name 
[in] A pointer to a string that the contains the attribute name.  
Entity * parentEntity 
[in] A pointer to entity definition that keeps the attribute.  
const Entity * domain 
[in] A pointer to referencing entity definition of the attribute. redeclaring 
const ExplicitAttribute * invertedAttr 
[in] A pointer to attribute definition in the referencing enity type whose relationship is being inverted.  
int minCardinality = Consts::OdIntUnset 
[in] A minimum number of references from the inverted attribute.  
int maxCardinality = Consts::OdIntUnset 
[in] A maximum number of references from the inverted attribute.  
bool duplicates = false 
[in] A flag that determines whether the value of the created attribute may contain duplicates (equal to true) or may not contain duplicates (equal to false).  

Returns a smart pointer to the created inverse attribute instance.

Creates a new inverse attribute definition for entity with a specified name.

Copyright (c) 2002-2020. Open Design Alliance. All rights reserved.