Nepomuk-Core
safecode.cpp
Go to the documentation of this file.
27 QString SafeCode::propertySetterDeclaration( const Property* property, const ResourceClass* rc, const QString &nameSpace ) const
33 .arg( property->isList() ? (property->name().endsWith('s') ? QLatin1String("es") : QLatin1String("s") ) : QString() )
37 QString SafeCode::propertyGetterDeclaration( const Property* property, const ResourceClass* rc, const QString &nameSpace ) const
44 .arg( property->isList() ? (property->name().endsWith('s') ? QLatin1String("es") : QLatin1String("s") ) : QString() );
47 QString SafeCode::propertyAdderDeclaration( const Property* property, const ResourceClass* rc, const QString &nameSpace ) const
56 QString SafeCode::propertyReversePropertyGetterDeclaration( const Property* property, const ResourceClass* rc, const QString &nameSpace ) const
67 QString SafeCode::resourceAllResourcesDeclaration( const ResourceClass* rc, const QString &nameSpace ) const
75 QString SafeCode::resourcePseudoInheritanceDeclaration( const ResourceClass* baseRc, const ResourceClass* rc, const QString &nameSpace ) const
83 QString SafeCode::propertySetterDefinition( const Property* property, const ResourceClass* rc ) const
87 if( property->hasSimpleType() || property->typeString( true ) == "Resource" || !property->isList() ) {
119 QString SafeCode::propertyGetterDefinition( const Property* property, const ResourceClass* rc ) const
157 QString SafeCode::propertyAdderDefinition( const Property* property, const ResourceClass* rc ) const
183 QString SafeCode::propertyReversePropertyGetterDefinition( const Property* property, const ResourceClass* rc ) const
188 //" return convertResourceList<%2>( manager()->allResourcesWithProperty( QUrl::fromEncoded(\"%1\"), *this ) );\n"
190 " QList<Resource> l = ResourceManager::instance()->allResourcesWithProperty( QUrl::fromEncoded(\"%1\"), *this );\n"
206 //" return Nepomuk2::convertResourceList<%3>( ResourceManager::instance()->allResourcesOfType( QUrl::fromEncoded(\"%2\") ) );\n"
208 " QList<Resource> l = ResourceManager::instance()->allResourcesOfType( QUrl::fromEncoded(\"%2\") );\n"
219 QString SafeCode::resourcePseudoInheritanceDefinition( const ResourceClass* baseRc, const ResourceClass* rc ) const
bool isList() const
Returns whether the property is a list of values.
Definition: rcgen/property.cpp:88
QString propertyAdderDeclaration(const Property *property, const ResourceClass *resourceClass, const QString &nameSpace=QString()) const
Returns the declaration of the property adder method.
Definition: safecode.cpp:47
QString resourceAllResourcesDefinition(const ResourceClass *resourceClass) const
Returns the definition of the resource method that returns all resources.
Definition: safecode.cpp:202
QString propertyReversePropertyGetterDeclaration(const Property *property, const ResourceClass *resourceClass, const QString &nameSpace=QString()) const
Returns the declaration of the property for the reverse property getter method.
Definition: safecode.cpp:56
QString propertyAdderDefinition(const Property *property, const ResourceClass *resourceClass) const
Returns the definition of the property adder method.
Definition: safecode.cpp:157
QString propertySetterDeclaration(const Property *property, const ResourceClass *resourceClass, const QString &nameSpace=QString()) const
Returns the declaration of the property setter method.
Definition: safecode.cpp:27
bool hasSimpleType() const
Returns whether the property is of simple type.
Definition: rcgen/property.cpp:159
QString resourcePseudoInheritanceDefinition(const ResourceClass *resourceBaseClass, const ResourceClass *resourceClass) const
Returns the definition of the resource method that provides pseudo inheritance.
Definition: safecode.cpp:219
QString propertyReversePropertyGetterDefinition(const Property *property, const ResourceClass *resourceClass) const
Returns the definition of the property for the reverse property getter method.
Definition: safecode.cpp:183
QString propertyGetterDefinition(const Property *property, const ResourceClass *resourceClass) const
Returns the definition of the property getter method.
Definition: safecode.cpp:119
QString propertySetterDefinition(const Property *property, const ResourceClass *resourceClass) const
Returns the definition of the property setter method.
Definition: safecode.cpp:83
QString literalTypeConversionMethod() const
Returns the conversion method of the property.
Definition: rcgen/property.cpp:164
ResourceClass * domain(bool onlyReturnGeneratedClass=false) const
Returns the domain resource the property belongs to.
Definition: rcgen/property.cpp:98
QString resourceAllResourcesDeclaration(const ResourceClass *resourceClass, const QString &nameSpace=QString()) const
Returns the declaration of the resource method that returns all resources.
Definition: safecode.cpp:67
QString name(const QString &nameSpace=QString()) const
Returns the name of the resource.
Definition: resourceclass.cpp:122
QString resourcePseudoInheritanceDeclaration(const ResourceClass *resourceBaseClass, const ResourceClass *resourceClass, const QString &nameSpace) const
Returns the declaration of the resource method that provides pseudo inheritance.
Definition: safecode.cpp:75
QString propertyGetterDeclaration(const Property *property, const ResourceClass *resourceClass, const QString &nameSpace=QString()) const
Returns the declaration of the property getter method.
Definition: safecode.cpp:37
QString typeString(bool simple=false, const QString &nameSpace=QString()) const
Retrieve a string representation of the range.
Definition: rcgen/property.cpp:132
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.