 | SystemUnitFamilyTypeHasRoleClassReference(RoleFamilyType, Boolean) Method |
Determines whether this SystemUnitClass object has a SupportedRoleClass with a reference
to the specified RoleClass. If inheritance relations between role classes should be
regarded, the optional parameter 'regardInheritance' should be set. In this case the
specified RoleClass is either identical to a referenced RoleClass or a referenced
RoleClass is derived from the specified RoleClass. Independently of the
regardInheritanceOfRoleClasses
value, always the Role assignments to this
SystemUnitClass and any ancestors of this SystemUnitClass are checked, using the
GetInheritedSupportedRoles
method.
Namespace: Aml.Engine.CAEXAssembly: Aml.Engine (in Aml.Engine.dll) Version: 3.2
Syntaxpublic bool HasRoleClassReference(
RoleFamilyType roleClass,
bool regardInheritanceOfRoleClasses = false
)
Public Function HasRoleClassReference (
roleClass As RoleFamilyType,
Optional regardInheritanceOfRoleClasses As Boolean = false
) As Boolean
public:
bool HasRoleClassReference(
RoleFamilyType^ roleClass,
bool regardInheritanceOfRoleClasses = false
)
Parameters
- roleClass RoleFamilyType
- The RoleClass object.
- regardInheritanceOfRoleClasses Boolean (Optional)
-
if set to true inheritance relations are regarded (default is false).
Return Value
Booleantrue if this SystemUnitClass object has a SupportedRoleClass with a reference to
the specified RoleClass; otherwise,
false.
Exceptions
Example
This sample shows how to call the
HasRoleClassReference(RoleFamilyType, Boolean) method using a
standard base RoleClass from the
RoleClassLib(CAEXDocument)var amlBaseRoleClassLib = AutomationMLBaseRoleClassLibType.RoleClassLib (myDocument);
SystemUnitFamilyType systemUnitClass;
...
systemUnitClass.HasRoleClassReference (amlBaseRoleClassLib.AutomationMLBaseRole);
See Also