Quantum 3 3.0.5

Public Member Functions | Properties | List of all members
Quantum.DisplayAsEnumAttribute Class Reference

Casts an enum or int value in the inspector to specific enum type for rendering of its popup list. Supplying a method name rather than a type allows a property with the type Type to be used to dynamically get the enum type. More...

Inheritance diagram for Quantum.DisplayAsEnumAttribute:
Quantum.DrawerPropertyAttribute Quantum.PropertyAttribute

Public Member Functions

 DisplayAsEnumAttribute (string enumTypeMemberName)
 Initializes a new instance of the DisplayAsEnumAttribute class with the specified enum type member name. More...
 
 DisplayAsEnumAttribute (Type enumType)
 Initializes a new instance of the DisplayAsEnumAttribute class with the specified enum type. More...
 

Properties

Type EnumType [get]
 Gets the type of the enum. More...
 
string EnumTypeMemberName [get]
 Gets the name of the member that returns the enum type. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Quantum.DrawerPropertyAttribute
 DrawerPropertyAttribute (bool applyToCollection=false)
 

Detailed Description

Casts an enum or int value in the inspector to specific enum type for rendering of its popup list. Supplying a method name rather than a type allows a property with the type Type to be used to dynamically get the enum type.

Constructor & Destructor Documentation

◆ DisplayAsEnumAttribute() [1/2]

Quantum.DisplayAsEnumAttribute.DisplayAsEnumAttribute ( Type  enumType)
inline

Initializes a new instance of the DisplayAsEnumAttribute class with the specified enum type.

Parameters
enumTypeThe type of the enum.

◆ DisplayAsEnumAttribute() [2/2]

Quantum.DisplayAsEnumAttribute.DisplayAsEnumAttribute ( string  enumTypeMemberName)
inline

Initializes a new instance of the DisplayAsEnumAttribute class with the specified enum type member name.

Parameters
enumTypeMemberNameThe name of the member that returns the enum type.

Property Documentation

◆ EnumType

Type Quantum.DisplayAsEnumAttribute.EnumType
get

Gets the type of the enum.

◆ EnumTypeMemberName

string Quantum.DisplayAsEnumAttribute.EnumTypeMemberName
get

Gets the name of the member that returns the enum type.