EntityReference Class Reference

#include <Pt/Xml/Entity.h>

An entity reference XML node. More...

Inherits Node, and NonCopyable.

Public Member Functions

 EntityReference ()
 Creates an EntityReference object.
 
void clear ()
 Clears all content.
 
const Entityget () const
 Returns the entity this reference refers to or a nullptr.
 
const Pt::Stringname () const
 Returns the name of the entity this reference refers to.
 
Pt::Stringname ()
 Returns the name of the entity this reference refers to.
 
void setEntity (const Entity *entity)
 Sets the entity this reference refers to.
 
void setName (const Pt::String &name)
 Sets the name of the entity this reference refers to.
 
Type type () const
 Returns the type of the node.
 

Related Functions

EntityReferencetoEntityReference (Node *node)
 Casts a generic node to an EntityReference node.
 
const EntityReferencetoEntityReference (const Node *node)
 Casts a generic node to an EntityReference node.
 
EntityReferencetoEntityReference (Node &node)
 Casts a generic node to an EntityReference node.
 
const EntityReferencetoEntityReference (const Node &node)
 Casts a generic node to an EntityReference node.
 

Detailed Description

The XmlReader normally reports only unresolved entity references, but can be configured to report all entity references. They can be ignored or treated as an error depending on the application.