• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

language/duchain

KDevelop::TopDUContextDynamicData

KDevelop::TopDUContextDynamicData Class Reference

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

#include <topducontextdynamicdata.h>

List of all members.

Public Member Functions

 TopDUContextDynamicData (TopDUContext *topContext)
uint allocateContextIndex (DUContext *ctx, bool temporary)
uint allocateDeclarationIndex (Declaration *decl, bool temporary)
void clearContextIndex (DUContext *ctx)
void clearContextsAndDeclartions ()
void clearDeclarationIndex (Declaration *decl)
void deleteOnDisk ()
DUContext * getContextForIndex (uint index) const
Declaration * getDeclarationForIndex (uint index) const
bool isContextForIndexLoaded (uint index) const
bool isDeclarationForIndexLoaded (uint index) const
bool isOnDisk () const
bool isTemporaryContextIndex (uint index) const
bool isTemporaryDeclarationIndex (uint index) const
void store ()

Static Public Member Functions

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 41 of file topducontextdynamicdata.h.


Member Function Documentation

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:
anonymous whether 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 683 of file topducontextdynamicdata.cpp.

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:
anonymous whether 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 575 of file topducontextdynamicdata.cpp.

void TopDUContextDynamicData::deleteOnDisk (  ) 

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

Definition at line 357 of file topducontextdynamicdata.cpp.

bool TopDUContextDynamicData::isOnDisk (  )  const

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

Definition at line 353 of file topducontextdynamicdata.cpp.

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.

Todo:
Load the language if it isn't loaded yet, problem: We're possibly not in the foreground thread!

Definition at line 301 of file topducontextdynamicdata.cpp.

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 172 of file topducontextdynamicdata.cpp.

IndexedString TopDUContextDynamicData::loadUrl ( uint  topContextIndex  )  [static]

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

Definition at line 214 of file topducontextdynamicdata.cpp.

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 388 of file topducontextdynamicdata.cpp.


The documentation for this class was generated from the following files:
  • topducontextdynamicdata.h
  • topducontextdynamicdata.cpp

language/duchain

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

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal