neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::xml_element< CharT, Alloc > Class Template Reference

#include <xml.hpp>

Inheritance diagram for neolib::xml_element< CharT, Alloc >:
neolib::xml_node< CharT, Alloc >

Classes

class  const_iterator
 
class  iterator
 

Public Types

typedef xml_node< CharT, Allocnode
 
typedef node::allocator_type allocator_type
 
typedef node::string string
 
typedef std::pair< const string, stringattribute
 
typedef std::map< string, string, std::less< string >, typename std::allocator_traits< allocator_type >::template rebind_alloc< attribute > > attribute_list
 
- Public Types inherited from neolib::xml_node< CharT, Alloc >
enum  type_e {
  Document = 0x1 , Element = 0x2 , Text = 0x4 , Comment = 0x8 ,
  Declaration = 0x10 , Cdata = 0x20 , Dtd = 0x40 , All = 0xFF
}
 
typedef Alloc allocator_type
 
typedef basic_quick_string< CharTstring
 
typedef xml_node< CharT, allocator_typenode
 
typedef nodenode_ptr
 

Public Member Functions

 xml_element ()
 
 xml_element (const string &aName)
 
 xml_element (const CharT *aName)
 
const stringname () const
 
node::iterator insert (typename node::iterator aPosition, const CharT *aName)
 
xml_elementappend (const std::string &aName)
 
xml_elementappend (const CharT *aName)
 
const attribute_listattributes () const
 
bool has_attribute (const string &aAttributeName) const
 
const stringattribute_value (const string &aAttributeName) const
 
const stringattribute_value (const string &aNewAttributeName, const string &aOldAttributeName) const
 
const_iterator begin () const
 
const_iterator end () const
 
iterator begin ()
 
iterator end ()
 
const stringtext () const
 
bool use_empty_element_tag () const
 
stringname ()
 
attribute_listattributes ()
 
void set_attribute (const string &aAttributeName, const string &aAttributeValue)
 
void append_text (const string &aText)
 
void set_use_empty_element_tag (bool aUseEmptyElementTag)
 
iterator insert (iterator aIterator, node_ptr aNode)
 
- Public Member Functions inherited from neolib::xml_node< CharT, Alloc >
 xml_node (type_e aType=Document)
 
virtual ~xml_node ()
 
type_e type () const
 
bool empty () const
 
const nodeback () const
 
nodeback ()
 
const_iterator begin (type_e aFilter=All) const
 
const_iterator end (type_e aFilter=All) const
 
iterator begin (type_e aFilter=All)
 
iterator end (type_e aFilter=All)
 
const_iterator find (const string &aName) const
 
std::optional< const_iteratorfind_maybe (const string &aName) const
 
template<typename Exception >
const_iterator find_or_throw (const string &aName) const
 
iterator find (const string &aName)
 
std::optional< iteratorfind_maybe (const string &aName)
 
iterator find_or_append (const string &aName)
 
template<typename Exception >
iterator find_or_throw (const string &aName)
 
void push_back (node_ptr aNode)
 
iterator insert (iterator aIterator, node_ptr aNode)
 
void erase (iterator aIterator)
 
void clear ()
 

Static Public Member Functions

static voidoperator new (std::size_t)
 
static void operator delete (void *ptr)
 

Detailed Description

template<typename CharT, typename Alloc = std::allocator<CharT>>
class neolib::xml_element< CharT, Alloc >

Definition at line 216 of file xml.hpp.

Member Typedef Documentation

◆ allocator_type

template<typename CharT , typename Alloc = std::allocator<CharT>>
typedef node::allocator_type neolib::xml_element< CharT, Alloc >::allocator_type

Definition at line 226 of file xml.hpp.

◆ attribute

template<typename CharT , typename Alloc = std::allocator<CharT>>
typedef std::pair<const string, string> neolib::xml_element< CharT, Alloc >::attribute

Definition at line 228 of file xml.hpp.

◆ attribute_list

template<typename CharT , typename Alloc = std::allocator<CharT>>
typedef std::map<string, string, std::less<string>, typename std::allocator_traits<allocator_type>::template rebind_alloc<attribute> > neolib::xml_element< CharT, Alloc >::attribute_list

Definition at line 229 of file xml.hpp.

◆ node

template<typename CharT , typename Alloc = std::allocator<CharT>>
typedef xml_node<CharT, Alloc> neolib::xml_element< CharT, Alloc >::node

Definition at line 225 of file xml.hpp.

◆ string

template<typename CharT , typename Alloc = std::allocator<CharT>>
typedef node::string neolib::xml_element< CharT, Alloc >::string

Definition at line 227 of file xml.hpp.

Constructor & Destructor Documentation

◆ xml_element() [1/3]

template<typename CharT , typename Alloc = std::allocator<CharT>>
neolib::xml_element< CharT, Alloc >::xml_element ( )
inline

