Translations:Projects/Nepomuk/Resources/39/en
<syntaxhighlight lang="cpp-qt">
/** * This resource won't be saved to the database because * there is no property assigned to it */ Nepomuk2::Resource notSaved("file:///tmp/notsaved.txt"); /** * This resource will be saved to the database because we * set a property to it */ Nepomuk2::Resource saved("file:///tmp/saved.txt"); saved.addProperty(Nepomuk2::Vocabulary::NIE::comment(), Nepomuk2::Variant("This will be saved")); /** * This is saved to a resource with the Nepomuk2::HistoryItem type * because we set a property of it */ Nepomuk2::HistoryItem typedResource("file:///tmp/typedResource.txt");