summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-06-07 16:18:58 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:04 -0300
commit644d7b74d18a5838a7f26de02bd0aa9a212de85c (patch)
treeed946d547d5dc0a6e6893ab22efb412d0ab35716 /doc
parent99d400c0ca0f139714448bc8ab3796495d8b316d (diff)
Added the "default-constructor" attribute to the "primitive-type" tag.
The default-constructor attribute specifies a way to build an instance of a class declared as primitive type using default arguments. Documentation and a test were also added. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Ara├║jo <renato.filho@openbossa.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/typesystem_specifying_types.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/typesystem_specifying_types.rst b/doc/typesystem_specifying_types.rst
index 68b85f5f..66536cf7 100644
--- a/doc/typesystem_specifying_types.rst
+++ b/doc/typesystem_specifying_types.rst
@@ -77,6 +77,7 @@ primitive-type
<primitive-type name="..."
since="..."
target-name="..."
+ default-constructor="..."
preferred-conversion="yes | no" />
</typesystem>
@@ -93,6 +94,13 @@ primitive-type
and "long long" become "long" but we should prefer the "qint64" version. For
this reason we mark "long long" with preferred-conversion="no".
+ The *optional* **preferred-conversion** attribute tells how to build a default
+ instance of the primitive type. It should be a constructor call capable of
+ creating a instance of the primitive type. Example: a class "Foo" could have
+ a **preferred-conversion** value set to "Foo()". Usually this attribute is
+ used only for classes declared as primitive types and not for primitive C++
+ types, but that depends on the application using *ApiExtractor*.
+
.. _namespace: