Syndication::RDF::Literal
#include <literal.h>
Public Member Functions | |
Literal () | |
Literal (const Literal &other) | |
Literal (const QString &text) | |
~Literal () override | |
void | accept (NodeVisitor *visitor, NodePtr ptr) override |
Literal * | clone () const override |
unsigned int | id () const override |
bool | isAnon () const override |
bool | isLiteral () const override |
bool | isNull () const override |
bool | isProperty () const override |
bool | isResource () const override |
bool | isSequence () const override |
virtual | operator QString () const |
virtual Literal & | operator= (const Literal &other) |
bool | operator== (const Literal &other) const |
void | setId (unsigned int id) override |
void | setModel (const Model &model) override |
QString | text () const override |
Public Member Functions inherited from Syndication::RDF::Node | |
virtual | ~Node () |
Additional Inherited Members | |
Static Protected Attributes inherited from Syndication::RDF::Node | |
static unsigned int | idCounter = 1 |
Detailed Description
a node type representing simple string values.
Literals can be object of statement, but neither subject nor predicate.
Constructor & Destructor Documentation
◆ Literal() [1/3]
Syndication::RDF::Literal::Literal | ( | ) |
creates a null literal.
text() will return a null string.
Definition at line 27 of file literal.cpp.
◆ Literal() [2/3]
Syndication::RDF::Literal::Literal | ( | const Literal & | other | ) |
copies a literal node
- Parameters
-
other the literal node to copy
Definition at line 32 of file literal.cpp.
◆ Literal() [3/3]
|
explicit |
creates a new literal node with a given text
- Parameters
-
text the literal string
Definition at line 51 of file literal.cpp.
◆ ~Literal()
|
override |
destructor
Definition at line 58 of file literal.cpp.
Member Function Documentation
◆ accept()
|
overridevirtual |
Used by visitors for double dispatch.
See NodeVisitor for more information.
- Parameters
-
visitor the visitor calling the method ptr a shared pointer object for this node
Reimplemented from Syndication::RDF::Node.
Definition at line 43 of file literal.cpp.
◆ clone()
|
overridevirtual |
clones the literal node.
Implements Syndication::RDF::Node.
Definition at line 38 of file literal.cpp.
◆ id()
|
overridevirtual |
the identifier of this node.
the ID is unique per model and set by the associated model at creation time.
Implements Syndication::RDF::Node.
Definition at line 82 of file literal.cpp.
◆ isAnon()
|
overridevirtual |
returns false, literals are not anonymous resources
Implements Syndication::RDF::Node.
Definition at line 102 of file literal.cpp.
◆ isLiteral()
|
overridevirtual |
returns true for literals
Implements Syndication::RDF::Node.
Definition at line 97 of file literal.cpp.
◆ isNull()
|
overridevirtual |
returns whether this node is a null node
Implements Syndication::RDF::Node.
Definition at line 77 of file literal.cpp.
◆ isProperty()
|
overridevirtual |
returns false, as a literal is not a property
Implements Syndication::RDF::Node.
Definition at line 92 of file literal.cpp.
◆ isResource()
|
overridevirtual |
returns false, as a literal is not a resource
Implements Syndication::RDF::Node.
Definition at line 87 of file literal.cpp.
◆ isSequence()
|
overridevirtual |
returns false, literals are not sequences
Implements Syndication::RDF::Node.
Definition at line 107 of file literal.cpp.
◆ operator QString()
|
virtual |
◆ operator=()
assigns another literal
- Parameters
-
other the literal to assign
Definition at line 62 of file literal.cpp.
◆ operator==()
bool Syndication::RDF::Literal::operator== | ( | const Literal & | other | ) | const |
two literal nodes are equal iff their text and ID's are equal.
Definition at line 68 of file literal.cpp.
◆ setId()
|
overridevirtual |
◆ setModel()
|
overridevirtual |
◆ text()
|
overridevirtual |
the string value of the literal
Implements Syndication::RDF::Node.
Definition at line 112 of file literal.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:57:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.