From 644d7b74d18a5838a7f26de02bd0aa9a212de85c Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Mon, 7 Jun 2010 16:18:58 -0300 Subject: Added the "default-constructor" attribute to the "primitive-type" tag. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed by Renato Araújo --- doc/typesystem_specifying_types.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/typesystem_specifying_types.rst b/doc/typesystem_specifying_types.rst index 68b85f5f9..66536cf71 100644 --- a/doc/typesystem_specifying_types.rst +++ b/doc/typesystem_specifying_types.rst @@ -77,6 +77,7 @@ primitive-type @@ -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: -- cgit v1.2.3