Package mrv :: Package maya :: Module util :: Class MEnumeration
[hide private]
[frames] | no frames]

Class MEnumeration

source code

object --+    
         |    
     tuple --+
             |
            MEnumeration

Simple enumeration class which allows access to its enumeration using getattr access. As it is a tuple as well, one can access the enumeration values in the right sequencial order
Instance Methods [hide private]
a new object with type S, a subtype of T
__new__(cls, sequence, name='') source code
 
__str__(self)
str(x)
source code
 
__repr__(self)
repr(x)
source code

Inherited from tuple: __add__, __contains__, __eq__, __ge__, __getattribute__, __getitem__, __getnewargs__, __getslice__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __rmul__, __sizeof__, count, index

Inherited from object: __delattr__, __format__, __init__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

    Interface
 
nameByValue(self, value)
Returns: name string with the given integer value
source code
Class Methods [hide private]
 
create(cls, ed, mfncls)
Returns: new instance of this type as initialized from the EnumDescriptor ed and the mfncls
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(cls, sequence, name='')

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

nameByValue(self, value)

source code 
Parameters:
  • value - integer value of this enumeration
Returns:
name string with the given integer value
Raises:
  • ValueError - if value is not in the enumeration

create(cls, ed, mfncls)
Class Method

source code 
Returns:
new instance of this type as initialized from the EnumDescriptor ed and the mfncls