Object which can contain other objects.
<container>.contents is just a list of contained
objects (i.e. references). Ability to contain a Thing is based on the Thing's
single-parameter "size". (i.e. nothing as complex
as length/breasth/weight or other considerations).
Also sizes seem not to be additive, can contain
as many smaller things as we want..
- Container
- base type of any object which can contain another
Methods
|
|
CanContain
ContainNoCheck
GetContentsDesc
PreObj
VisibleContents
__init__
|
|
CanContain
|
CanContain ( self, pThing )
Determines if the Thing to be contained is smaller
than this container. return true if this object can contain another
|
|
ContainNoCheck
|
ContainNoCheck ( self, *pThing )
Puts an object into the container.
move the given object to the contents of this one
|
|
GetContentsDesc
|
GetContentsDesc ( self, pLooker=None )
Describes the contents of the object by reporting their
GetListLine method results.
|
|
PreObj
|
PreObj ( self, cmd )
|
|
VisibleContents
|
VisibleContents ( self )
Returns a list of contents recursively. The comments say
it must be transparent or open, but I don't see any code
to check that. return list of visible contents as objects (recursively)
|
|
__init__
|
__init__ ( self, pNames='' )
initialization method
|
|