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

language/duchain

duchainutils.h

00001 /*
00002  * DUChain Utilities
00003  *
00004  * Copyright 2007 Hamish Rodda <rodda@kde.org>
00005  * Copyright 2007-2009 David Nolden <david.nolden.kdevelop@art-master.de>
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU Library General Public License as
00009  * published by the Free Software Foundation; either version 2 of the
00010  * License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public
00018  * License along with this program; if not, write to the
00019  * Free Software Foundation, Inc.,
00020  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00021  */
00022 
00023 #ifndef DUCHAINUTILS_H
00024 #define DUCHAINUTILS_H
00025 
00026 #include <KDE/KIcon>
00027 
00028 #include <ktexteditor/codecompletionmodel.h>
00029 
00030 #include "../languageexport.h"
00031 
00032 class KUrl;
00033 
00034 namespace KDevelop {
00035 
00036 class Declaration;
00037 class DUChainBase;
00038 class DUContext;
00039 class SimpleCursor;
00040 class HashedString;
00041 class TopDUContext;
00042 class IndexedDUContext;
00043 class IndexedDeclaration;
00044 
00048 namespace DUChainUtils {
00049   KDEVPLATFORMLANGUAGE_EXPORT KTextEditor::CodeCompletionModel::CompletionProperties completionProperties(const Declaration* dec);
00050   KDEVPLATFORMLANGUAGE_EXPORT QIcon iconForProperties(KTextEditor::CodeCompletionModel::CompletionProperties p);
00051   KDEVPLATFORMLANGUAGE_EXPORT QIcon iconForDeclaration(const Declaration* dec);
00054   KDEVPLATFORMLANGUAGE_EXPORT KDevelop::TopDUContext* standardContextForUrl(const KUrl& url);
00057   KDEVPLATFORMLANGUAGE_EXPORT Declaration* itemUnderCursor(const KUrl& url, const SimpleCursor& cursor);
00060   KDEVPLATFORMLANGUAGE_EXPORT Declaration* declarationForDefinition(Declaration* definition, TopDUContext* topContext = 0);
00062   KDEVPLATFORMLANGUAGE_EXPORT Declaration* declarationInLine(const KDevelop::SimpleCursor& cursor, KDevelop::DUContext* ctx);
00063 
00064   class KDEVPLATFORMLANGUAGE_EXPORT DUChainItemFilter {
00065     public:
00066     virtual bool accept(Declaration* decl) = 0;
00067     //Should return whether processing should be deepened into the given context
00068     virtual bool accept(DUContext* ctx) = 0;
00069     virtual ~DUChainItemFilter();
00070   };
00073   KDEVPLATFORMLANGUAGE_EXPORT void collectItems( DUContext* context, DUChainItemFilter& filter );
00074 
00075   KDEVPLATFORMLANGUAGE_EXPORT DUContext* getArgumentContext(Declaration* decl);
00076 
00079   KDEVPLATFORMLANGUAGE_EXPORT QList<IndexedDeclaration> collectAllVersions(Declaration* decl);
00080 
00086   KDEVPLATFORMLANGUAGE_EXPORT QList<Declaration*> getInheriters(const Declaration* decl, uint& maxAllowedSteps, bool collectVersions = true);
00087 
00090   KDEVPLATFORMLANGUAGE_EXPORT QList<Declaration*> getOverriders(const Declaration* currentClass, const Declaration* overriddenDeclaration, uint& maxAllowedSteps);
00091 
00093   KDEVPLATFORMLANGUAGE_EXPORT bool contextHasUse(DUContext* context, Declaration* declaration);
00094 
00096   KDEVPLATFORMLANGUAGE_EXPORT uint contextCountUses(DUContext* context, Declaration* declaration);
00097 
00099   KDEVPLATFORMLANGUAGE_EXPORT Declaration* getOverridden(const Declaration* decl);
00100   
00103   KDEVPLATFORMLANGUAGE_EXPORT DUContext* getFunctionContext(Declaration* decl);
00104 }
00105 }
00106 
00107 #endif // DUCHAINUTILS_H

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