Note: Please do not use or modify any data or functions with a leading underscore. More...
Public Member Functions | |
def | __call__ |
def | __init__ |
def | __setattr__ |
def | isValidKey |
def | isValidValue |
def | keys |
def | valueToKey |
Private Attributes | |
_keys | |
_valueDict | |
Note: Please do not use or modify any data or functions with a leading underscore.
If you "mess" with the internal structure, the classes may not function as intended.
Similar to C++'s 'enum', but with a few extra toys. Takes a string with spaces in between the different 'enum' names (keys). If 'asInt' is true, then values will be integers (useful for array indicies). Once created, the enum values can not be changed.
Definition at line 7 of file Enumerate.py.
Definition at line 13 of file Enumerate.py.
def Enumerate.Enumerate.__call__ | ( | self, | |
key | |||
) |
Definition at line 63 of file Enumerate.py.
def Enumerate.Enumerate.__setattr__ | ( | self, | |
name, | |||
value | |||
) |
Lets me set internal values, but throws an error if any of the enum values are changed
Definition at line 53 of file Enumerate.py.
def Enumerate.Enumerate.isValidKey | ( | self, | |
key | |||
) |
def Enumerate.Enumerate.isValidValue | ( | self, | |
value | |||
) |
def Enumerate.Enumerate.keys | ( | self | ) |
Returns copy of valid keys
Definition at line 46 of file Enumerate.py.
References Enumerate.Enumerate._keys.
def Enumerate.Enumerate.valueToKey | ( | self, | |
value | |||
) |
|
private |
Definition at line 15 of file Enumerate.py.
Referenced by Enumerate.Enumerate.keys().
|
private |
Definition at line 16 of file Enumerate.py.