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

#include <html.hpp>

Inheritance diagram for neogfx::html_element< CharT, Alloc >:
neogfx::html_node< CharT, Alloc >

Classes

class  const_iterator
 
class  iterator
 

Public Types

enum  type_e {
  Doctype , Html , Head , Body ,
  Heading1 , Heading2 , Heading3 , Heading4 ,
  Heading5 , Heading6 , Paragraph
}
 
typedef html_node< CharT, Alloc > node
 
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 allocator_type::template rebind< attribute >::other > attribute_list
 
- Public Types inherited from neogfx::html_node< CharT, Alloc >
enum  type_e {
  Document = 0x1 , Element = 0x2 , Text = 0x4 , Comment = 0x8 ,
  All = 0xFF
}
 
typedef Alloc allocator_type
 
typedef neolib::basic_quick_string< CharT > string
 
typedef html_node< CharT, allocator_typenode
 
typedef nodenode_ptr
 

Public Member Functions

 html_element (type_e aType)
 
type_e type () const
 
node::iterator insert (typename node::iterator aPosition, const CharT *aName)
 
html_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
 
type_etype ()
 
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 neogfx::html_node< CharT, Alloc >
 html_node (type_e aType=Document)
 
virtual ~html_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
 
template<typename Exception >
const_iterator find_or_throw (const string &aName) const
 
iterator find (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 void * operator new (std::size_t)
 
static void operator delete (void *ptr)
 

Detailed Description

template<typename CharT, typename Alloc = std::allocator<CharT>>
class neogfx::html_element< CharT, Alloc >

Definition at line 190 of file html.hpp.

Member Typedef Documentation

◆ allocator_type

template<typename CharT , typename Alloc = std::allocator<CharT>>
typedef node::allocator_type neogfx::html_element< CharT, Alloc >::allocator_type

Definition at line 216 of file html.hpp.

◆ attribute

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

Definition at line 218 of file html.hpp.

◆ attribute_list

template<typename CharT , typename Alloc = std::allocator<CharT>>
typedef std::map<string, string, std::less<string>, typename allocator_type::template rebind<attribute>::other> neogfx::html_element< CharT, Alloc >::attribute_list

Definition at line 219 of file html.hpp.

◆ node

template<typename CharT , typename Alloc = std::allocator<CharT>>
typedef html_node<CharT, Alloc> neogfx::html_element< CharT, Alloc >::node

Definition at line 215 of file html.hpp.

◆ string

template<typename CharT , typename Alloc = std::allocator<CharT>>
typedef node::string neogfx::html_element< CharT, Alloc >::string

Definition at line 217 of file html.hpp.

Member Enumeration Documentation

◆ type_e

template<typename CharT , typename Alloc = std::allocator<CharT>>
enum neogfx::html_element::type_e
Enumerator
Doctype 
Html 
Head 
Body 
Heading1 
Heading2 
Heading3 
Heading4 
Heading5 
Heading6 
Paragraph 

Definition at line 193 of file html.hpp.

Constructor & Destructor Documentation

◆ html_element()

template<typename CharT , typename Alloc = std::allocator<CharT>>
neogfx::html_element< CharT, Alloc >::html_element ( type_e  aType)
inline

Definition at line 238 of file html.hpp.

Member Function Documentation

◆ append()

template<typename CharT , typename Alloc = std::allocator<CharT>>
html_element & neogfx::html_element< CharT, Alloc >::append ( const CharT *  aName)
inline

Definition at line 245 of file html.hpp.

◆ append_text()

template<typename CharT , typename Alloc = std::allocator<CharT>>
void neogfx::html_element< CharT, Alloc >::append_text ( const string aText)

◆ attribute_value() [1/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
const string & neogfx::html_element< CharT, Alloc >::attribute_value ( const string aAttributeName) const

◆ attribute_value() [2/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
const string & neogfx::html_element< CharT, Alloc >::attribute_value ( const string aNewAttributeName,
const string aOldAttributeName 
) const

◆ attributes() [1/2]

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

Definition at line 257 of file html.hpp.

◆ attributes() [2/2]

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

Definition at line 246 of file html.hpp.

◆ begin() [1/2]

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

Definition at line 252 of file html.hpp.

◆ begin() [2/2]

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

Definition at line 250 of file html.hpp.

◆ end() [1/2]

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

Definition at line 253 of file html.hpp.

◆ end() [2/2]

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

Definition at line 251 of file html.hpp.

◆ has_attribute()

template<typename CharT , typename Alloc = std::allocator<CharT>>
bool neogfx::html_element< CharT, Alloc >::has_attribute ( const string aAttributeName) const

◆ insert() [1/2]

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

Definition at line 157 of file html.hpp.

◆ insert() [2/2]

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

Definition at line 244 of file html.hpp.

◆ operator delete()

template<typename CharT , typename Alloc = std::allocator<CharT>>
static void neogfx::html_element< CharT, Alloc >::operator delete ( void *  ptr)
inlinestatic

Definition at line 211 of file html.hpp.

◆ operator new()

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

Definition at line 210 of file html.hpp.

◆ set_attribute()

template<typename CharT , typename Alloc = std::allocator<CharT>>
void neogfx::html_element< CharT, Alloc >::set_attribute ( const string aAttributeName,
const string aAttributeValue 
)

◆ set_use_empty_element_tag()

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

Definition at line 260 of file html.hpp.

◆ text()

template<typename CharT , typename Alloc = std::allocator<CharT>>
const string & neogfx::html_element< CharT, Alloc >::text ( ) const

◆ type() [1/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
type_e & neogfx::html_element< CharT, Alloc >::type ( )
inline

Definition at line 256 of file html.hpp.

◆ type() [2/2]

template<typename CharT , typename Alloc = std::allocator<CharT>>
type_e neogfx::html_element< CharT, Alloc >::type ( ) const
inline

Definition at line 242 of file html.hpp.

◆ use_empty_element_tag()

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

Definition at line 255 of file html.hpp.


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