aboutsummaryrefslogtreecommitdiffstats
path: root/typesystem.h
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 /typesystem.h
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 'typesystem.h')
-rw-r--r--typesystem.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/typesystem.h b/typesystem.h
index b609950b7..23b9d24cc 100644
--- a/typesystem.h
+++ b/typesystem.h
@@ -1054,6 +1054,19 @@ public:
m_targetLangApiName = targetLangApiName;
}
+ QString defaultConstructor() const
+ {
+ return m_defaultConstructor;
+ }
+ void setDefaultConstructor(const QString& defaultConstructor)
+ {
+ m_defaultConstructor = defaultConstructor;
+ }
+ bool hasDefaultConstructor() const
+ {
+ return !m_defaultConstructor.isEmpty();
+ }
+
/**
* The PrimitiveTypeEntry pointed by this type entry if it
* represents an alias (i.e. a typedef).
@@ -1100,6 +1113,7 @@ public:
private:
QString m_targetLangName;
QString m_targetLangApiName;
+ QString m_defaultConstructor;
uint m_preferredConversion : 1;
uint m_preferredTargetLangType : 1;
PrimitiveTypeEntry* m_aliasedTypeEntry;