#include <tag.h>
Inherited by Stanza.
Inheritance diagram for Tag:
Public Types | |
typedef std::list< Tag * > | TagList |
Public Member Functions | |
Tag () | |
Tag (const std::string &name, const std::string &cdata="") | |
Tag (Tag *parent, const std::string &name, const std::string &cdata="") | |
virtual | ~Tag () |
virtual const std::string | xml () const |
virtual void | addAttrib (const std::string &name, const std::string &value) |
virtual void | addChild (Tag *child) |
virtual void | setCData (const std::string &cdata) |
virtual void | addCData (const std::string &cdata) |
virtual std::string | name () const |
virtual std::string | cdata () const |
virtual StringMap & | attributes () |
virtual TagList & | children () |
virtual const std::string | findAttribute (const std::string &name) const |
virtual bool | hasAttribute (const std::string &name, const std::string &value="") const |
virtual Tag * | findChild (const std::string &name) |
virtual bool | hasChild (const std::string &name, const std::string &attr="", const std::string &value="") const |
virtual Tag * | findChildWithAttrib (const std::string &attr, const std::string &value="") |
virtual bool | hasChildWithAttrib (const std::string &attr, const std::string &value="") const |
virtual bool | empty () const |
bool | hasChildWithCData (const std::string &name, const std::string &cdata) const |
Tag * | parent () |
virtual StanzaType | type () const |
virtual Tag * | clone () |
Protected Attributes | |
std::string | m_name |
StringMap | m_attribs |
std::string | m_cdata |
TagList | m_children |
Tag * | m_parent |
StanzaType | m_type |
Definition at line 32 of file tag.h.
|
A list of Tags. |
|
Creates an empty tag. Definition at line 18 of file tag.cpp. Referenced by Tag::clone(), Stanza::createIqStanza(), Stanza::createMessageStanza(), Stanza::createPresenceStanza(), and Stanza::createSubscriptionStanza(). |
|
Creates a new tag with agiven name (and XML character data, if given).
|
|
Creates a new tag as a child tag of the given parent, with a given name (and XML character data, if given).
Definition at line 28 of file tag.cpp. References Tag::addChild(), and Tag::m_parent. |
|
Virtual destructor. Definition at line 34 of file tag.cpp. References Tag::m_children. |
|
|
Adds the string to the existing XML character data for this Tag.
Definition at line 50 of file tag.cpp. References Tag::m_cdata. Referenced by gloox::cdataHook(). |
|
Use this function to add a child node to the tag.
Definition at line 92 of file tag.cpp. References Tag::m_children. Referenced by RosterManager::add(), Client::bindResource(), Registration::changePassword(), Tag::clone(), Registration::createAccount(), Stanza::createPresenceStanza(), NonSaslAuth::doAuth(), FlexibleOffline::fetchMessages(), Registration::fetchRegistrationFields(), RosterManager::fill(), Registration::removeAccount(), PrivacyManager::removeList(), FlexibleOffline::removeMessages(), PrivacyManager::requestList(), PrivacyManager::requestListNames(), PrivateXML::requestXML(), PrivacyManager::setActive(), PrivacyManager::setDefault(), Stanza::Stanza(), PrivacyManager::store(), Annotations::storeAnnotations(), BookmarkStorage::storeBookmarks(), PrivateXML::storeXML(), RosterManager::synchronize(), Tag::Tag(), DataFormField::tag(), DataForm::tag(), gloox::tagHook(), PrivacyManager::unsetActive(), PrivacyManager::unsetDefault(), and RosterManager::unsubscribe(). |
|
Use this function to manipulate the list of attributes.
Definition at line 106 of file tag.cpp. References Tag::m_attribs. Referenced by Stanza::Stanza(). |
|
Use this function to retrieve the XML character data of an element.
Definition at line 101 of file tag.cpp. References Tag::m_cdata. Referenced by Tag::clone(), and RosterManager::handlePrivateXML(). |
|
Use this function to manipulate the list of child elements.
Definition at line 111 of file tag.cpp. References Tag::m_children. Referenced by DataForm::DataForm(), DataFormField::DataFormField(), FlexibleOffline::handleDiscoItemsResult(), PrivateXML::handleIqID(), PrivacyManager::handleIqID(), BookmarkStorage::handlePrivateXML(), Annotations::handlePrivateXML(), Stanza::init(), and Stanza::Stanza(). |
|
This function creates a deep copy of this Tag.
Definition at line 242 of file tag.cpp. References Tag::addChild(), Tag::cdata(), Tag::m_attribs, Tag::m_children, Tag::name(), and Tag::Tag(). |
|
Returns whether a Tag is considered empty, i.e. invalid.
|
|
This function can be used to retrieve the value of a Tag's attribute.
Definition at line 116 of file tag.cpp. References Tag::m_attribs. Referenced by PrivacyManager::handleIq(), Adhoc::handleIq(), LastActivity::handleIqID(), and Stanza::init(). |
|
This function finds and returns an element within the child elements of the current tag.
Definition at line 137 of file tag.cpp. References Tag::m_children. Referenced by FlexibleOffline::handleDiscoInfoResult(), FlexibleOffline::handleDiscoItemsResult(), Registration::handleIq(), PrivacyManager::handleIq(), Adhoc::handleIq(), Registration::handleIqID(), PrivateXML::handleIqID(), PrivacyManager::handleIqID(), NonSaslAuth::handleIqID(), and LastActivity::handleIqID(). |
|
This function checks whether the Tag has a child element which posesses a given attribute with an optional value. The name of the child element does not matter.
Definition at line 189 of file tag.cpp. References Tag::m_children. Referenced by Stanza::init(). |
|
Checks whether the tag has a attribute with given name and optional value.
Definition at line 125 of file tag.cpp. References Tag::m_attribs. Referenced by DataForm::DataForm(), DataFormField::DataFormField(), FlexibleOffline::handleDiscoItemsResult(), PrivacyManager::handleIq(), NonSaslAuth::handleIqID(), and Stanza::init(). |
|
This function checks whether the Tag has a child element with a given name, and optionally this child element is checked for having a given attribute with an optional value.
Definition at line 149 of file tag.cpp. References Tag::m_children. Referenced by FlexibleOffline::handleDiscoInfoResult(), Adhoc::handleIq(), Registration::handleIqID(), NonSaslAuth::handleIqID(), and ClientBase::processSASLError(). |
|
This function checks whether the Tag has a child element which posesses a given attribute with an optional value. The name of the child element does not matter.
Definition at line 177 of file tag.cpp. References Tag::m_children. |
|
This function checks whether a child element with given name exists and has XML character data that equals the given cdata string.
Definition at line 163 of file tag.cpp. References Tag::m_children. |
|
Use this function to retrieve the name of an element.
Definition at line 102 of file tag.h. Referenced by Tag::clone(), DataForm::DataForm(), and Component::handleNormalNode(). |
|
Returns the tag's parent Tag. |
|
Sets the XML character data for this Tag.
Definition at line 45 of file tag.cpp. References Tag::m_cdata. Referenced by ClientBase::startSASL(). |
|
Returns the stanza type.
Definition at line 198 of file tag.h. Referenced by ClientBase::send(). |
|
This function can be used to retrieve the complete XML of a tag as a string. It includes all the attributes, child nodes and character data.
Definition at line 55 of file tag.cpp. References Tag::m_attribs, and Tag::m_name. Referenced by ClientBase::send(). |