Syndication::RDF::ResourceWrapper

Search for usage in LXR

Syndication::RDF::ResourceWrapper Class Reference

#include <resourcewrapper.h>

Inheritance diagram for Syndication::RDF::ResourceWrapper:

Public Member Functions

 ResourceWrapper ()
 
 ResourceWrapper (const ResourceWrapper &other)
 
 ResourceWrapper (ResourcePtr resource)
 
virtual ~ResourceWrapper ()
 
bool isNull () const
 
ResourceWrapperoperator= (const ResourceWrapper &other)
 
bool operator== (const ResourceWrapper &other) const
 
ResourcePtr resource () const
 

Detailed Description

A wrapper for RDF resources.

Base class for convenience wrappers such as Document, Item etc.

Author
Frank Osterfeld

Definition at line 28 of file resourcewrapper.h.

Constructor & Destructor Documentation

◆ ResourceWrapper() [1/3]

Syndication::RDF::ResourceWrapper::ResourceWrapper ( )

creates a wrapper wrapping a null resource, isNull() will be true.

Definition at line 23 of file resourcewrapper.cpp.

◆ ResourceWrapper() [2/3]

Syndication::RDF::ResourceWrapper::ResourceWrapper ( const ResourceWrapper & other)

Copy constructor.

Due to the shared d pointer, this is a cheap operation.

Parameters
otherresource wrapper to copy

Definition at line 29 of file resourcewrapper.cpp.

◆ ResourceWrapper() [3/3]

Syndication::RDF::ResourceWrapper::ResourceWrapper ( ResourcePtr resource)
explicit

creates a resource wrapper for a given resource.

If a null pointer is passed, a null resource is created internally (resource() will not return a null pointer!)

Parameters
resourcea resource wrapper instance

Definition at line 34 of file resourcewrapper.cpp.

◆ ~ResourceWrapper()

Syndication::RDF::ResourceWrapper::~ResourceWrapper ( )
virtual

destructor

Definition at line 42 of file resourcewrapper.cpp.

Member Function Documentation

◆ isNull()

bool Syndication::RDF::ResourceWrapper::isNull ( ) const

returns whether the wrapped resource is a null resource

Returns
true if isNull() is true for the wrapped resource, false otherwise

Definition at line 57 of file resourcewrapper.cpp.

◆ operator=()

ResourceWrapper & Syndication::RDF::ResourceWrapper::operator= ( const ResourceWrapper & other)

Assignment oeprator Due to the shared d pointer, this is a cheap operation.

Parameters
otherresource wrapper to assign.

Definition at line 46 of file resourcewrapper.cpp.

◆ operator==()

bool Syndication::RDF::ResourceWrapper::operator== ( const ResourceWrapper & other) const

compares two resource wrapper instances.

Two resource wrappers are equal when the wrapped resources are equal, i.e. they have the same URI.

See also
Resource::uri()
Parameters
otherresource wrapper instance to compare to

Definition at line 52 of file resourcewrapper.cpp.

◆ resource()

ResourcePtr Syndication::RDF::ResourceWrapper::resource ( ) const

returns the wrapped resource.

Whether a null resource or not, the returned pointer itself is never a null pointer!

Definition at line 62 of file resourcewrapper.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Aug 30 2024 11:46:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.