Update of /cvsroot/pygccxml/source/pyplusplus/code_creators
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2941/pyplusplus/code_creators
Modified Files:
instruction.py
Log Message:
from now instruction by defualt will not write themself within the code
Index: instruction.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/code_creators/instruction.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** instruction.py 10 Apr 2006 11:57:15 -0000 1.3
--- instruction.py 23 Apr 2006 14:00:14 -0000 1.4
***************
*** 12,19 ****
"""
#TODO: add silent option and make it default
! def __init__(self, parent):
code_creator.code_creator_t.__init__(self, parent)
def _create_impl(self):
answer = []
for line in self._generate_description().split( os.linesep ):
--- 12,33 ----
"""
#TODO: add silent option and make it default
! def __init__(self, parent, silent=True):
code_creator.code_creator_t.__init__(self, parent)
+ self._silent = silent
+
+ def get_silent(self):
+ return self._silent
+ def set_silent(self, silent ):
+ self._silent = silent
+
+ silent = property( get_silent, set_silent
+ , doc="""silent property controls, whether instruction
+ should be written within generated code or not.
+ Default value is True - not written.""" )
+
def _create_impl(self):
+ if self.silent:
+ return ''
answer = []
for line in self._generate_description().split( os.linesep ):
|