From fc57e7dd0846f28c319db3bc5c902b3055042fc7 Mon Sep 17 00:00:00 2001 From: renatofilho Date: Fri, 1 Oct 2010 16:45:58 -0300 Subject: Implement support to target conversion. Reviewer: Marcelo Lira Luciano Wolf --- typesystem.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'typesystem.h') 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; -- cgit v1.2.3