Module prototypes :: Class LIST
[show private | hide private]
[frames | no frames]

Type LIST

       object --+    
                |    
BaseProtogenClass --+
                    |
                   LIST


A list of items

You can generally treat this class as though it is a list. Note that some list like methods haven't been implemented (there are so darn many!) If you are missing one you want to use, please add it to this class.
Method Summary
  __init__(self, *args, **kwargs)
You can pass objects to start the list with, or to the value keyword arg
  __delitem__(self, index)
  __getitem__(self, index)
  __iter__(self)
  __len__(self)
  __setitem__(self, index, value)
  append(self, item)
  containerelements(self)
  extend(self, items)
  insert(self, index, item)
  iscontainer(self)
Do we contain fields?
  packetsize(self)
Returns size in bytes that we occupy
  readfrombuffer(self, buf)
Get our value from the buffer
  writetobuffer(self, buf)
Scribble ourselves to the buf
    Inherited from BaseProtogenClass
  autologread(self, buf, logtitle)
  autologwrite(self, buf, logtitle)
  getvalue(self)
Returns our underlying value if sensible (eg an integer, string or list) else returns self
  packetspan(self)
Returns tuple of begining,end offsets from last packet we were read or written from.
  update(self, *args, **kwargs)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__init__(self, *args, **kwargs)
(Constructor)

You can pass objects to start the list with, or to the value keyword arg
Keyword Parameters:
createdefault - (Default False) Creates default members of the list if enough were not supplied before writing.
length - (Optional) How many items there are in the list
raiseonbadlength - (Default True) raises ValueLengthException if there are the wrong number of items in the list. Note that this checking is only done when writing or reading from a buffer. length must be set for this to have any effect. If you have createdefault set then having less than length elements will not cause the exception.
elementclass - (Mandatory) The class of each element
elementinitkwargs - (Optional) KWargs for the constructor of each element
value - (Optional) Value
Overrides:
__builtin__.object.__init__

iscontainer(self)

Do we contain fields?
Overrides:
prototypes.BaseProtogenClass.iscontainer (inherited documentation)

packetsize(self)

Returns size in bytes that we occupy
Overrides:
prototypes.BaseProtogenClass.packetsize (inherited documentation)

readfrombuffer(self, buf)

Get our value from the buffer
Overrides:
prototypes.BaseProtogenClass.readfrombuffer (inherited documentation)

writetobuffer(self, buf)

Scribble ourselves to the buf
Overrides:
prototypes.BaseProtogenClass.writetobuffer (inherited documentation)

Generated by Epydoc 2.1 on Fri Aug 15 18:58:27 2008 http://epydoc.sf.net