Update of /cvsroot/pygccxml/source/pyplusplus/code_creators
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19006/pyplusplus/code_creators
Modified Files:
array_1_registrator.py calldef.py class_declaration.py enum.py
global_variable.py include.py include_directories.py
instruction.py license.py member_variable.py
Log Message:
adding short explanation about code creator class
Index: member_variable.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/member_variable.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** member_variable.py 28 Feb 2006 08:06:02 -0000 1.12
--- member_variable.py 10 Apr 2006 11:57:15 -0000 1.13
***************
*** 12,15 ****
--- 12,20 ----
class member_variable_base_t( declaration_based.declaration_based_t ):
+ """
+ Base class for all member variables code creators. Mainly exists to
+ simplify file writers algorithms.
+ """
+
def __init__(self, variable, wrapper=None, parent=None ):
declaration_based.declaration_based_t.__init__( self
***************
*** 25,28 ****
--- 30,37 ----
class member_variable_t( member_variable_base_t ):
+ """
+ Creates boost.python code that exposes member variable.
+ """
+
__PARAM_SEPARATOR = ', '
def __init__(self, variable, parent=None ):
***************
*** 59,62 ****
--- 68,75 ----
class bit_field_t( member_variable_base_t ):
+ """
+ Creates boost.python code that exposes bit fields member variables
+ """
+
_PARAM_SEPARATOR = ', '
def __init__(self, variable, wrapper, parent=None ):
***************
*** 94,97 ****
--- 107,114 ----
class bit_field_wrapper_t( declaration_based.declaration_based_t ):
+ """
+ Creates C++ code that creates accessor for bit fields
+ """
+
indent = declaration_based.declaration_based_t.indent
BF_GET_TEMPLATE = os.linesep.join([
***************
*** 152,155 ****
--- 169,176 ----
class array_mv_t( member_variable_base_t ):
+ """
+ Creates boost.python code that exposes array member variable.
+ """
+
_PARAM_SEPARATOR = ', '
def __init__(self, variable, wrapper, parent=None ):
***************
*** 182,185 ****
--- 203,210 ----
class array_mv_wrapper_t( declaration_based.declaration_based_t ):
+ """
+ Creates C++ code that register array class.
+ """
+
def __init__(self, variable, parent=None ):
declaration_based.declaration_based_t.__init__( self
Index: class_declaration.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/class_declaration.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** class_declaration.py 6 Apr 2006 06:15:58 -0000 1.39
--- class_declaration.py 10 Apr 2006 11:57:15 -0000 1.40
***************
*** 16,19 ****
--- 16,22 ----
class class_t( scoped.scoped_t ):
+ """
+ Creates boost.python code that needed to export a class
+ """
def __init__(self, class_inst, wrapper=None, parent=None ):
scoped.scoped_t.__init__( self
***************
*** 251,254 ****
--- 254,261 ----
#open question: should I put class wrapper under some specifiec namespace?
class class_wrapper_t( scoped.scoped_t ):
+ """
+ Creates C++ code that creates wrapper arround some class
+ """
+
def __init__(self, declaration, class_creator, parent=None ):
scoped.scoped_t.__init__( self
Index: include.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/include.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** include.py 14 Dec 2005 09:09:52 -0000 1.6
--- include.py 10 Apr 2006 11:57:15 -0000 1.7
***************
*** 10,13 ****
--- 10,16 ----
class include_t(code_creator.code_creator_t):
+ """
+ Creates C++ code for include directive
+ """
def __init__( self, header, parent=None ):
code_creator.code_creator_t.__init__(self, parent)
***************
*** 38,41 ****
--- 41,48 ----
class precompiled_header_t(include_t):
+ """
+ Creates C++ code for precompiled header include directive
+ """
+
def __init__( self, header, parent=None ):
include_t.__init__(self, header, parent)
Index: calldef.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/calldef.py,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** calldef.py 6 Apr 2006 06:15:58 -0000 1.51
--- calldef.py 10 Apr 2006 11:57:15 -0000 1.52
***************
*** 11,14 ****
--- 11,17 ----
class function_t( declaration_based.declaration_based_t):
+ """
+ Creates boost.python code needed to expose free/member function.
+ """
_PARAM_SEPARATOR = ', '
def __init__(self, function, wrapper=None, parent=None ):
***************
*** 149,152 ****
--- 152,159 ----
class function_wrapper_t( declaration_based.declaration_based_t ):
+ """
+ Creates C++ code that builds wrapper arround exposed function. There are
+ usecases when more then one function is created, for example virtual function.
+ """
def __init__( self, function, parent=None ):
declaration_based.declaration_based_t.__init__( self, declaration=function, parent=parent )
***************
*** 449,452 ****
--- 456,462 ----
class constructor_t( declaration_based.declaration_based_t ):
+ """
+ Creates boost.python code needed to expose constructor.
+ """
def __init__(self, constructor, wrapper=None, parent=None ):
declaration_based.declaration_based_t.__init__( self
***************
*** 543,546 ****
--- 553,559 ----
class static_method_t( declaration_based.declaration_based_t ):
+ """
+ Creates boost.python code that expose member function as static function.
+ """
def __init__(self, function, function_code_creator=None, parent=None ):
declaration_based.declaration_based_t.__init__( self
***************
*** 560,563 ****
--- 573,580 ----
class constructor_wrapper_t( declaration_based.declaration_based_t ):
+ """
+ Creates C++ code that builds wrapper arround exposed constructor.
+ """
+
def __init__( self, constructor, parent=None ):
declaration_based.declaration_based_t.__init__( self
***************
*** 612,615 ****
--- 629,635 ----
#I should understand this more
class special_constructor_wrapper_t( declaration_based.declaration_based_t ):
+ """
+ Creates wrapper class constructor from wrapped class instance.
+ """
def __init__( self, class_inst, parent=None ):
declaration_based.declaration_based_t.__init__( self
***************
*** 644,647 ****
--- 664,670 ----
class trivial_constructor_wrapper_t( declaration_based.declaration_based_t ):
+ """
+ Creates trivial wrapper class constructor.
+ """
def __init__( self, class_inst, parent=None ):
declaration_based.declaration_based_t.__init__( self
***************
*** 665,668 ****
--- 688,694 ----
#you can define operators that are not.
class operator_t( declaration_based.declaration_based_t ):
+ """
+ Creates boost.python code needed to expose supported subset of C++ operators.
+ """
class SELF_POSITION:
FIRST = 'first'
***************
*** 751,754 ****
--- 777,783 ----
class casting_operator_t( declaration_based.declaration_based_t ):
+ """
+ Creates boost.python code needed to register type conversions( implicitly_convertible )
+ """
def __init__( self, operator, parent=None ):
declaration_based.declaration_based_t.__init__( self
***************
*** 769,772 ****
--- 798,806 ----
class casting_member_operator_t( declaration_based.declaration_based_t ):
+ """
+ Creates boost.python code needed to register casting operators. For some
+ operators Pythonic name is given: __int__, __long__, __float__, __str__
+ """
+
def prepare_special_cases():
special_cases = {}
***************
*** 846,849 ****
--- 880,888 ----
class casting_constructor_t( declaration_based.declaration_based_t ):
+ """
+ Creates boost.python code needed to register type conversions( implicitly_convertible ).
+ This case treat situation when class has public non explicit constuctor from
+ another type.
+ """
def __init__( self, constructor, parent=None ):
declaration_based.declaration_based_t.__init__( self
Index: array_1_registrator.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/array_1_registrator.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** array_1_registrator.py 28 Feb 2006 08:06:02 -0000 1.3
--- array_1_registrator.py 10 Apr 2006 11:57:15 -0000 1.4
***************
*** 12,15 ****
--- 12,18 ----
class array_1_registrator_t( code_creator.code_creator_t ):
+ """
+ This class creates code that register static sized array
+ """
def __init__( self, array_type, parent=None ):
code_creator.code_creator_t.__init__(self, parent=parent)
Index: enum.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/enum.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** enum.py 6 Apr 2006 06:15:58 -0000 1.7
--- enum.py 10 Apr 2006 11:57:15 -0000 1.8
***************
*** 9,12 ****
--- 9,15 ----
class enum_t( declaration_based.declaration_based_t ):
+ """
+ Creates boost.python code that expose C++ enum
+ """
def __init__(self, enum, parent=None ):
declaration_based.declaration_based_t.__init__( self
Index: license.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/license.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** license.py 14 Dec 2005 09:09:52 -0000 1.2
--- license.py 10 Apr 2006 11:57:15 -0000 1.3
***************
*** 7,10 ****
--- 7,14 ----
class license_t(code_creator.code_creator_t):
+ """
+ This class allows user to put his license on the top of every generated file.
+ License text will be generated as is.
+ """
def __init__(self, text, parent=None):
code_creator.code_creator_t.__init__(self, parent)
Index: include_directories.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/include_directories.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** include_directories.py 14 Dec 2005 09:09:52 -0000 1.6
--- include_directories.py 10 Apr 2006 11:57:15 -0000 1.7
***************
*** 9,12 ****
--- 9,17 ----
class include_directories_t(instruction.instruction_t):
+ """
+ The instance of this class holds a list of user defined directories.
+ L{include_t} and {precompiled_header_t} code creators use it to generate
+ relative include directives.
+ """
def __init__(self, parent=None ):
instruction.instruction_t.__init__(self, parent)
Index: instruction.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/instruction.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** instruction.py 10 Nov 2005 05:59:33 -0000 1.2
--- instruction.py 10 Apr 2006 11:57:15 -0000 1.3
***************
*** 8,11 ****
--- 8,15 ----
class instruction_t(code_creator.code_creator_t):
+ """
+ This class is used as a base class for different instruction for code creators.
+ """
+ #TODO: add silent option and make it default
def __init__(self, parent):
code_creator.code_creator_t.__init__(self, parent)
Index: global_variable.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/global_variable.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** global_variable.py 28 Feb 2006 08:06:02 -0000 1.6
--- global_variable.py 10 Apr 2006 11:57:15 -0000 1.7
***************
*** 13,16 ****
--- 13,20 ----
class global_variable_base_t( declaration_based.declaration_based_t ):
+ """
+ Base class for all global variables code creators. Mainly exists to
+ simplify file writers algorithms.
+ """
def __init__(self, variable, wrapper=None, parent=None ):
declaration_based.declaration_based_t.__init__( self
***************
*** 26,29 ****
--- 30,36 ----
class global_variable_t( global_variable_base_t ):
+ """
+ Creates boost.python code that exposes global variable.
+ """
def __init__(self, variable, parent=None ):
global_variable_base_t.__init__( self
***************
*** 41,44 ****
--- 48,55 ----
class array_gv_t( global_variable_base_t ):
+ """
+ Creates boost.python code that exposes array global variable.
+ """
+
_PARAM_SEPARATOR = ', '
def __init__(self, variable, wrapper, parent=None ):
***************
*** 58,61 ****
--- 69,76 ----
class array_gv_wrapper_t( declaration_based.declaration_based_t ):
+ """
+ Creates C++ code that register array class.
+ """
+
def __init__(self, variable, parent=None ):
declaration_based.declaration_based_t.__init__( self
|