39 #ifndef APIDATABASE_H_
40 #define APIDATABASE_H_
42 #include <QtCore/QSet>
43 #include <QtCore/QVector>
44 #include <QtCore/QHash>
45 #include <QtCore/QString>
47 #include <tulip/tulipconf.h>
51 class TLP_PYTHON_SCOPE APIDataBase {
55 QHash<QString, QSet<QString> > _dictContent;
56 QHash<QString, QString> _returnType;
57 QHash<QString, QVector<QVector<QString> > > _paramTypes;
59 static APIDataBase _instance;
63 static APIDataBase *getInstance() {
67 void loadApiFile(
const QString &apiFilePath);
69 void addApiEntry(
const QString &apiEntry);
71 QSet<QString> getTypesList()
const;
72 QSet<QString> getDictContentForType(
const QString &type,
const QString &prefix =
"")
const;
73 QString getReturnTypeForMethodOrFunction(
const QString &funcName)
const;
74 QVector<QVector<QString> > getParamTypesForMethodOrFunction(
const QString &funcName)
const;
75 bool functionExists(
const QString &funcName)
const;
76 QVector<QString> findTypesContainingDictEntry(
const QString &dictEntry)
const;
77 QSet<QString> getAllDictEntriesStartingWithPrefix(
const QString &prefix)
const;
79 bool typeExists(
const QString &type)
const;
80 QString getFullTypeName(
const QString &type)
const;
81 bool dictEntryExists(
const QString &type,
const QString &dictEntry)
const;