kdevplatform/serialization
Classes | |
class | AbstractItemRepository |
class | AbstractRepositoryManager |
class | Bucket |
class | DUChainReferenceCounting |
class | DUChainReferenceCountingEnabler |
class | DynamicItem |
class | ExampleItem |
class | ExampleItemRequest |
class | IndexedString |
class | ItemRepository |
class | ItemRepositoryRegistry |
struct | Locker |
struct | Locker< true > |
struct | OptionalDUChainReferenceCountingEnabler |
struct | OptionalDUChainReferenceCountingEnabler< true > |
struct | ReferenceCountManager |
struct | RepositoryManager |
Enumerations | |
enum | { ItemRepositoryBucketSize = 1 << 16, ItemRepositoryBucketLimit = 1 << 16 } |
Functions | |
void | disableDUChainReferenceCounting (const void *start, unsigned size) |
void | enableDUChainReferenceCounting (const void *start, unsigned size) |
ItemRepositoryRegistry & | globalItemRepositoryRegistry () |
void | initReferenceCounting () |
uint | qHash (const KDevelop::IndexedString &str) |
bool | shouldDoDUChainReferenceCounting (const void *item) noexcept |
uint | staticItemRepositoryVersion () |
Enumeration Type Documentation
◆ anonymous enum
anonymous enum |
This file implements a generic bucket-based indexing repository, that can be used for example to index strings.
All you need to do is define your item type that you want to store into the repository, and create a request item similar to ExampleItemRequest that compares and fills the defined item type.
For example the string repository uses "unsigned short" as item-type, uses that actual value to store the length of the string, and uses the space behind to store the actual string content.
- See also
- AbstractItemRepository
- ItemRepository
- ExampleItem
- ExampleItemRequest
- typerepository.h
- stringrepository.h
- indexedstring.h
Enumerator | |
---|---|
ItemRepositoryBucketSize | |
ItemRepositoryBucketLimit |
Definition at line 96 of file itemrepository.h.
Function Documentation
◆ disableDUChainReferenceCounting()
KDEVPLATFORMSERIALIZATION_EXPORT void KDevelop::disableDUChainReferenceCounting | ( | const void * | start, |
unsigned | size | ||
) |
Must be called as often as enableDUChainReferenceCounting, with the same ranges Must never be called for the same range twice, and not for overlapping ranges.
- Parameters
-
start Position where the reference-counting was started size Size of the area where the reference-counting was started in bytes
Definition at line 87 of file referencecounting.cpp.
◆ enableDUChainReferenceCounting()
KDEVPLATFORMSERIALIZATION_EXPORT void KDevelop::enableDUChainReferenceCounting | ( | const void * | start, |
unsigned | size | ||
) |
Enable reference-counting for the given range You should only enable the reference-counting for the time it's really needed, and it always has to be enabled too when the items are deleted again, else it will lead to inconsistencies in the repository.
- Warning
- If you are not working on the duchain internal storage mechanism, you should not care about this stuff at all.
- Parameters
-
start Position where to start the reference-counting size Size of the area in bytes
Definition at line 82 of file referencecounting.cpp.
◆ globalItemRepositoryRegistry()
KDEVPLATFORMSERIALIZATION_EXPORT ItemRepositoryRegistry & KDevelop::globalItemRepositoryRegistry | ( | ) |
The global item-repository registry that is used by default.
- Returns
- The global item-repository registry (now it is ItemRepositoryRegistry::self()).
Definition at line 206 of file itemrepositoryregistry.cpp.
◆ initReferenceCounting()
KDEVPLATFORMSERIALIZATION_EXPORT void KDevelop::initReferenceCounting | ( | ) |
Definition at line 229 of file referencecounting.cpp.
◆ qHash()
|
inline |
Definition at line 252 of file indexedstring.h.
◆ shouldDoDUChainReferenceCounting()
|
inlinenoexcept |
This is used by indexed items to decide whether they should do reference-counting.
Definition at line 102 of file referencecounting.h.
◆ staticItemRepositoryVersion()
KDEVPLATFORMSERIALIZATION_EXPORT uint KDevelop::staticItemRepositoryVersion | ( | ) |
Returns a version-number that is used to reset the item-repository after incompatible layout changes.
Definition at line 24 of file abstractitemrepository.cpp.
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.