Package pyffi :: Package object_models :: Package xml :: Module enum :: Class EnumBase
[hide private]
[frames] | no frames]

Class EnumBase

source code

            object --+        
                     |        
utils.graph.DetailNode --+    
                         |    
           basic.BasicBase --+
                             |
            object --+       |
                     |       |
 editable.EditableBase --+   |
                         |   |
 editable.EditableComboBox --+
                             |
                            EnumBase
Known Subclasses:

Nested Classes [hide private]
  __metaclass__
This metaclass checks for the presence of _enumkeys, _enumvalues, and _numbytes attributes.
Instance Methods [hide private]
 
__init__(self, **kwargs)
Initializes the instance.
source code
 
get_value(self)
Return stored value.
source code
 
set_value(self, value)
Set value to C{value}.
source code
 
read(self, stream, data)
Read value from stream.
source code
 
write(self, stream, data)
Write value to stream.
source code
 
__str__(self)
Return string representation.
source code
 
get_size(self, data=None)
Return size of this type.
source code
 
get_hash(self, data=None)
Return a hash value for this value.
source code
 
get_editor_keys(self)
List or tuple of strings, each string describing an item.
source code
 
set_editor_value(self, index)
Set value from item index.
source code
any (whatever is appropriate for the particular implementation of the editor)
get_editor_value(self)
Get the item index from the enum value.
source code
str
get_detail_display(self)
Return object that can be used to display the instance.
source code

Inherited from basic.BasicBase: fix_links, get_links, get_refs, get_strings, replace_global_node

Inherited from utils.graph.DetailNode: get_detail_child_edge_types, get_detail_child_names, get_detail_child_nodes, get_detail_iterator

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  _enumkeys = []
  _enumvalues = []
  _numbytes = 1
  _max = 255
  _min = 0
  _struct = 'B'

Inherited from basic.BasicBase: arg

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kwargs)
(Constructor)

source code 
Initializes the instance.
Parameters:
  • template - type used as template
  • argument - argument used to initialize the instance (see the Struct class).
  • parent - The parent of this instance, that is, the instance this instance is an attribute of.
Overrides: object.__init__
(inherited documentation)

get_value(self)

source code 
Return stored value.
Overrides: basic.BasicBase.get_value

set_value(self, value)

source code 
Set value to C{value}.
Overrides: basic.BasicBase.set_value

read(self, stream, data)

source code 
Read value from stream.
Overrides: basic.BasicBase.read

write(self, stream, data)

source code 
Write value to stream.
Overrides: basic.BasicBase.write

__str__(self)
(Informal representation operator)

source code 
Return string representation.
Overrides: object.__str__
(inherited documentation)

get_size(self, data=None)

source code 
Return size of this type.
Overrides: basic.BasicBase.get_size

get_hash(self, data=None)

source code 
Return a hash value for this value.
Overrides: basic.BasicBase.get_hash

get_editor_keys(self)

source code 
List or tuple of strings, each string describing an item.
Overrides: editable.EditableComboBox.get_editor_keys

set_editor_value(self, index)

source code 
Set value from item index.
Parameters:
  • editorvalue - The value of the editor.
Overrides: editable.EditableBase.set_editor_value

get_editor_value(self)

source code 
Get the item index from the enum value.
Returns: any (whatever is appropriate for the particular implementation of the editor)
A value for the editor.
Overrides: editable.EditableBase.get_editor_value

get_detail_display(self)

source code 
Return object that can be used to display the instance.
Returns: str
A string that can be used to display the instance.
Overrides: utils.graph.DetailNode.get_detail_display