syndication/rdf
#include <literal.h>

Public Member Functions | |
Literal () | |
Literal (const Literal &other) | |
Literal (const QString &text) | |
virtual | ~Literal () |
virtual void | accept (NodeVisitor *visitor, NodePtr ptr) |
virtual Literal * | clone () const |
virtual unsigned int | id () const |
virtual bool | isAnon () const |
virtual bool | isLiteral () const |
virtual bool | isNull () const |
virtual bool | isProperty () const |
virtual bool | isResource () const |
virtual bool | isSequence () const |
virtual | operator QString () const |
virtual Literal & | operator= (const Literal &other) |
virtual bool | operator== (const Node &other) const |
virtual void | setId (unsigned int id) |
virtual void | setModel (const Model &model) |
virtual QString | text () const |
![]() | |
virtual | ~Node () |
virtual void | accept (NodeVisitor *visitor, NodePtr ptr) |
virtual Node * | clone () const =0 |
virtual unsigned int | id () const =0 |
virtual bool | isAnon () const =0 |
virtual bool | isLiteral () const =0 |
virtual bool | isNull () const =0 |
virtual bool | isProperty () const =0 |
virtual bool | isResource () const =0 |
virtual bool | isSequence () const =0 |
virtual bool | operator== (const Node &other) const =0 |
virtual void | setId (unsigned int id)=0 |
virtual void | setModel (const Model &model)=0 |
virtual QString | text () const =0 |
Additional Inherited Members | |
![]() | |
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 44 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 48 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 65 of file literal.cpp.
◆ ~Literal()
|
virtual |
destructor
Definition at line 71 of file literal.cpp.
Member Function Documentation
◆ accept()
|
virtual |
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 58 of file literal.cpp.
◆ clone()
|
virtual |
clones the literal node.
Implements Syndication::RDF::Node.
Definition at line 53 of file literal.cpp.
◆ id()
|
virtual |
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 98 of file literal.cpp.
◆ isAnon()
|
virtual |
returns false, literals are not anonymous resources
Implements Syndication::RDF::Node.
Definition at line 118 of file literal.cpp.
◆ isLiteral()
|
virtual |
returns true for literals
Implements Syndication::RDF::Node.
Definition at line 113 of file literal.cpp.
◆ isNull()
|
virtual |
returns whether this node is a null node
Implements Syndication::RDF::Node.
Definition at line 93 of file literal.cpp.
◆ isProperty()
|
virtual |
returns false, as a literal is not a property
Implements Syndication::RDF::Node.
Definition at line 108 of file literal.cpp.
◆ isResource()
|
virtual |
returns false, as a literal is not a resource
Implements Syndication::RDF::Node.
Definition at line 103 of file literal.cpp.
◆ isSequence()
|
virtual |
returns false, literals are not sequences
Implements Syndication::RDF::Node.
Definition at line 123 of file literal.cpp.
◆ operator QString()
|
virtual |
◆ operator=()
assigns another literal
- Parameters
-
other the literal to assign
Definition at line 75 of file literal.cpp.
◆ operator==()
|
virtual |
two literal nodes are equal iff their text and ID's are equal.
Implements Syndication::RDF::Node.
Definition at line 81 of file literal.cpp.
◆ setId()
|
virtual |
◆ setModel()
|
virtual |
◆ text()
|
virtual |
the string value of the literal
Implements Syndication::RDF::Node.
Definition at line 128 of file literal.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.