Definition at line 248 of file xml.hpp.

◆ xml_element() [2/3]

template<typename CharT , typename Alloc = std::allocator<CharT>>
neolib::xml_element< CharT, Alloc >::xml_element ( const string aName)
inline

Definition at line 249 of file xml.hpp.

◆ xml_element() [3/3]

template<typename CharT , typename Alloc = std::allocator<CharT>>
neolib::xml_element< CharT, Alloc >::xml_element ( const CharT aName)
inline

Definition at line 250 of file xml.hpp.

Member Function Documentation

◆ append() [1/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
xml_element & neolib::xml_element< CharT, Alloc >::append ( const CharT aName)
inline

Definition at line 258 of file xml.hpp.

◆ append() [2/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
xml_element & neolib::xml_element< CharT, Alloc >::append ( const std::string &  aName)
inline

Definition at line 257 of file xml.hpp.

◆ append_text()

template<typename CharT , typename Alloc >
void neolib::xml_element< CharT, Alloc >::append_text ( const string aText)

Definition at line 418 of file xml.inl.

◆ attribute_value() [1/2]

template<typename CharT , typename Alloc >
const xml_element< CharT, Alloc >::string & neolib::xml_element< CharT, Alloc >::attribute_value ( const string aAttributeName) const

Definition at line 383 of file xml.inl.

◆ attribute_value() [2/2]

template<typename CharT , typename Alloc >
const xml_element< CharT, Alloc >::string & neolib::xml_element< CharT, Alloc >::attribute_value ( const string aNewAttributeName,
const string aOldAttributeName 
) const

Definition at line 393 of file xml.inl.

◆ attributes() [1/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
attribute_list & neolib::xml_element< CharT, Alloc >::attributes ( )
inline

Definition at line 270 of file xml.hpp.

◆ attributes() [2/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
const attribute_list & neolib::xml_element< CharT, Alloc >::attributes ( ) const
inline

Definition at line 259 of file xml.hpp.

◆ begin() [1/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
iterator neolib::xml_element< CharT, Alloc >::begin ( )
inline

Definition at line 265 of file xml.hpp.

◆ begin() [2/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
const_iterator neolib::xml_element< CharT, Alloc >::begin ( ) const
inline

Definition at line 263 of file xml.hpp.

◆ end() [1/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
iterator neolib::xml_element< CharT, Alloc >::end ( )
inline

Definition at line 266 of file xml.hpp.

◆ end() [2/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
const_iterator neolib::xml_element< CharT, Alloc >::end ( ) const
inline

Definition at line 264 of file xml.hpp.

◆ has_attribute()

template<typename CharT , typename Alloc >
bool neolib::xml_element< CharT, Alloc >::has_attribute ( const string aAttributeName) const

Definition at line 377 of file xml.inl.

◆ insert() [1/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
iterator neolib::xml_node< CharT, Alloc >::insert ( iterator  aIterator,
node_ptr  aNode 
)
inline

Definition at line 183 of file xml.hpp.

◆ insert() [2/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
node::iterator neolib::xml_element< CharT, Alloc >::insert ( typename node::iterator  aPosition,
const CharT aName 
)
inline

Definition at line 256 of file xml.hpp.

◆ name() [1/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
string & neolib::xml_element< CharT, Alloc >::name ( )
inline

Definition at line 269 of file xml.hpp.

◆ name() [2/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
const string & neolib::xml_element< CharT, Alloc >::name ( ) const
inline

Definition at line 254 of file xml.hpp.

◆ operator delete()

template<typename CharT , typename Alloc = std::allocator<CharT>>
static void neolib::xml_element< CharT, Alloc >::operator delete ( void ptr)
inlinestatic

Definition at line 221 of file xml.hpp.

◆ operator new()

template<typename CharT , typename Alloc = std::allocator<CharT>>
static void * neolib::xml_element< CharT, Alloc >::operator new ( std::size_t  )
inlinestatic

Definition at line 220 of file xml.hpp.

◆ set_attribute()

template<typename CharT , typename Alloc >
void neolib::xml_element< CharT, Alloc >::set_attribute ( const string aAttributeName,
const string aAttributeValue 
)

Definition at line 412 of file xml.inl.

◆ set_use_empty_element_tag()

template<typename CharT , typename Alloc = std::allocator<CharT>>
void neolib::xml_element< CharT, Alloc >::set_use_empty_element_tag ( bool  aUseEmptyElementTag)
inline

Definition at line 273 of file xml.hpp.

◆ text()

Definition at line 402 of file xml.inl.

◆ use_empty_element_tag()

template<typename CharT , typename Alloc = std::allocator<CharT>>
bool neolib::xml_element< CharT, Alloc >::use_empty_element_tag ( ) const
inline

Definition at line 268 of file xml.hpp.


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