From: <rom...@us...> - 2006-05-02 04:20:44
|
Revision: 33 Author: roman_yakovenko Date: 2006-05-01 21:20:37 -0700 (Mon, 01 May 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=33&view=rev Log Message: ----------- adding new type class "dummy_type_t". This class is very useful for code generation and not only. Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/cpptypes.py Modified: pygccxml_dev/pygccxml/declarations/cpptypes.py =================================================================== --- pygccxml_dev/pygccxml/declarations/cpptypes.py 2006-05-02 04:19:22 UTC (rev 32) +++ pygccxml_dev/pygccxml/declarations/cpptypes.py 2006-05-02 04:20:37 UTC (rev 33) @@ -51,6 +51,19 @@ #<Unimplemented id="_9482" tree_code="188" tree_code_name="template_type_parm" node="0xcc4d5b0"/> #In this case I will use this as type + +class dummy_type_t( type_t ): + #This class is very usefull for code generation + def __init__( self, decl_string ): + type_t.__init__( self ) + self._decl_string = decl_string + + def _create_decl_string(self): + return self._decl_string + + def _clone_impl( self ): + return dummy_type_t( self._decl_string ) + class unknown_t( type_t ): "type, that represents all C++ types, that could not be parsed by GCC-XML" def __init__( self ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |