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

Nepomuk-Core

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk-core
  • rcgen
resourceclass.h
Go to the documentation of this file.
1 /*
2  *
3  * $Id: sourceheader 511311 2006-02-19 14:51:05Z trueg $
4  *
5  * This file is part of the Nepomuk KDE project.
6  * Copyright (C) 2006-2007 Sebastian Trueg <trueg@kde.org>
7  *
8  * This library is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  * See the file "COPYING.LIB" for the exact licensing terms.
13  */
14 
15 #ifndef _NEPOMUK_RESOURCE_CLASS_H_
16 #define _NEPOMUK_RESOURCE_CLASS_H_
17 
18 #include <QtCore/QString>
19 #include <QtCore/QList>
20 #include <QtCore/QUrl>
21 
22 #include "property.h"
23 
30 class ResourceClass
31 {
32  public:
33  ResourceClass();
34  ResourceClass( const QUrl& uri );
35  ~ResourceClass();
36 
40  void setUri( const QUrl &uri );
41 
45  QUrl uri() const;
46 
50  void setComment( const QString &comment );
51 
55  QString comment() const;
56 
60  void setParentResource( ResourceClass* parent );
61 
65  ResourceClass* parentClass( bool considerGenerateClass = true ) const;
66 
70  void addParentResource( ResourceClass* parent );
71 
75  QList<ResourceClass*> allParentResources() const;
76 
80  void addProperty( Property* property );
81 
85  Property::ConstPtrList allProperties() const;
86 
90  void addReverseProperty( Property* property );
91 
95  Property::ConstPtrList allReverseProperties() const;
96 
100  void setGenerateClass( bool generate );
101 
107  bool generateClass() const;
108 
114  QString name( const QString &nameSpace = QString() ) const;
115 
119  QString headerName() const;
120 
124  QString sourceName() const;
125 
126  private:
127  QUrl m_uri;
128  QString m_comment;
129  ResourceClass* m_parentClass;
130  QList<ResourceClass*> m_allParentResources;
131  Property::ConstPtrList m_properties;
132  Property::ConstPtrList m_reverseProperties;
133  bool m_generateClass;
134 };
135 
136 #endif
ResourceClass::addProperty
void addProperty(Property *property)
Adds a new property to the resource.
Definition: resourceclass.cpp:92
ResourceClass::setUri
void setUri(const QUrl &uri)
Sets the uri of the resource.
Definition: resourceclass.cpp:38
ResourceClass::ResourceClass
ResourceClass()
Definition: resourceclass.cpp:21
ResourceClass::~ResourceClass
~ResourceClass()
Definition: resourceclass.cpp:34
ResourceClass::uri
QUrl uri() const
Returns the uri of the resource.
Definition: resourceclass.cpp:43
ResourceClass::generateClass
bool generateClass() const
Returns true if this class should be generated.
Definition: resourceclass.cpp:117
ResourceClass::parentClass
ResourceClass * parentClass(bool considerGenerateClass=true) const
Returns the parent resource of the resource.
Definition: resourceclass.cpp:63
ResourceClass::allProperties
Property::ConstPtrList allProperties() const
Returns the list of all properties of the resource.
Definition: resourceclass.cpp:97
Property::ConstPtrList
QList< const Property * > ConstPtrList
Definition: rcgen/property.h:32
ResourceClass
Represents a resource.
Definition: resourceclass.h:30
ResourceClass::comment
QString comment() const
Returns the comment of the resource.
Definition: resourceclass.cpp:53
ResourceClass::allReverseProperties
Property::ConstPtrList allReverseProperties() const
Returns the list of all reverse properties of the resource.
Definition: resourceclass.cpp:107
ResourceClass::setGenerateClass
void setGenerateClass(bool generate)
Sets whether code for this class shall be generated.
Definition: resourceclass.cpp:112
ResourceClass::sourceName
QString sourceName() const
Returns the name of the source file for this resource.
Definition: resourceclass.cpp:135
ResourceClass::setComment
void setComment(const QString &comment)
Sets the comment of the resource.
Definition: resourceclass.cpp:48
ResourceClass::addReverseProperty
void addReverseProperty(Property *property)
Adds a reverse property to the resource.
Definition: resourceclass.cpp:102
Property
Represents the property of a resource.
Definition: rcgen/property.h:29
ResourceClass::setParentResource
void setParentResource(ResourceClass *parent)
Sets the parent resource of the resource.
Definition: resourceclass.cpp:58
ResourceClass::name
QString name(const QString &nameSpace=QString()) const
Returns the name of the resource.
Definition: resourceclass.cpp:122
ResourceClass::headerName
QString headerName() const
Returns the name of the header file for this resource.
Definition: resourceclass.cpp:130
property.h
ResourceClass::addParentResource
void addParentResource(ResourceClass *parent)
Adds a parent resource to the resource.
Definition: resourceclass.cpp:82
ResourceClass::allParentResources
QList< ResourceClass * > allParentResources() const
Returns all parent resource of the resource.
Definition: resourceclass.cpp:87
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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