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

kdevplatform/language/codegen

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • language
  • codegen
archivetemplateloader.h
Go to the documentation of this file.
1 /* This file is part of KDevelop
2  Copyright 2012 Miha Čančula <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef KDEVPLATFORM_ARCHIVETEMPLATELOADER_H
21 #define KDEVPLATFORM_ARCHIVETEMPLATELOADER_H
22 
23 #include <grantlee/templateloader.h>
24 
25 class KArchiveDirectory;
26 namespace KDevelop {
27 class ArchiveTemplateLocation;
28 class ArchiveTemplateLoaderPrivate;
29 
30 class ArchiveTemplateLoader
31  : public Grantlee::AbstractTemplateLoader
32 {
33 public:
34  static ArchiveTemplateLoader* self();
35  ~ArchiveTemplateLoader() override;
36  bool canLoadTemplate(const QString& name) const override;
37  Grantlee::Template loadByName(const QString& name, const Grantlee::Engine* engine) const override;
38 
39  QPair<QString, QString> getMediaUri(const QString& fileName) const override;
40 
41 protected:
42  friend class ArchiveTemplateLocation;
43  void addLocation(ArchiveTemplateLocation* location);
44  void removeLocation(ArchiveTemplateLocation* location);
45 
46 private:
47  Q_DISABLE_COPY(ArchiveTemplateLoader)
48  ArchiveTemplateLoader();
49 
50  const QScopedPointer<class ArchiveTemplateLoaderPrivate> d_ptr;
51  Q_DECLARE_PRIVATE(ArchiveTemplateLoader)
52 };
53 
60 class ArchiveTemplateLocation
61 {
62 public:
63  explicit ArchiveTemplateLocation(const KArchiveDirectory* directory);
64  ~ArchiveTemplateLocation();
65 
66  bool hasTemplate(const QString& name) const;
67  QString templateContents(const QString& name) const;
68 
69 private:
70  Q_DISABLE_COPY(ArchiveTemplateLocation)
71 
72  const KArchiveDirectory* m_directory;
73 };
74 }
75 
76 #endif // KDEVPLATFORM_ARCHIVETEMPLATELOADER_H
KDevelop::ArchiveTemplateLoader::getMediaUri
QPair< QString, QString > getMediaUri(const QString &fileName) const override
Definition: archivetemplateloader.cpp:83
KDevelop::ArchiveTemplateLoader::removeLocation
void removeLocation(ArchiveTemplateLocation *location)
Definition: archivetemplateloader.cpp:54
KDevelop::ArchiveTemplateLocation::ArchiveTemplateLocation
ArchiveTemplateLocation(const KArchiveDirectory *directory)
Definition: archivetemplateloader.cpp:89
KDevelop::ArchiveTemplateLoader::~ArchiveTemplateLoader
~ArchiveTemplateLoader() override
KDevelop::ArchiveTemplateLocation::hasTemplate
bool hasTemplate(const QString &name) const
Definition: archivetemplateloader.cpp:100
QString
KDevelop::ArchiveTemplateLoader::loadByName
Grantlee::Template loadByName(const QString &name, const Grantlee::Engine *engine) const override
Definition: archivetemplateloader.cpp:70
KDevelop::ArchiveTemplateLoader::addLocation
void addLocation(ArchiveTemplateLocation *location)
Definition: archivetemplateloader.cpp:47
QScopedPointer< class ArchiveTemplateLoaderPrivate >
KDevelop::ArchiveTemplateLoader::canLoadTemplate
bool canLoadTemplate(const QString &name) const override
Definition: archivetemplateloader.cpp:61
KDevelop::ArchiveTemplateLocation::~ArchiveTemplateLocation
~ArchiveTemplateLocation()
Definition: archivetemplateloader.cpp:95
KDevelop
NOTE: changes in this file will quite probably also require changes in codedescriptionmetatype....
Definition: applychangeswidget.cpp:42
KDevelop::ArchiveTemplateLoader
Definition: archivetemplateloader.h:30
QPair
KDevelop::ArchiveTemplateLocation::templateContents
QString templateContents(const QString &name) const
Definition: archivetemplateloader.cpp:105
KDevelop::ArchiveTemplateLocation
RAII class that should be used to add KArchiveDirectory locations to the engine.
Definition: archivetemplateloader.h:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Jan 14 2021 23:34:51 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/language/codegen

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