Package yagdoc :: Module inspector :: Class InspectConstructor
[show private | hide private]
[frames | no frames]

Type InspectConstructor

object --+
         |
        InspectConstructor


Customize and write inspect program C code.
Method Summary
  __init__(self)
  add_pspec_descriptor(self, name, descriptor_body)
Add a param spec descriptor.
  add_special_property(self, name, req_type, query_func)
Add a special property type.
  apply_hook(self, name, code)
Replace a customization hook with given code.
  apply_hooks(self)
Apply all customization hooks.
  set_initialization_func(self, init_func)
Set the initialization function hook.
  write_source(self, outfile)
Apply hooks and write the C source code into a file.
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Method Details

add_pspec_descriptor(self, name, descriptor_body)

Add a param spec descriptor.
Parameters:
name - Descriptor function base name, the full name is formed by prepending 'describe_property_'.
           (type=str)
descriptor_body - Descriptor function body (i.e. the contents of the curly bracaes).
           (type=str)

add_special_property(self, name, req_type, query_func)

Add a special property type.
Parameters:
name - Special property name, such as 'Child' or 'Style' (these two are built). Preferably a title-capitalized identifier.
           (type=str)
req_type - Prerequisite type name, e.g. 'GtkContainer'. Objects that are not subclasses of this type are never queried for this special property.
           (type=str)
query_func - Query function name, e.g. 'gtk_container_class_list_child_properties'. It must have the same prototype as g_object_class_list_properties().
           (type=str)

apply_hook(self, name, code)

Replace a customization hook with given code.
Parameters:
name - Code block name (the identifier that appears between @@@ in the replacable comment).
           (type=str)
code - The code to insert.
           (type=str)

apply_hooks(self)

Apply all customization hooks.

set_initialization_func(self, init_func)

Set the initialization function hook.
Parameters:
init_func - Initialization function body. Replaces the default function body default_initialization_func.
           (type=str)

write_source(self, outfile='inspect.c')

Apply hooks and write the C source code into a file.

This should be called only once.

If a file name is given as outfile, update_file() is used to write it.
Parameters:
outfile - File or name of the file to write. Normally does not need to be specified.
           (type=file or string)

Generated by Epydoc 2.1 on Fri Oct 5 00:36:53 2007 http://epydoc.sf.net