aboutsummaryrefslogtreecommitdiffstats
path: root/typesystem.h
diff options
context:
space:
mode:
Diffstat (limited to 'typesystem.h')
-rw-r--r--typesystem.h18
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;