Base Framework
Public Types | Public Member Functions | Protected Member Functions | List of all members
ElementDecl Class Reference

XML element declaration node. More...

#include <base/xml/ElementDecl.h>

Inherits Declaration.

Public Types

enum  ValueType { EMPTY, ANY, MIXED, ELEMENT }
 
enum  Content { CONTENT_PCDATA, CONTENT_ELEMENT, CONTENT_SEQUENCE, CONTENT_OR }
 
enum  Occurrence { ONCE, OPTIONAL, STAR, PLUS }
 
- Public Types inherited from Node
enum  NodeType {
  ELEMENT_NODE, ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE,
  ENTITY_REFERENCE_NODE, ENTITY_NODE, PROCESSING_INSTRUCTION_NODE, COMMENT_NODE,
  DOCUMENT_NODE, DOCUMENT_TYPE_NODE, DOCUMENT_FRAGMENT_NODE, NOTATION_NODE,
  ATTRIBUTE_DECL_NODE, ELEMENT_DECL_NODE, ENTITY_DECL_NODE
}
 

Public Member Functions

 ElementDecl (Node node)
 
 ElementDecl (Declaration node)
 
ValueType getValueType () const
 
bool hasAttributes () const noexcept
 
AttributeDecl getFirstAttribute () noexcept
 
- Public Member Functions inherited from Declaration
 Declaration (Node node)
 
DocumentType getDocumentType () noexcept
 
- Public Member Functions inherited from Node
 Node () noexcept
 
 Node (const Node &copy) noexcept
 
Nodeoperator= (const Node &assign) noexcept
 
Node appendChild (Node child)
 
Node insertBefore (Node newChild, Node refChild)
 
Node removeChild (Node child)
 
Node replaceChild (Node newChild, Node oldChild)
 
Node cloneNode (bool deep)
 
String getLocalName () const noexcept
 
String getNamespaceURI () const noexcept
 
String getName () const
 
NodeType getType () const
 
String getValue () const
 
ShadowDocument getOwnerDocument () noexcept
 
String getPrefix () const
 
void setPrefix (const String &prefix)
 
Node getParent () const noexcept
 
Node getPreviousSibling () const noexcept
 
Node getNextSibling () const noexcept
 
Node getFirstChild () const
 
Node getLastChild () const
 
bool hasAttributes () const noexcept
 
bool hasChildNodes () const
 
bool isSupported (const String &feature, const String &version) const noexcept
 
void normalize ()
 
void setValue (const String &value)
 
bool isValid () const noexcept
 
bool isInvalid () const noexcept
 
bool isUnlinked () const noexcept
 
bool isSame (const Node &node) const noexcept
 
bool operator== (const Node &node) const noexcept
 
bool hasSameOwner (const Node &node) const noexcept
 
bool isAncestor (const Node &node) const noexcept
 
 operator bool () const noexcept
 
 ~Node () noexcept
 

Protected Member Functions

 ElementDecl (void *context) noexcept
 
- Protected Member Functions inherited from Declaration
 Declaration (void *context) noexcept
 
- Protected Member Functions inherited from Node
 Node (void *_context) noexcept
 
void * getContext () noexcept
 
const void * getContext () const noexcept
 

Detailed Description

XML element declaration node.

Version
1.0

Member Enumeration Documentation

◆ Content

Content.

Enumerator
CONTENT_PCDATA 

PCDATA.

CONTENT_ELEMENT 

Element.

CONTENT_SEQUENCE 

Sequence.

CONTENT_OR 

Or.

◆ Occurrence

Content occurrences.

Enumerator
ONCE 

Content occurring exactly once.

OPTIONAL 

Optional content.

STAR 

Any number of occurrences.

PLUS 

One or more.

◆ ValueType

The value type.

Enumerator
EMPTY 

Empty.

ANY 

Any.

MIXED 

Mixed.

ELEMENT 

Element.

Constructor & Destructor Documentation

◆ ElementDecl()

ElementDecl::ElementDecl ( void *  context)
inlineprotectednoexcept

Initializes element declaration.

Member Function Documentation

◆ getFirstAttribute()

AttributeDecl ElementDecl::getFirstAttribute ( )
noexcept

Returns the first attribute declaration.

◆ getValueType()

ValueType ElementDecl::getValueType ( ) const

Returns the type of the element.

◆ hasAttributes()

bool ElementDecl::hasAttributes ( ) const
noexcept

Returns true if the element declaration has any attribute declarations.