Revision: 534
http://svn.sourceforge.net/pygccxml/?rev=534&view=rev
Author: mbaas
Date: 2006-09-11 08:56:45 -0700 (Mon, 11 Sep 2006)
Log Message:
-----------
Added a doc string to the constructor of argument_t and, for additional convenience, allowed the 'type' argument to also be a string in addition to a type_t object. The constructor will automatically wrap the string inside the appropriate type_t object.
Modified Paths:
--------------
pygccxml_dev/pygccxml/declarations/calldef.py
Modified: pygccxml_dev/pygccxml/declarations/calldef.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/calldef.py 2006-09-11 09:51:36 UTC (rev 533)
+++ pygccxml_dev/pygccxml/declarations/calldef.py 2006-09-11 15:56:45 UTC (rev 534)
@@ -39,9 +39,25 @@
"""
def __init__( self, name='', type=None, default_value=None ):
+ """Constructor.
+
+ The type can either be a L{type_t} object or a string containing
+ a valid C++ type. In the latter case the string will be wrapped
+ inside an appropriate type_t object, so the L{type} property
+ will always be a type_t object.
+
+ @param name: The name of the argument
+ @type name: str
+ @param type: The type of the argument
+ @type type: L{type_t} or str
+ @param default_value: The optional default value of the argument
+ @tyape default_value: str
+ """
object.__init__(self)
self._name = name
self._default_value = default_value
+ if not isinstance(type, cpptypes.type_t):
+ type = cpptypes.dummy_type_t(str(type))
self._type = type
def __str__(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|