Revision: 407
Author: roman_yakovenko
Date: 2006-08-15 19:20:54 -0700 (Tue, 15 Aug 2006)
ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=407&view=rev
Log Message:
-----------
Updating documentation
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py
pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py
pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py
pyplusplus_dev/pyplusplus/file_writers/multiple_files.py
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py 2006-08-15 15:10:44 UTC (rev 406)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite1.py 2006-08-16 02:20:54 UTC (rev 407)
@@ -17,6 +17,11 @@
# 5. shared_ptr
class indexing_suite1_t( object ):
+ """
+ This class helps user to export STD containers, using Boost.Python
+ indexing suite V2.
+ """
+
def __init__( self, container_class, container_traits, no_proxy=None, derived_policies=None ):
object.__init__( self )
self.__no_proxy = no_proxy
@@ -26,11 +31,13 @@
def _get_container_class( self ):
return self.__container_class
- container_class = property( _get_container_class )
+ container_class = property( _get_container_class
+ , doc="Reference to STD container class" )
def _get_element_type(self):
return self.__container_traits.element_type( self.container_class )
- element_type = property( _get_element_type )
+ element_type = property( _get_element_type
+ , doc="Reference to container value_type( mapped_type ) type" )
def _get_no_proxy( self ):
if self.__no_proxy is None:
@@ -48,11 +55,17 @@
def _set_no_proxy( self, no_proxy ):
self.__no_proxy = no_proxy
- no_proxy = property( _get_no_proxy, _set_no_proxy )
+ no_proxy = property( _get_no_proxy, _set_no_proxy
+ , doc="NoProxy value, the initial value depends on container"
+ +" element_type( mapped_type ) type. In most cases, "
+ +"Py++ is able to guess this value, right. If you are not "
+ +"lucky, you will have to set the property value.")
def _get_derived_policies( self ):
return self.__derived_policies
def _set_derived_policies( self, derived_policies ):
self.__derived_policies = derived_policies
- derived_policies = property( _get_derived_policies, _set_derived_policies )
+ derived_policies = property( _get_derived_policies, _set_derived_policies
+ , doc="This proprty contains DerivedPolicies string. "
+ +"It will be added as is to the generated code.")
\ No newline at end of file
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py 2006-08-15 15:10:44 UTC (rev 406)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/indexing_suite2.py 2006-08-16 02:20:54 UTC (rev 407)
@@ -31,10 +31,19 @@
class indexing_suite2_t( object ):
+ """
+ This class helps user to export STD containers, using Boost.Python
+ indexing suite V2.
+ """
+
+ #List of method names. These method could be excluded from being exposed.
METHODS = ( 'len', 'iter', 'getitem', 'getitem_slice', 'index', 'contains'
, 'count', 'has_key', 'setitem', 'setitem_slice', 'delitem'
, 'delitem_slice', 'reverse', 'append', 'insert', 'extend', 'sort' )
+ #Dictionary of method group names. These method groups could be excluded from
+ #being exposed. Dictionary key is a method group name. Dictionary value is a
+ #list of all methods, which belong to the group.
METHOD_GROUPS = {
'slice' : ( 'method_getitem_slice', 'method_setitem_slice', 'method_delitem_slice' )
, 'search' : ( 'method_index', 'method_contains', 'method_count', 'method_has_key' )
@@ -53,22 +62,27 @@
def _get_container_class( self ):
return self.__container_class
- container_class = property( _get_container_class )
+ container_class = property( _get_container_class
+ , doc="Reference to STD container class" )
def _get_container_traits( self ):
return self._get_container_traits()
- container_traits = property( _get_container_traits )
+ container_traits = property( _get_container_traits
+ , doc="Reference to container traits. See "
+ "pygccxml documentation for STD container traits.")
def _get_element_type(self):
return self.__container_traits.element_type( self.container_class )
- element_type = property( _get_element_type )
+ element_type = property( _get_element_type
+ , doc="Reference to container value_type( mapped_type ) type" )
def _get_call_policies( self ):
#TODO find out call policies
return self.__call_policies
def _set_call_policies( self, call_policies ):
self.__call_policies = call_policies
- call_policies = property( _get_call_policies, _set_call_policies )
+ call_policies = property( _get_call_policies, _set_call_policies
+ , "Call policies, that should be used by Boost.Python container classes.")
def __apply_defaults_if_needed( self ):
if self._default_applied:
@@ -79,11 +93,13 @@
pass
def disable_method( self, method_name ):
+ """Disable method from being exposed"""
assert method_name in self.METHODS
self.__apply_defaults_if_needed()
self._disabled_methods.add( method_name )
def enable_method( self, method_name ):
+ """Enable method to be exposed"""
assert method_name in self.METHODS
self.__apply_defaults_if_needed()
if method_name in self._disabled_methods:
@@ -92,14 +108,17 @@
def _get_disabled_methods( self ):
self.__apply_defaults_if_needed()
return self._disabled_methods
- disable_methods = property( _get_disabled_methods )
+ disable_methods = property( _get_disabled_methods
+ , doc="list of all disabled methods")
def disable_methods_group( self, group_name ):
+ """Disable methods group from being exposed"""
assert group_name in self.METHOD_GROUPS
self.__apply_defaults_if_needed()
self._disabled_groups.add( group_name )
def enable_methods_group( self, group_name ):
+ """Enable methods group to be exposed"""
assert group_name in self.METHOD_GROUPS
self.__apply_defaults_if_needed()
if group_name in self._disabled_groups:
@@ -108,4 +127,5 @@
def _get_disabled_methods_groups( self ):
self.__apply_defaults_if_needed()
return self._disabled_groups
- disabled_methods_groups = property( _get_disabled_methods_groups )
\ No newline at end of file
+ disabled_methods_groups = property( _get_disabled_methods_groups
+ , doc="list of all disabled methods group")
\ No newline at end of file
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py 2006-08-15 15:10:44 UTC (rev 406)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/variable_wrapper.py 2006-08-16 02:20:54 UTC (rev 407)
@@ -7,6 +7,9 @@
import decl_wrapper
class variable_t(decl_wrapper.decl_wrapper_t, declarations.variable_t):
+
+ """This class helps user to expose member and global variables."""
+
def __init__(self, *arguments, **keywords):
declarations.variable_t.__init__(self, *arguments, **keywords )
decl_wrapper.decl_wrapper_t.__init__( self )
@@ -38,8 +41,6 @@
, doc=__call_policies_doc__ )
def _exportable_impl( self ):
- #if not isinstance( self.parent, declarations.class_t ):
- # return ''
if not self.name:
return "Py++ can not expose unnamed variables"
if self.bits == 0 and self.name == "":
Modified: pyplusplus_dev/pyplusplus/file_writers/multiple_files.py
===================================================================
--- pyplusplus_dev/pyplusplus/file_writers/multiple_files.py 2006-08-15 15:10:44 UTC (rev 406)
+++ pyplusplus_dev/pyplusplus/file_writers/multiple_files.py 2006-08-16 02:20:54 UTC (rev 407)
@@ -25,6 +25,10 @@
@type extmodule: module_t
@param directory_path: The output directory where the source files are written
@type directory_path: str
+
+ @param write_main: if it is True, the class will write out a main file
+ that calls all the registration methods.
+ @type write_main: boolean
"""
writer.writer_t.__init__(self, extmodule)
self.__directory_path = directory_path
@@ -294,11 +298,10 @@
def write(self):
""" Write out the module.
Creates a separate source/header combo for each class and for enums, globals,
- and free functions.
- If write_main is True it writes out a main file that calls all the registration methods.
- After this call split_header_names and split_method_names will contain
- all the header files and registration methods used. This can be used by
- user code to create custom registration methods if main is not written.
+ and free functions. Post-condition: split_header_names and split_method_names
+ variables, will contain all the header files and registration methods
+ used. This can be used by user code to create custom registration
+ methods if main is not written.
"""
self.write_code_repository( self.__directory_path )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|