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

Type BaseProtogenClass

object --+
         |
        BaseProtogenClass

Known Subclasses:
COUNTEDBUFFEREDSTRING, CSVSTRING, DATA, EXTRAZERO, LIST, PBDateTime, SEVENBITSTRING, SMSCannedFile, SMSDATE, SPURIOUSZERO, STRING, T9USERDBBLOCK, UINTlsb, USTRING

All types are derived from this
Method Summary
  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
  iscontainer(self)
Do we contain fields?
  packetsize(self)
Returns size in bytes that we occupy
  packetspan(self)
Returns tuple of begining,end offsets from last packet we were read or written from.
  readfrombuffer(self, buf)
Get our value from the buffer
  update(self, *args, **kwargs)
  writetobuffer(self, buf)
Scribble ourselves to the buf
  _complainaboutunusedargs(self, klass, dict)
A helper function that will raise an exception if there are unused keyword arguments.
  _consumekw(self, dict, consumelist)
A helper function for easily setting internal values from the dict
  _ismostderived(self, klass)
  _update(self, args, kwargs)
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __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

getvalue(self)

Returns our underlying value if sensible (eg an integer, string or list) else returns self

iscontainer(self)

Do we contain fields?

packetsize(self)

Returns size in bytes that we occupy

packetspan(self)

Returns tuple of begining,end offsets from last packet we were read or written from.

Note that in normal Python style, end is one beyond the last byte we actually own

readfrombuffer(self, buf)

Get our value from the buffer

writetobuffer(self, buf)

Scribble ourselves to the buf

_complainaboutunusedargs(self, klass, dict)

A helper function that will raise an exception if there are unused keyword arguments.
Parameters:
klass - This should be the class you are calling this function from
dict - The keyword arguments still in play

Note: that we only complain if in the most derived class, so it is safe to always call this helper as the last line of your constructor.

_consumekw(self, dict, consumelist)

A helper function for easily setting internal values from the dict

For each name in consumelist, we look for it in the dict and set self._name to the value from dict. The key is then deleted from the dict.

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