Arbor 3: FSM & BT Graph Editor  3.7.8
ClassTypeConstraintAttribute Class Referenceabstract

A basic Attribute class that imposes a type constraint on a field. More...

Inheritance diagram for ClassTypeConstraintAttribute:
ClassAssetObjectAttribute ClassComponentAttribute ClassEnumFieldConstraint ClassEnumFlagsConstraint ClassExtendsAttribute ClassGenericArgumentAttribute ClassNotNodeBehaviourAttribute ClassNotStaticConstraint ClassNotUnityObjectAttribute ClassScriptableObjectAttribute ClassUnityObjectAttribute

Public Member Functions

virtual Type GetBaseType (FieldInfo fieldInfo)
 It returns the base type of constraints. More...
 
virtual string GetTypeName (FieldInfo fieldInfo)
 Returns the type name of the constraint. More...
 
abstract bool IsConstraintSatisfied (Type type, FieldInfo fieldInfo)
 Whether the constraint is satisfied is judged. More...
 

Detailed Description

A basic Attribute class that imposes a type constraint on a field.

Available classes :

Member Function Documentation

◆ GetBaseType()

virtual Type GetBaseType ( FieldInfo  fieldInfo)
virtual

It returns the base type of constraints.

Parameters
fieldInfoFieldInfo with this attribute specified
Returns
The base type of constraints

Reimplemented in ClassGenericArgumentAttribute, ClassScriptableObjectAttribute, ClassNotNodeBehaviourAttribute, ClassComponentAttribute, ClassAssetObjectAttribute, ClassNotUnityObjectAttribute, ClassUnityObjectAttribute, and ClassExtendsAttribute.

◆ GetTypeName()

virtual string GetTypeName ( FieldInfo  fieldInfo)
virtual

Returns the type name of the constraint.

Parameters
fieldInfoFieldInfo with this attribute specified
Returns
Type name of constraint

Reimplemented in ClassEnumFlagsConstraint, and ClassEnumFieldConstraint.

◆ IsConstraintSatisfied()

abstract bool IsConstraintSatisfied ( Type  type,
FieldInfo  fieldInfo 
)
pure virtual

Whether the constraint is satisfied is judged.

Parameters
typeDetermining type
fieldInfoFieldInfo with this attribute specified
Returns
Returns true if the constraint is satisfied.

Implemented in ClassNotStaticConstraint, ClassEnumFlagsConstraint, ClassEnumFieldConstraint, ClassGenericArgumentAttribute, ClassScriptableObjectAttribute, ClassNotNodeBehaviourAttribute, ClassComponentAttribute, ClassAssetObjectAttribute, ClassNotUnityObjectAttribute, ClassUnityObjectAttribute, and ClassExtendsAttribute.