summaryrefslogtreecommitdiffstats
path: root/src/api.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /src/api.cpp
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/api.cpp')
-rw-r--r--src/api.cpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/api.cpp b/src/api.cpp
new file mode 100644
index 00000000..8e56da3d
--- /dev/null
+++ b/src/api.cpp
@@ -0,0 +1,60 @@
+#include "core.h"
+#include "codemodel.h"
+#include "partcontroller.h"
+#include "plugincontroller.h"
+#include "toplevel.h"
+#include "api.h"
+
+
+API *API::s_instance = 0;
+
+
+KDevMainWindow *API::mainWindow() const
+{
+ return TopLevel::getInstance();
+}
+
+KDevPartController *API::partController() const
+{
+ return PartController::getInstance();
+}
+
+
+KDevCore *API::core() const
+{
+ return Core::getInstance();
+}
+
+
+CodeModel *API::codeModel() const
+{
+ return m_classStore;
+}
+
+
+API *API::getInstance()
+{
+ if (!s_instance)
+ s_instance = new API;
+ return s_instance;
+}
+
+
+API::API()
+ : KDevApi()
+{
+ m_classStore = new CodeModel();
+}
+
+
+API::~API()
+{
+ delete( m_classStore );
+ m_classStore = 0;
+}
+
+KDevPluginController * API::pluginController() const
+{
+ return PluginController::getInstance();
+}
+