summaryrefslogtreecommitdiffstats
path: root/lib/interfaces/kdevcoderepository.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2014-05-25 15:37:31 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2014-05-25 15:37:31 +0900
commit6392f5a9dfce2bf83617d49bb7f332181ec6004e (patch)
treeab69e390f7962b7e7dda1a3a64f035c61c751cf4 /lib/interfaces/kdevcoderepository.h
parentaba2788b428dc53243407902e9ccbb20b97a69fd (diff)
downloadtdevelop-6392f5a9dfce2bf83617d49bb7f332181ec6004e.tar.gz
tdevelop-6392f5a9dfce2bf83617d49bb7f332181ec6004e.zip
Revert "Finish renaming tdevelop components"
This reverts commit 722ce1efbac31c61b1d4b13f7e075c9f311e3e73.
Diffstat (limited to 'lib/interfaces/kdevcoderepository.h')
-rw-r--r--lib/interfaces/kdevcoderepository.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/lib/interfaces/kdevcoderepository.h b/lib/interfaces/kdevcoderepository.h
new file mode 100644
index 00000000..4e1dd765
--- /dev/null
+++ b/lib/interfaces/kdevcoderepository.h
@@ -0,0 +1,95 @@
+/* This file is part of the KDE project
+ Copyright (C) 2003 Roberto Raggi <roberto@kdevelop.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+#ifndef KDEVCODEREPOSITORY_H
+#define KDEVCODEREPOSITORY_H
+
+#include <tqobject.h>
+#include <tqvaluelist.h>
+
+/**
+@file kdevcoderepository.h
+Code repository - the persistent symbol store accessor.
+*/
+
+class KDevCodeRepositoryData;
+class Catalog;
+
+/**
+Code repository - the persistent symbol store accessor.
+Symbols from parsed files can be saved to the persistent symbol store.
+Persistence in this case means that symbol database is never loaded into memory
+and works like a usual database which executes queries.
+
+Code repository consists from @ref Catalog objects that represent separate symbol
+databases. Catalogs can be created/loaded/unloaded dynamically.
+To find a symbol in the repository each catalog should be queried.
+
+Persistent symbol store is useful to keep information about code that
+never or rarely changes. System libraries are perfect examples of such code.
+Symbols from code contained in project files are better stored in memory
+symbol store like @ref CodeModel.
+*/
+class KDevCodeRepository : public TQObject
+{
+ Q_OBJECT
+
+public:
+ /**Constructor.*/
+ KDevCodeRepository();
+ /**Destructor.*/
+ virtual ~KDevCodeRepository();
+
+ /**@return The main catalog. Each catalog can be marked is main
+ to provide easy access to it.*/
+ Catalog* mainCatalog();
+ /**Sets the main catalog.
+ @param mainCatalog The catalog to be marked as main.*/
+ void setMainCatalog( Catalog* mainCatalog );
+
+ /**@return The list of registered catalogs.*/
+ TQValueList<Catalog*> registeredCatalogs();
+
+ /**Registers catalog in the repository.
+ @param catalog The catalog to register.*/
+ void registerCatalog( Catalog* catalog );
+ /**Unregisters catalog from the repository.
+ @param catalog The catalog to unregister.*/
+ void unregisterCatalog( Catalog* catalog );
+ /**Marks catalog as changed and emits @ref catalogChanged signal.
+ @param catalog The catalog to touch.*/
+ void touchCatalog( Catalog* catalog );
+
+signals:
+ /**Emitted when a new catalog is registered.
+ @param catalog The new catalog.*/
+ void catalogRegistered( Catalog* catalog );
+
+ /**Emitted when a catalog in removed
+ @param catalog The catalog that was removed.*/
+ void catalogUnregistered( Catalog* catalog );
+
+ /**Emitted when the contens of catalog is changed.
+ @param catalog Changed catalog.*/
+ void catalogChanged( Catalog* catalog );
+
+private:
+ KDevCodeRepositoryData* d;
+};
+
+#endif