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

language/duchain

KDevelop::SpecializationStore

KDevelop::SpecializationStore Class Reference

This class allows dynamic management of "current" specializations for declarations. More...

#include <specializationstore.h>

List of all members.

Public Member Functions

DUContext * applySpecialization (KDevelop::DUContext *context, KDevelop::TopDUContext *source, bool recursive=true)
KDevelop::Declaration * applySpecialization (KDevelop::Declaration *declaration, KDevelop::TopDUContext *source, bool recursive=true)
void clear ()
void clear (DeclarationId declaration)
IndexedInstantiationInformation get (DeclarationId declaration)
void set (DeclarationId declaration, IndexedInstantiationInformation specialization)

Static Public Member Functions

static SpecializationStore & self ()

Detailed Description

This class allows dynamic management of "current" specializations for declarations.

The specializations will be applied in editors, and wherever it makes sense. For example, this is used in C++ to get code-completion and use-building within instantiated template-classes/functions.

Definition at line 39 of file specializationstore.h.


Member Function Documentation

DUContext * KDevelop::SpecializationStore::applySpecialization ( KDevelop::DUContext *  context,
KDevelop::TopDUContext *  source,
bool  recursive = true 
)

Applies the known specializations for the given context using the DUContext::specialize() function.

If no specializations are known, returns the original context.

Parameters:
context The context to specialize
source The top-context from where to start searching
recursive Whether parent-contexts should be checked for known specializations, and those applied. This is a bit more expensive then just doing a local check.

Definition at line 88 of file specializationstore.cpp.

Declaration * KDevelop::SpecializationStore::applySpecialization ( KDevelop::Declaration *  declaration,
KDevelop::TopDUContext *  source,
bool  recursive = true 
)

Applies the known specializations for the given declaration using the Declaration::specialize() function.

If no specializations are known, the original declaration is returned.

Parameters:
declaration The declaration to specialize
source The top-context from where to start searching
recursive Whether parent-contexts should be checked for known specializations, and those applied. This is a bit more expensive then just doing a local check.

Definition at line 60 of file specializationstore.cpp.

void KDevelop::SpecializationStore::clear (  ) 

Clears all registered specializations.

Definition at line 56 of file specializationstore.cpp.

void KDevelop::SpecializationStore::clear ( DeclarationId  declaration  ) 

Clears the specialization registered for the given declaration-id.

Definition at line 50 of file specializationstore.cpp.

IndexedInstantiationInformation KDevelop::SpecializationStore::get ( DeclarationId  declaration  ) 

Gets the registered specialization for the given declaration-id, or zero.

Definition at line 42 of file specializationstore.cpp.

void KDevelop::SpecializationStore::set ( DeclarationId  declaration,
IndexedInstantiationInformation  specialization 
)

Adds/updates the current specialization for the given declaration-id.

Definition at line 37 of file specializationstore.cpp.


The documentation for this class was generated from the following files:
  • specializationstore.h
  • specializationstore.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