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

kdevplatform/language/duchain

  • KDevelop
  • TopDUContextDynamicData
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
KDevelop::TopDUContextDynamicData Class Reference

#include <topducontextdynamicdata.h>

Classes

struct  ArrayWithPosition
 
struct  ItemDataInfo
 

Public Member Functions

 TopDUContextDynamicData (TopDUContext *topContext)
 
 ~TopDUContextDynamicData ()
 
uint allocateContextIndex (DUContext *ctx, bool temporary)
 
uint allocateDeclarationIndex (Declaration *decl, bool temporary)
 
uint allocateProblemIndex (const ProblemPointer &problem)
 
void clear ()
 
void clearContextIndex (DUContext *ctx)
 
void clearDeclarationIndex (Declaration *decl)
 
void clearProblems ()
 
DUContext * contextForIndex (uint index) const
 
Declaration * declarationForIndex (uint index) const
 
void deleteOnDisk ()
 
bool isContextForIndexLoaded (uint index) const
 
bool isDeclarationForIndexLoaded (uint index) const
 
bool isOnDisk () const
 
bool isTemporaryContextIndex (uint index) const
 
bool isTemporaryDeclarationIndex (uint index) const
 
ProblemPointer problemForIndex (uint index) const
 
void store ()
 

Static Public Member Functions

static bool fileExists (uint topContextIndex)
 
static TopDUContext * load (uint topContextIndex)
 
static QList< IndexedDUContext > loadImporters (uint topContextIndex)
 
static QList< IndexedDUContext > loadImports (uint topContextIndex)
 
static IndexedString loadUrl (uint topContextIndex)
 

Public Attributes

bool m_deleting
 

Detailed Description

This class contains dynamic data of a top-context, and also the repository that contains all the data within this top-context.

Definition at line 37 of file topducontextdynamicdata.h.

Constructor & Destructor Documentation

◆ TopDUContextDynamicData()

TopDUContextDynamicData::TopDUContextDynamicData ( TopDUContext *  topContext)
explicit

Definition at line 473 of file topducontextdynamicdata.cpp.

◆ ~TopDUContextDynamicData()

TopDUContextDynamicData::~TopDUContextDynamicData ( )

Definition at line 495 of file topducontextdynamicdata.cpp.

Member Function Documentation

◆ allocateContextIndex()

uint TopDUContextDynamicData::allocateContextIndex ( DUContext *  ctx,
bool  temporary 
)

Allocates an index for the given context in this top-context.

The returned index is never zero.

Parameters
temporarywhether the context is temporary. If it is, it will be stored separately, not stored to disk, and a duchain write-lock is not needed. Else, you need a write-lock when calling this.

Definition at line 806 of file topducontextdynamicdata.cpp.

◆ allocateDeclarationIndex()

uint TopDUContextDynamicData::allocateDeclarationIndex ( Declaration *  decl,
bool  temporary 
)

Allocates an index for the given declaration in this top-context.

The returned index is never zero.

Parameters
temporarywhether the declaration is temporary. If it is, it will be stored separately, not stored to disk, and a duchain write-lock is not needed. Else, you need a write-lock when calling this.

Definition at line 801 of file topducontextdynamicdata.cpp.

◆ allocateProblemIndex()

uint TopDUContextDynamicData::allocateProblemIndex ( const ProblemPointer &  problem)

Allocates an index for the given problem in this top-context.

The returned index is never zero.

Definition at line 811 of file topducontextdynamicdata.cpp.

◆ clear()

void KDevelop::TopDUContextDynamicData::clear ( )

Definition at line 488 of file topducontextdynamicdata.cpp.

◆ clearContextIndex()

void TopDUContextDynamicData::clearContextIndex ( DUContext *  ctx)

Definition at line 869 of file topducontextdynamicdata.cpp.

◆ clearDeclarationIndex()

void TopDUContextDynamicData::clearDeclarationIndex ( Declaration *  decl)

Definition at line 864 of file topducontextdynamicdata.cpp.

◆ clearProblems()

void TopDUContextDynamicData::clearProblems ( )

Definition at line 874 of file topducontextdynamicdata.cpp.

◆ contextForIndex()

DUContext * TopDUContextDynamicData::contextForIndex ( uint  index) const

Definition at line 836 of file topducontextdynamicdata.cpp.

◆ declarationForIndex()

Declaration * TopDUContextDynamicData::declarationForIndex ( uint  index) const

Definition at line 848 of file topducontextdynamicdata.cpp.

◆ deleteOnDisk()

void TopDUContextDynamicData::deleteOnDisk ( )

Stores all remnants of this top-context that are on disk. The top-context will be fully dynamic after this.

Definition at line 634 of file topducontextdynamicdata.cpp.

◆ fileExists()

bool TopDUContextDynamicData::fileExists ( uint  topContextIndex)
static

Definition at line 508 of file topducontextdynamicdata.cpp.

◆ isContextForIndexLoaded()

bool TopDUContextDynamicData::isContextForIndexLoaded ( uint  index) const

Definition at line 821 of file topducontextdynamicdata.cpp.

◆ isDeclarationForIndexLoaded()

bool TopDUContextDynamicData::isDeclarationForIndexLoaded ( uint  index) const

Definition at line 816 of file topducontextdynamicdata.cpp.

◆ isOnDisk()

bool TopDUContextDynamicData::isOnDisk ( ) const

Whether this top-context is on disk(Either has been loaded, or has been stored)

Definition at line 629 of file topducontextdynamicdata.cpp.

◆ isTemporaryContextIndex()

bool TopDUContextDynamicData::isTemporaryContextIndex ( uint  index) const

Definition at line 826 of file topducontextdynamicdata.cpp.

◆ isTemporaryDeclarationIndex()

bool TopDUContextDynamicData::isTemporaryDeclarationIndex ( uint  index) const

Definition at line 831 of file topducontextdynamicdata.cpp.

◆ load()

TopDUContext * TopDUContextDynamicData::load ( uint  topContextIndex)
static

Loads the top-context from disk, or returns zero on failure.

The top-context will not be registered anywhere, and will have no ParsingEnvironmentFile assigned. Also loads all imported contexts. The Declarations/Contexts will be correctly initialized, and put into the symbol tables if needed.

Definition at line 594 of file topducontextdynamicdata.cpp.

◆ loadImporters()

QList< IndexedDUContext > TopDUContextDynamicData::loadImporters ( uint  topContextIndex)
static

Loads only the list of importers out of the data stored on disk for the top-context.

Definition at line 513 of file topducontextdynamicdata.cpp.

◆ loadImports()

QList< IndexedDUContext > TopDUContextDynamicData::loadImports ( uint  topContextIndex)
static

Definition at line 524 of file topducontextdynamicdata.cpp.

◆ loadUrl()

IndexedString TopDUContextDynamicData::loadUrl ( uint  topContextIndex)
static

Loads only the url out of the data stored on disk for the top-context.

Definition at line 535 of file topducontextdynamicdata.cpp.

◆ problemForIndex()

ProblemPointer TopDUContextDynamicData::problemForIndex ( uint  index) const

Definition at line 856 of file topducontextdynamicdata.cpp.

◆ store()

void TopDUContextDynamicData::store ( )

Stores this top-context to disk.

Todo:
Save the meta-data into a repository, and only the actual content data into a file. This will make saving+loading more efficient, and will reduce the disk-usage. Then we also won't need to load the data if only the meta-data changed.

If the data is mapped, and we re-write the file, we must make sure that the data is copied out of the map, even if only metadata is changed.

Todo:
If we split up data and metadata, we don't need to do this

Definition at line 669 of file topducontextdynamicdata.cpp.

Member Data Documentation

◆ m_deleting

bool KDevelop::TopDUContextDynamicData::m_deleting

Definition at line 107 of file topducontextdynamicdata.h.


The documentation for this class was generated from the following files:
  • topducontextdynamicdata.h
  • topducontextdynamicdata.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jan 20 2021 23:38:36 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/language/duchain

Skip menu "kdevplatform/language/duchain"
  • 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