• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/serialization

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • serialization
itemrepositoryregistry.h
Go to the documentation of this file.
1 /*
2  Copyright 2008 David Nolden <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17  */
18 
19 #ifndef ITEMREPOSITORYREGISTRY_H
20 #define ITEMREPOSITORYREGISTRY_H
21 
22 #include "serializationexport.h"
23 
24 #include <QScopedPointer>
25 
26 class QString;
27 class QMutex;
28 class QAtomicInt;
29 
30 namespace KDevelop {
31 class ISession;
32 class AbstractRepositoryManager;
33 class AbstractItemRepository;
34 class ItemRepositoryRegistryPrivate;
35 
41 class KDEVPLATFORMSERIALIZATION_EXPORT ItemRepositoryRegistry
42 {
43 public:
44  ~ItemRepositoryRegistry();
45 
49  static void initialize(const QString& repositoryPath);
50 
52  static ItemRepositoryRegistry* self();
53 
55  static void deleteRepositoryFromDisk(const QString& repositoryPath);
56 
59  void registerRepository(AbstractItemRepository* repository, AbstractRepositoryManager* manager);
60 
63  void unRegisterRepository(AbstractItemRepository* repository);
64 
66  QString path() const;
67 
70  void store();
71 
74  void shutdown();
75 
78  int finalCleanup();
79 
81  void printAllStatistics() const;
82 
85  void lockForWriting();
86 
88  void unlockForWriting();
89 
94  QAtomicInt& customCounter(const QString& identity, int initialValue);
95 
98  QMutex& mutex();
99 
100 private:
101  explicit ItemRepositoryRegistry(const QString& repositoryPath);
102 
103  const QScopedPointer<class ItemRepositoryRegistryPrivate> d_ptr;
104  Q_DECLARE_PRIVATE(ItemRepositoryRegistry)
105 
106  static ItemRepositoryRegistry* m_self;
107 };
108 
110 KDEVPLATFORMSERIALIZATION_EXPORT ItemRepositoryRegistry& globalItemRepositoryRegistry();
111 }
112 
113 #endif // ITEMREPOSITORYREGISTRY_H
QMutex
QString
KDevelop::globalItemRepositoryRegistry
ItemRepositoryRegistry & globalItemRepositoryRegistry()
The global item-repository registry that is used by default.
Definition: itemrepositoryregistry.cpp:206
QScopedPointer< class ItemRepositoryRegistryPrivate >
KDevelop::AbstractRepositoryManager
Internal helper class that wraps around a repository object and manages its lifetime.
Definition: abstractitemrepository.h:51
QAtomicInt
KDevelop::AbstractItemRepository
The interface class for an item-repository object.
Definition: abstractitemrepository.h:33
KDevelop
Definition: abstractitemrepository.cpp:23
KDevelop::ItemRepositoryRegistry
Manages a set of item-repositories and allows loading/storing them all at once from/to disk.
Definition: itemrepositoryregistry.h:41
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Apr 14 2021 23:31:01 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/serialization

Skip menu "kdevplatform/serialization"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal