schrodinger :: infra :: mmobject :: MmObject :: Class MmObject
[hide private]
[frames] | no frames]

Class MmObject

object --+
         |
        MmObject
Known Subclasses:

An abstraction of the bookkeeping needed to create a garbage collected MM object. To subclass, you must provide:

  1. a static initialize() function that calls the necessary mmlib initialize functions. Takes a single argument that is the error handler.
  2. a static terminate() function that takes no arguments and calls the mmlib terminate functions for everything initialized in init().
  3. a _delete() instance method that takes no arguments (other than self) and deletes the object via mmlib calls.
Instance Methods [hide private]
 
__init__(self, handle, manage_handle=True, error_handler=None)
Initialize an object with an existing MM handle - i.e.
 
__int__(self)
Return the handle of the object so that the object reference can be used in functions that expect an integer handle.
 
__del__(self)
Decrement the reference count.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, handle, manage_handle=True, error_handler=None)
(Constructor)

 

Initialize an object with an existing MM handle - i.e. one created with direct calls to the mmlibs.

By default, the MM resources will be managed by the object. To keep these from being cleaned up on object deletion, set manage_handle=False.

Overrides: object.__init__

__del__(self)
(Destructor)

 

Decrement the reference count. If the handle is being actively managed, call _delete when it the count hits zero.