aboutsummaryrefslogtreecommitdiffstats
path: root/typesystem.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-04-14 19:32:37 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:09:59 -0300
commit74d3c1bb12280ffb2b810ee4bd1272ba6fb8127f (patch)
treec87daaa1939b537b50ea94c824f620d236717003 /typesystem.h
parent46cd570358601d83be0e23a378fc688d8ed706b6 (diff)
Added the "function" tag to ApiExtractor.
This change the behaviour of ApiExtractor regarding to global functions. All global function you want to be exported to python *need* to be especified in the type system with the function tag, otherwise they wont be exported at all. The syntax for this new tag is: <function signature="..." /> This is just the initial work for this tag, it is missign support for: - Function modifications. - Add a function overload with add-function tag.
Diffstat (limited to 'typesystem.h')
-rw-r--r--typesystem.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/typesystem.h b/typesystem.h
index 1c1c0829..662cb53e 100644
--- a/typesystem.h
+++ b/typesystem.h
@@ -583,7 +583,8 @@ public:
ArrayType,
TypeSystemType,
CustomType,
- TargetLangType
+ TargetLangType,
+ FunctionType
};
enum CodeGeneration {
@@ -1699,6 +1700,32 @@ private:
};
+class APIEXTRACTOR_API FunctionTypeEntry : public TypeEntry
+{
+public:
+ FunctionTypeEntry(const QString& name, const QString& signature)
+ : TypeEntry(name, FunctionType)
+ {
+ addSignature(signature);
+ }
+ void addSignature(const QString& signature)
+ {
+ m_signatures << signature;
+ }
+
+ QStringList signatures()
+ {
+ return m_signatures;
+ }
+
+ inline bool hasSignature(const QString& signature)
+ {
+ return m_signatures.contains(signature);
+ }
+private:
+ QStringList m_signatures;
+};
+
class APIEXTRACTOR_API ObjectTypeEntry : public ComplexTypeEntry
{
public:
@@ -1779,6 +1806,7 @@ public:
inline ObjectTypeEntry *findObjectType(const QString &name);
inline NamespaceTypeEntry *findNamespaceType(const QString &name);
ContainerTypeEntry *findContainerType(const QString &name);
+ FunctionTypeEntry* findFunctionType(const QString& name);
TypeEntry *findType(const QString &name) const
{