aboutsummaryrefslogtreecommitdiffstats
path: root/abstractmetalang.h
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-11-24 15:00:11 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-11-24 15:20:30 -0300
commit5c8637fd719e9dfd0415173128d0d8ea916b7d9b (patch)
tree6936d28579d1761a2dde4954734e7f6542547bb2 /abstractmetalang.h
parent139e84644ea0088e16678e8b8c17b9e5b4fd6269 (diff)
Modified the AbstractMetaFunction class to have a separated flag to
indicate that it was added by the user or not, instead of using the AbstractMetaFunction::UserAddedFunction enum value. The old way prevented the function to be an UserAddedFunction and a ConstructorFunction at the same time, since this information was stored as an enum of the AbstractMetaFunction::FunctionType type. A test case was also added. Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Diffstat (limited to 'abstractmetalang.h')
-rw-r--r--abstractmetalang.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/abstractmetalang.h b/abstractmetalang.h
index 7915ea21b..13e3270a5 100644
--- a/abstractmetalang.h
+++ b/abstractmetalang.h
@@ -743,8 +743,7 @@ public:
SignalFunction,
EmptyFunction,
SlotFunction,
- GlobalScopeFunction,
- UserAddedFunction, // Function added by the typesystem
+ GlobalScopeFunction
};
enum CompareResult {
@@ -774,6 +773,7 @@ public:
m_constant(false),
m_invalid(false),
m_reverse(false),
+ m_userAdded(false),
m_explicit(false)
{
}
@@ -1002,6 +1002,16 @@ public:
m_constant = constant;
}
+ /// Returns true if the AbstractMetaFunction was added by the user via the type system description.
+ bool isUserAdded() const
+ {
+ return m_userAdded;
+ }
+ void setUserAdded(bool userAdded)
+ {
+ m_userAdded = userAdded;
+ }
+
QString toString() const
{
return m_name;
@@ -1100,6 +1110,7 @@ private:
uint m_constant : 1;
uint m_invalid : 1;
uint m_reverse : 1;
+ uint m_userAdded : 1;
uint m_explicit : 1;
};