Base class specifying the interface for a component of the system.
This class should not be instantiated directly, but should be used
from derived classes.
Methods
|
|
__init__
add
draw
remove
|
|
__init__
|
__init__ ( self )
Initialize a chromosome component.
Attributes:
|
|
add
|
add ( self, component )
Add a sub_component to the list of components under this item.
|
|
draw
|
draw ( self )
Draw the specified component.
Exceptions
|
|
AssertionError( "Subclasses must implement." )
|
|
|
remove
|
remove ( self, component )
Remove the specified component from the subcomponents.
Raises a ValueError if the component is not registered as a
sub_component.
Exceptions
|
|
ValueError( "Component %s not found in sub_components." % component )
|
|
|