(Inherits from MfValueType)
Abstract class.
Provides implementation methods and properties for Enum type classes
Name |
Description |
|
Creates a new instance derived from MfEnum class and set initial value to zero. |
||
Creates a new instance derived from MfEnum class and sets initial value to value of num. |
||
Creates a new instance derived from MfEnum class an set the intial value to the value of instanceEnum. |
||
Creates a new instance of derived class and set its value to the MfEnum.EnumItem instance value. |
Name |
Description |
|
Gets the Singleton instance of the class. |
||
Gets a var value representing the Maximum value of all the EnumItem instances in an MfEnum instance as a var containing integer. |
||
Gets or sets the value associated with the derived MfEnum class. |
Name |
Description |
|
Adds MfAttribute extended items to extended classes. Inherited from MfObject. |
||
Processes adding of new MfEnum values to derived class |
||
Adds new Enum Name to MfEnum derived class that represents an instance of MfEnum.EnumItem. |
||
Compares the current instance with another object derived from MfEnum or MfEnum.EnumItem Instance and returns an integer that indicates whether the current instance Value precedes, follows, or occurs in the same position in the sort order as the other object. Overrides MfObject.CompareTo() |
||
Set current instance of MfEnum derived class to null. |
||
Compares objA against current MfEnum instance to see if they have the same Value. Overrides MfObject.Equals |
||
Compares objA against objB to see if they have the same value. Overrides MfObject.Equals |
||
Gets an MfAttribute of the class. Inherited from MfObject. |
||
Gets a MfGenericList of MfAttribute that Contains the attributes for the current class instance. Inherited from MfObject. |
||
Gets A hash code for the current MfEnum. Overrides MfObject.GetHashCode(). Overrides MfObject.GetHashCode. |
||
|
Gets the zero-based index value of the position of MfAttribute within the instance of the class. Inherited from MfObject. |
|
Abstract method. Gets the instance of the Singleton |
||
Gets a of MfGenericList of MfString containing all enumeration names of derived MfEnum class. |
||
Gets the Type for the for the Class .Inherited from MfObject. |
||
Get an enumeration value of MfTypeCode the represents MfEnum Type Code. |
||
Gets a MfGenericList of MfInteger containing values of derived MfEnum class. |
||
Gets if the current instance of class derived from MfSystemException has MfAttribute. Inherited from MfObject. |
||
Gets if the MfEnum extended class has a flag set |
||
Gets if current instance of object is of the same type. Overrides MfObject.Is() |
||
Get if the current class is an instance. Inherited from MfObject. |
||
Creates a shallow copy of the current MfObject instance. Inherited from MfObject. |
||
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. Case is ignored for the value. |
||
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. the ignoreCase parameter specifies whether the operation is case-insensitive |
||
Converts the string representation of the name or numeric value of one enumerated constants to an equivalent MfEnum.EnumItem for the enumeration represented by enumType. Case is ignored for the value. |
||
Converts the string representation of the name or numeric value of one enumerated constants to an equivalent MfEnum.EnumItem. for the enumeration represented by enumType. ignoreCase parameter specifies if the operation is case-insensitive |
||
Removes a flag value from the current Value of MfEnum instance. |
||
Converts the specified Integer to an enumeration member |
||
Gets a string representation of the object.. Overrides MfObject.ToString() |
||
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. The return value indicates whether the conversion succeeded. This method is case-insensitive. |
||
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. A parameter specifies whether the operation is case-sensitive. The return value indicates whether the conversion succeeded. |
||
Converts the string representation of the name or numeric value of one enumerated constants to an equivalent MfEnum.EnumItem for the enumeration represented by enumType. and assign the value to outEnumItem. Case is ignored for the value. |
||
Converts the string representation of the name or numeric value of one enumerated constants to an equivalent MfEnum.EnumItem for the enumeration represented by enumType. and assigne the value to outEnumItem. ignoreCase parameter specifies if the operation is case-insensitive. |
||
Verifies the the current object is set to an instance. Inherited from MfObject. |
||
VerifyIsNotInstance([MethodName, LineFile, LineNumber, Source]) |
Verifies the the current object is NOT set to an instance. Used in Static methods. Inherited from MfObject. |
; create a new enumeration class by inheriting/extending the MfEnum
class RegOptEnum extends MfEnum
{
static m_Instance := MfNull.Null
__New(args*)
{
if (this.base.__Class != "RegOptEnum")
{
throw new MfNotSupportedException(MfEnvironment.Instance.GetResourceString("NotSupportedException_Sealed_Class"
,"RegOptEnum"))
}
base.__New(args*)
; set MfObject m_isInherited flag for testing if Class is inherited/extended if needed
; This could be set to false as this class cannot be inherited/extended as set in this constructor above
; but will do it the standard way.
this.m_isInherited := this.__Class != "RegOptEnum"
}
; override the base AddEnums, this is required
; add all the enum values for your enum here
AddEnums() {
this.AddEnumValue("RegDword", 0)
this.AddEnumValue("KeysRegDword", 1)
this.AddEnumValue("RegSz", 2)
this.AddEnumValue("KeysRegSz", 3)
this.AddEnumValue("RegBinary", 4)
this.AddEnumValue("KeysRegBinary", 5)
this.AddEnumValue("AutoresponseRegSz", 6)
this.AddEnumValue("KeysAutoresponseRegSz", 7)
this.AddEnumValue("AutoupdateRegSz", 8)
this.AddEnumValue("KeysAutoupdateRegSz", 9)
this.AddEnumValue("AutoupdateRegBinary", 10)
this.AddEnumValue("KeysAutoupdateRegBinary", 11)
this.AddEnumValue("KeypathsRegSz", 12)
this.AddEnumValue("KeysKeypathsRegSz", 13)
this.AddEnumValue("KeypathsRegDword", 14)
this.AddEnumValue("KeysKeypathsRegDword", 15)
this.AddEnumValue("WindowplacementRegBinary", 16)
this.AddEnumValue("KeysWindowplacementRegBinary", 17)
}
; override the base DestroyInstance, this is required
DestroyInstance() {
RegOptEnum.m_Instance := Null
}
; override the base GetInstance, this is required
; Get a static default instance, create if not exist yet
GetInstance() {
if (MfNull.IsNull(RegOptEnum.m_Instance))
{
RegOptEnum.m_Instance := new RegOptEnum(0)
}
return RegOptEnum.m_Instance
}
}