diff options
author | renatofilho <renato.filho@openbossa.org> | 2010-10-01 16:45:58 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-09 19:10:11 -0300 |
commit | fc57e7dd0846f28c319db3bc5c902b3055042fc7 (patch) | |
tree | a37a6885b339a4ada2cc92224af0982c67287853 /typesystem.h | |
parent | 35c500c84b6be8f400f8cd1029c528172bca49c7 (diff) |
Implement support to target conversion.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'typesystem.h')
-rw-r--r-- | typesystem.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/typesystem.h b/typesystem.h index 682f068e3..62d041892 100644 --- a/typesystem.h +++ b/typesystem.h @@ -32,6 +32,10 @@ #include "apiextractormacros.h" #include "include.h" +//Used to identify the conversion rule to avoid break API +#define TARGET_CONVERSION_RULE_FLAG "0" +#define NATIVE_CONVERSION_RULE_FLAG "1" + class Indentor; class AbstractMetaType; @@ -913,6 +917,7 @@ public: m_include = inc; } + // Replace conversionRule arg to CodeSnip in future version /// Set the type convertion rule void setConversionRule(const QString& conversionRule) { @@ -922,7 +927,8 @@ public: /// Returns the type convertion rule QString conversionRule() const { - return m_conversionRule; + //skip conversions flag + return m_conversionRule.mid(1); } /// Returns true if there are any conversiton rule for this type, false otherwise. @@ -936,6 +942,16 @@ public: return m_version; } + bool hasNativeConversionRule() const + { + return m_conversionRule.startsWith(NATIVE_CONVERSION_RULE_FLAG); + } + + bool hasTargetConversionRule() const + { + return m_conversionRule.startsWith(TARGET_CONVERSION_RULE_FLAG); + } + private: QString m_name; |