Package phones :: Module com_brew :: Class SPURIOUSZERO
[show private | hide private]
[frames | no frames]

Type SPURIOUSZERO

       object --+    
                |    
BaseProtogenClass --+
                    |
                   SPURIOUSZERO


This is a special class used to consume the spurious zero in some p_brew.listfileresponse

The three bytes are formatted as follows:

Fun and games ensue because files in the root directory have a zero length directory name, so we have some heuristics to try and distinguish if the first byte is the spurious zero or not

Also allow for zero length filenames.
Method Summary
  __init__(self, *args, **kwargs)
  readfrombuffer(self, buf)
Get our value from the buffer
    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
  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.
  update(self, *args, **kwargs)
  writetobuffer(self, buf)
Scribble ourselves to the buf
    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

readfrombuffer(self, buf)

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

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