[pygccxml-commit] source/pyplusplus/experimental pypp_api.py,1.3,1.4
Brought to you by:
mbaas,
roman_yakovenko
From: Allen B. <al...@us...> - 2006-03-09 01:49:58
|
Update of /cvsroot/pygccxml/source/pyplusplus/experimental In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16424 Modified Files: pypp_api.py Log Message: Migrate more of the implementation of the high-level API over to the latest low-level API. There are still several things missing: - creator __init__ does not yet allow headers to be passed in - no support for custom creators on decl wrappers - no support for finalize on decl wrappers - expose in new decl_wrappers always recurses Still much work to do but this is closer. Index: pypp_api.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/experimental/pypp_api.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pypp_api.py 8 Mar 2006 09:34:54 -0000 1.3 --- pypp_api.py 9 Mar 2006 01:49:56 -0000 1.4 *************** *** 179,183 **** def buildCreators(self, moduleName, filename, useScope=False): """ Build creator tree and module from the current declarations. ! See createModule for parameter documentation. In normal usage the user will not call this directly. Return the base of the creator tree. --- 179,183 ---- def buildCreators(self, moduleName, filename, useScope=False): """ Build creator tree and module from the current declarations. ! See writeModule for parameter documentation. In normal usage the user will not call this directly. Return the base of the creator tree. *************** *** 201,205 **** # Create creator.module_t for the module # - override the header files in create since we already know what files we used. ! maker = module_creator.creator_t(self.mFinalDecls, module_name=moduleName, recursive=False) extmodule = maker.create(declHeaders=self.mHeaderFiles) --- 201,205 ---- # Create creator.module_t for the module # - override the header files in create since we already know what files we used. ! maker = module_creator.creator_t(self.mFinalDecls, module_name=moduleName) extmodule = maker.create(declHeaders=self.mHeaderFiles) *************** *** 243,247 **** """ if not self.mExtModule: ! self.createCreators(moduleName, filename, useScope) extmodule = self.mExtModule assert extmodule --- 243,247 ---- """ if not self.mExtModule: ! self.buildCreators(moduleName, filename, useScope) extmodule = self.mExtModule assert extmodule *************** *** 356,362 **** """ Construct declaration wrapper for decl. """ self.mDecl = decl # The declaration we are wrapping ! if not hasattr(self.mDecl, "declDecorator"): ! self.mDecl.declDecorator = code_creators.decl_decorator_t() ! def Namespace(self, name, expose=False): """ Return wrapper for namespace. --- 356,360 ---- """ Construct declaration wrapper for decl. """ self.mDecl = decl # The declaration we are wrapping ! def Namespace(self, name, expose=False): """ Return wrapper for namespace. *************** *** 421,425 **** """ for d in iterdecls(self.mDecl, True): ! d._expose_flag = False return self --- 419,423 ---- """ for d in iterdecls(self.mDecl, True): ! d.exclude() return self *************** *** 429,433 **** """ for d in iterdecls(self.mDecl, recursive): ! d._expose_flag = True return self --- 427,431 ---- """ for d in iterdecls(self.mDecl, recursive): ! d.include() return self *************** *** 441,458 **** Ex: setHeldType("boost::shared_ptr<Class>") """ ! self.mDecl.declDecorator.heldType = heldType return self def setCallPolicy(self, callPolicy): """ Set the callpolicy of the contained method. ! :arg callPolicy: Callpolicy object to use (must be of type code_creators.call_policy_t) """ ! assert isinstance(callPolicy, code_creators.call_policy_t) ! self.mDecl.declDecorator.callPolicy = callPolicy return self def finalize(self): """ Ask this system to attempt to finalize this declaration. """ ! self.mDecl.declDecorator.finalize = True return self --- 439,457 ---- Ex: setHeldType("boost::shared_ptr<Class>") """ ! self.mDecl.held_type = heldType return self def setCallPolicy(self, callPolicy): """ Set the callpolicy of the contained method. ! :arg callPolicy: Callpolicy object to use (must be of type decl_wrappers.call_policy_t) """ ! assert isinstance(callPolicy, decl_wrappers.call_policy_t) ! self.mDecl.call_policies = callPolicy return self def finalize(self): """ Ask this system to attempt to finalize this declaration. """ ! #self.mDecl.declDecorator.finalize = True ! print "XXX: Can't implement yet." return self *************** *** 481,485 **** used to build the code for the wrapped declaration. """ ! self.mDecl.declDecorator.customCreators.append(creator) return self --- 480,485 ---- used to build the code for the wrapped declaration. """ ! #self.mDecl.declDecorator.customCreators.append(creator) ! print "XXX: Can't implement yet." return self *************** *** 558,563 **** ! 6 ! def findContainedMethod(self, name, retval=None, args=None): """Search for a method with a particular name. name is the method name, retval the type of the return --- 558,563 ---- ! ! def findContainedMethod(self, name, retval=None, args=None): """Search for a method with a particular name. name is the method name, retval the type of the return |