LibreOffice Module l10ntools (master) 1
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
XMLElement Class Reference

Hold information of an element node. More...

#include <xmlparse.hxx>

Inheritance diagram for XMLElement:
[legend]
Collaboration diagram for XMLElement:
[legend]

Public Member Functions

 XMLElement (OString sName, XMLParentNode *pParent)
 create an element node More...
 
virtual ~XMLElement () override
 
 XMLElement (const XMLElement &)
 
XMLElementoperator= (const XMLElement &rObj)
 
virtual XMLNodeType GetNodeType () const override
 
const OString & GetName () const
 returns element name More...
 
XMLAttributeListGetAttributeList ()
 returns list of attributes of this element More...
 
void AddAttribute (const OString &rAttribute, const OString &rValue)
 adds a new attribute to this element, typically used by parser More...
 
void ChangeLanguageTag (const OString &rValue)
 
OString ToOString ()
 Return a Unicode String representation of this object. More...
 
- Public Member Functions inherited from XMLParentNode
XMLChildNodeListGetChildList ()
 returns child list of this node More...
 
void AddChild (XMLChildNode *pChild)
 adds a new child More...
 
void RemoveAndDeleteAllChildren ()
 
- Public Member Functions inherited from XMLChildNode
XMLParentNodeGetParent ()
 returns the parent of this node More...
 
- Public Member Functions inherited from XMLNode
virtual XMLNodeType GetNodeType () const =0
 
virtual ~XMLNode ()
 
 XMLNode (XMLNode const &)=default
 
 XMLNode (XMLNode &&)=default
 
XMLNodeoperator= (XMLNode const &)=default
 
XMLNodeoperator= (XMLNode &&)=default
 

Protected Member Functions

void Print (XMLNode *pCur, OStringBuffer &rBuffer, bool bRootelement) const
 
- Protected Member Functions inherited from XMLParentNode
 XMLParentNode (XMLParentNode *pPar)
 
 XMLParentNode (const XMLParentNode &)
 
XMLParentNodeoperator= (const XMLParentNode &rObj)
 
virtual ~XMLParentNode () override
 
- Protected Member Functions inherited from XMLChildNode
 XMLChildNode (XMLParentNode *pPar)
 
 XMLChildNode (const XMLChildNode &rObj)
 
XMLChildNodeoperator= (const XMLChildNode &rObj)
 
- Protected Member Functions inherited from XMLNode
 XMLNode ()
 

Private Attributes

OString m_sElementName
 
std::unique_ptr< XMLAttributeListm_pAttributes
 

Detailed Description

Hold information of an element node.

Definition at line 201 of file xmlparse.hxx.

Constructor & Destructor Documentation

◆ XMLElement() [1/2]

XMLElement::XMLElement ( OString  sName,
XMLParentNode pParent 
)

create an element node

Definition at line 535 of file xmlparse.cxx.

◆ ~XMLElement()

XMLElement::~XMLElement ( )
overridevirtual

Definition at line 622 of file xmlparse.cxx.

References i, and m_pAttributes.

◆ XMLElement() [2/2]

XMLElement::XMLElement ( const XMLElement rObj)

Definition at line 544 of file xmlparse.cxx.

References AddAttribute(), i, and m_pAttributes.

Member Function Documentation

◆ AddAttribute()

void XMLElement::AddAttribute ( const OString &  rAttribute,
const OString &  rValue 
)

adds a new attribute to this element, typically used by parser

Definition at line 579 of file xmlparse.cxx.

References m_pAttributes.

Referenced by ChangeLanguageTag(), operator=(), SimpleXMLParser::StartElement(), and XMLElement().

◆ ChangeLanguageTag()

void XMLElement::ChangeLanguageTag ( const OString &  rValue)

◆ GetAttributeList()

XMLAttributeList * XMLElement::GetAttributeList ( )
inline

returns list of attributes of this element

Definition at line 226 of file xmlparse.hxx.

References m_pAttributes.

Referenced by XMLFile::CheckExportStatus(), XMLFile::InsertL10NElement(), Print(), XMLFile::Print(), XMLFile::SearchL10NElements(), and XMLFile::Write().

◆ GetName()

const OString & XMLElement::GetName ( ) const
inline

◆ GetNodeType()

virtual XMLNodeType XMLElement::GetNodeType ( ) const
inlineoverridevirtual

Implements XMLNode.

Definition at line 220 of file xmlparse.hxx.

References ELEMENT.

◆ operator=()

XMLElement & XMLElement::operator= ( const XMLElement rObj)

Definition at line 556 of file xmlparse.cxx.

References AddAttribute(), i, m_pAttributes, m_sElementName, and XMLParentNode::operator=().

◆ Print()

void XMLElement::Print ( XMLNode pCur,
OStringBuffer &  rBuffer,
bool  bRootelement 
) const
protected

◆ ToOString()

OString XMLElement::ToOString ( )

Return a Unicode String representation of this object.

Definition at line 631 of file xmlparse.cxx.

References Print().

Referenced by HelpParser::CreatePO(), and HelpParser::ProcessHelp().

Member Data Documentation

◆ m_pAttributes

std::unique_ptr<XMLAttributeList> XMLElement::m_pAttributes
private

◆ m_sElementName

OString XMLElement::m_sElementName
private

Definition at line 204 of file xmlparse.hxx.

Referenced by GetName(), and operator=().


The documentation for this class was generated from the following files: