Revision: 993
http://svn.sourceforge.net/pygccxml/?rev=993&view=rev
Author: roman_yakovenko
Date: 2007-04-17 00:13:00 -0700 (Tue, 17 Apr 2007)
Log Message:
-----------
small docs improvements
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py
pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py 2007-04-15 19:34:49 UTC (rev 992)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/algorithm.py 2007-04-17 07:13:00 UTC (rev 993)
@@ -3,25 +3,27 @@
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
-"""
-This module is a collection of unrelated algorithms, that works on code creators
-tree.
-"""
+"""Contains few unrelated algorithms, which works on code creators tree"""
import re
from pygccxml import declarations
def creators_affect_on_me( me ):
- """This algorithm finds all code creators that can influence on code generated
- by me. Description of algorithm::
+ """Find all relevant code creators, which influennce on code generated by "me".
+ C++ allows to define aliases to namespaces. Py++ allows user to define aliases
+ to the namespace and will take this aliases into account when it generates
+ the code.
+
+ Example:
+
[a b c d e f g]
|
+ [k l m]
|
+ [y x] <-- we are here ( x )
- The answer of this algorithm is [y,l,k,d,c,b,a]
+ return value is: [y,l,k,d,c,b,a]
"""
class impl:
def __init__( self, creator):
@@ -47,10 +49,13 @@
__RE_VALID_IDENTIFIER = re.compile( r"[_a-z]\w*", re.I | re.L | re.U )
def create_valid_name(name):
+ """Create valid name\\Python identifier from a string
+
+ As input this functions takes valid C++ name\identifier and replaces all invalid
+ characters.
+
+ Invalid characters are introduced by a template instantiation.
"""
- This function takes valid C++ class\\function name and will return valid
- Python name. I need this function in order to expose template instantiations
- """
global __RE_VALID_IDENTIFIER
match_found = __RE_VALID_IDENTIFIER.match(name)
if match_found and ( match_found.end() - match_found.start() == len(name) ):
@@ -78,10 +83,7 @@
def create_identifier(creator, full_name ):
- """
- This function will find all relevant namespace aliases and will return new
- full name that takes into account namespace aliases.
- """
+ """Return new full name, which takes into account namespace aliases"""
from pyplusplus import code_creators
dset = creators_affect_on_me( creator )
@@ -96,8 +98,14 @@
return full_name
class registration_order:
+ """class-namespace, introduce few functions, which deals with functions
+ registration order problem: http://www.language-binding.net/pyplusplus/documentation/functions/registration_order.html
+ """
+
@staticmethod
def is_related( t1, t2 ):
+ """Check whether two types\\classes t1 and t2 could introduce the problem"""
+
if declarations.is_pointer( t1 ) and declarations.is_pointer( t2 ):
return registration_order.is_related( declarations.remove_pointer( t1 )
, declarations.remove_pointer( t2 ) )
@@ -124,6 +132,7 @@
@staticmethod
def select_problematics( calldef ):
+ """Return list of problematic functions for function "calldef" """
if 1 != len( calldef.required_args ):
return []
problematics = []
Modified: pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py
===================================================================
--- pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py 2007-04-15 19:34:49 UTC (rev 992)
+++ pyplusplus_dev/pyplusplus/decl_wrappers/call_policies.py 2007-04-17 07:13:00 UTC (rev 993)
@@ -3,14 +3,8 @@
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
-"""
-This modules contains definition of call policies classes. Call policies names
-are same, that used in boost.python library.
+"""Contains definition of call policies classes"""
-For every class that implements code creation of call policies, there is a
-convinience function.
-"""
-
import algorithm
import python_traits
from pygccxml import declarations
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|