Module _ctypes :: Class Structure |
[show private | hide private]
[frames | no frames]

## Type Structure

    object --+
             |
        _CData --+
                 |
                Structure

Known Subclasses:
  `MODULEENTRY32`, `PROCESSENTRY32`, `THREADENTRY32`

Structure base class

Method Summary
| ``__init__`(...)` x.__init__(...) initializes x; see x.__class__.__doc__ for signature
| ``__new__`(T, S, ...)` T.__new__(S, ...) -> a new object with type S, a subtype of T
Tuple | ``__reduce__`(self)` cPickle will allow an object to marshal itself if the __reduce__ function is defined.
Inherited from _CData
| ``__ctypes_from_outparam__`(...)`
| ``__hash__`(x)` x.__hash__() <==> hash(x)
Inherited from object
| ``__delattr__`(...)` x.__delattr__('name') <==> del x.name
| ``__getattribute__`(...)` x.__getattribute__('name') <==> x.name
| ``__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)

Class Variable Summary
`getset_descriptor` | `_as_parameter_` = `<attribute '_as_parameter_' of '_ctypes...`
Inherited from _CData
`member_descriptor` | `_b_base_` = `<member '_b_base_' of '_ctypes._CData' object...`
`member_descriptor` | `_b_needsfree_` = `<member '_b_needsfree_' of '_ctypes._CDa...`
`member_descriptor` | `_objects` = `<member '_objects' of '_ctypes._CData' object...`

Method Details

### __init__(...) (Constructor) x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: `__builtin__.object.__init__`

    ### __new__(T, S, ...) T.__new__(S, ...) -> a new object with type S, a subtype of T Returns:
        a new object with type S, a subtype of T
Overrides: `__builtin__.object.__new__`

### __reduce__(self) cPickle will allow an object to marshal itself if the __reduce__ function is defined. Because cPickle is unable to handle ctype primitives or the objects derived on those primitives we define this function that later is assigned as the __reduce__ method for all types. This method relies on _construct for unmarshaling. As per the Python docs __reduce__ must return a tuple where the first element is "A callable object that will be called to create the initial version of the object. The next element of the tuple will provide arguments for this callable...". In this case we pass the object class and the raw data bytes of the object to _construct. Returns: Tuple, as specified per the cPickle __reduce__ Python docs. (type=Tuple)

Class Variable Details

    ### _as_parameter_ Type: `getset_descriptor` Value:
        <attribute '_as_parameter_' of '_ctypes.Structure' objects>

Generated by Epydoc 2.1 on Thu Sep 14 10:39:48 2006 | http://epydoc.sf.net