You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
3.2 KiB
96 lines
3.2 KiB
15 years ago
|
/* This file is part of the KDE project
|
||
11 years ago
|
Copyright (C) 2003 Roberto Raggi <roberto@kdevelop.org>
|
||
15 years ago
|
|
||
|
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
|
||
15 years ago
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
15 years ago
|
*/
|
||
11 years ago
|
#ifndef TDEVCODEREPOSITORY_H
|
||
|
#define TDEVCODEREPOSITORY_H
|
||
15 years ago
|
|
||
15 years ago
|
#include <tqobject.h>
|
||
|
#include <tqvaluelist.h>
|
||
15 years ago
|
|
||
|
/**
|
||
11 years ago
|
@file tdevcoderepository.h
|
||
15 years ago
|
Code repository - the persistent symbol store accessor.
|
||
|
*/
|
||
|
|
||
11 years ago
|
class TDevCodeRepositoryData;
|
||
15 years ago
|
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.
|
||
|
*/
|
||
11 years ago
|
class TDevCodeRepository : public TQObject
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
public:
|
||
|
/**Constructor.*/
|
||
11 years ago
|
TDevCodeRepository();
|
||
15 years ago
|
/**Destructor.*/
|
||
11 years ago
|
virtual ~TDevCodeRepository();
|
||
15 years ago
|
|
||
|
/**@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.*/
|
||
15 years ago
|
TQValueList<Catalog*> registeredCatalogs();
|
||
15 years ago
|
|
||
|
/**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:
|
||
11 years ago
|
TDevCodeRepositoryData* d;
|
||
15 years ago
|
};
|
||
|
|
||
|
#endif
|