Package topo :: Package param :: Class ObjectSelector
[hide private]
[frames] | no frames]

Class ObjectSelector

source code

             object --+        
                      |        
parameterized.Parameter --+    
                          |    
                   Selector --+
                              |
                             ObjectSelector

Parameter whose value is set to an object from its list of possible objects.
Nested Classes [hide private]

Inherited from parameterized.Parameter: __metaclass__

Instance Methods [hide private]
 
__init__(self, default=None, objects=[], instantiate=True, allow_None=False, **params)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_check_value(self, val, obj=None)
val must be None or one of the objects in self.objects.
source code
 
get_range(self)
Return the possible objects to which this parameter could be set.
source code

Inherited from parameterized.Parameter: __delete__, __get__, __getstate__, __set__, __setstate__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  __classdoc = '\n Parameter whose value is set to an object ...
str(object) -> string
Properties [hide private]
  allow_None
  objects

Inherited from parameterized.Parameter: constant, default, doc, instantiate, precedence, readonly

Inherited from object: __class__

Method Details [hide private]

__init__(self, default=None, objects=[], instantiate=True, allow_None=False, **params)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

get_range(self)

source code 

Return the possible objects to which this parameter could be set.

(Returns the dictionary {object.name:object}.)

Overrides: Selector.get_range

Class Variable Details [hide private]

__classdoc

str(object) -> string

Return a nice string representation of the object. If the argument is a string, the return value is the same object.

Value:
'''
    Parameter whose value is set to an object from its list of possible objects.
    '''