#include <DOM.hpp>
Inheritance diagram for DOM::CharacterData:
Public Member Functions | |
const Node * | appendChild (const Node *newNode) |
Append a child to the children list. | |
void | appendData (const DOMString &arg) |
Append the given string to the end of the data. | |
virtual const NamedNodeMap * | attributes () const |
Get the attributes (if this node is an Element). | |
CharacterData (const NodeType::Type &type, const Strings::FastString &string, DOMTree::Node *ref=0) | |
Constructor with read-write data. | |
CharacterData (const NodeType::Type &type, const DOMString &_data, DOMTree::Node *ref=0) | |
Constructor with read only data. | |
NodeList * | childNodes () const |
Get the child nodes. | |
Node * | cloneNode (bool deepCloning) const throw () |
Clone this node This methods returns a duplicate for this node, but the returned node has no parent. | |
void | data (const DOMString newData) |
Set the character's data. | |
DOMString | data () const throw () |
Get the character's data. | |
void | deleteData (uint32 offset, uint32 count) |
Delete a part of the data. | |
const Node * | firstChild () const |
Get the first child pointer. | |
const Node * | firstChildOfType (const NodeType::Type type) const |
Get the first child pointer of the given type. | |
const uint32 | getChildrenCount () const throw () |
Get the children count. | |
const uint16 | getNodeType () const |
Get the node type as the DOM 2.0 standard requires it. | |
bool | hasAttributes () const throw () |
Does this node has attribute ? | |
bool | hasChildNodes () const throw () |
Does this node has children ? | |
const Node * | insertBefore (const Node *newNode, const Node *refNode) |
Insert a node before the given node. | |
void | insertData (uint32 offset, const DOMString &arg) |
Insert a string at the given offset. | |
const Node * | lastChild () const |
Get the last child pointer. | |
const uint32 | length () const throw () |
Get the data length. | |
virtual DOMString | localName () const |
Get the local name. | |
virtual DOMString | namespaceURI () const |
Get the namespace URI (if specified). | |
const Node * | nextSibling () const |
Get the next node in the same current child level. | |
virtual DOMString | nodeName () const |
Get the node name. | |
virtual void | nodeValue (const DOMString &newValue) |
Set the node value. | |
virtual DOMString | nodeValue () const |
Get the node value. | |
void | normalize () throw () |
Normalize this tree so that the tree will never have 2 adjacent Text child, or an empty Text child This is used to the tree structure is kept as minimal (normalized). | |
const DOM::Document * | ownerDocument () const |
Get the owner document. | |
const Node * | parentNode () const |
Get the parent node. | |
void | prefix (const DOMString &) const |
Set the prefix. | |
virtual DOMString | prefix () const |
Get the prefix. | |
const Node * | previousSibling () const |
Get the previous node in the same current child level. | |
const Node * | removeChild (const Node *oldNode) |
Remove a child. | |
const Node * | replaceChild (const Node *newNode, const Node *oldNode) |
Replace a child node by another node. | |
void | replaceData (uint32 offset, uint32 count, const DOMString &arg) |
Replace a part of the data with the given string. | |
virtual void | returnToAllocator (const volatile HTML::Elements::Allocators::BaseAllocator *allocator) |
Return this node to the allocator. | |
void | setTreeNode (DOMTree::Node *newTreeNode) const |
Set the reference correctly. | |
DOMString | substringData (uint32 offset, uint32 count) |
Get a substring of the given data. | |
void | Suicide () |
Make this node commit suicide itself. | |
Static Public Member Functions | |
static bool | isSupported (const DOMString &feature, const DOMString &version) |
Tell if the given features is supported. | |
Public Attributes | |
const NodeType::Type | nodeType |
The node type. | |
Protected Member Functions | |
virtual Node * | Clone (bool deepCopy) const throw () |
The clone implementation. | |
const DOMTree::Node * | getTreeNode () const |
Get the underlying tree node. | |
DOMTree::Node * | getTreeNode () |
Get the underlying tree node. | |
bool | isShared () const |
Is the data shared ? | |
void | limitTo (uint32 count) |
Allow the child text to modify us while splitting. |
DOM::CharacterData::CharacterData | ( | const NodeType::Type & | type, | |
const DOMString & | _data, | |||
DOMTree::Node * | ref = 0 | |||
) | [inline] |
Constructor with read only data.
DOM::CharacterData::CharacterData | ( | const NodeType::Type & | type, | |
const Strings::FastString & | string, | |||
DOMTree::Node * | ref = 0 | |||
) | [inline] |
Constructor with read-write data.
Append a child to the children list.
newNode | the new node to append to the list |
void DOM::CharacterData::appendData | ( | const DOMString & | arg | ) | [inline] |
Append the given string to the end of the data.
arg | the string to append to the current data |
virtual const NamedNodeMap* DOM::Node::attributes | ( | ) | const [inline, virtual, inherited] |
Get the attributes (if this node is an Element).
Reimplemented in DOM::Element.
NodeList* DOM::Node::childNodes | ( | ) | const [inline, inherited] |
Get the child nodes.
virtual Node* DOM::Node::Clone | ( | bool | deepCopy | ) | const throw () [inline, protected, virtual, inherited] |
Node* DOM::Node::cloneNode | ( | bool | deepCloning | ) | const throw () [inline, inherited] |
Clone this node This methods returns a duplicate for this node, but the returned node has no parent.
This is a very long process.
deepCloning | Does the cloning should also clone childrens |
void DOM::CharacterData::data | ( | const DOMString | newData | ) | [inline] |
Set the character's data.
newData | is the new data to use (the data is copied) |
DOMString DOM::CharacterData::data | ( | ) | const throw () [inline] |
Get the character's data.
void DOM::CharacterData::deleteData | ( | uint32 | offset, | |
uint32 | count | |||
) | [inline] |
Delete a part of the data.
offset | 0-based index of the first tchar to remove | |
count | the number of tchar to remove |
Exceptions::IndexSize | if the given indexes are not supported |
const Node* DOM::Node::firstChild | ( | ) | const [inline, inherited] |
const Node* DOM::Node::firstChildOfType | ( | const NodeType::Type | type | ) | const [inline, inherited] |
Get the first child pointer of the given type.
type | The child type to look for |
const uint32 DOM::Node::getChildrenCount | ( | ) | const throw () [inline, inherited] |
Get the children count.
const uint16 DOM::Node::getNodeType | ( | ) | const [inline, inherited] |
Get the node type as the DOM 2.0 standard requires it.
const DOMTree::Node* DOM::Node::getTreeNode | ( | ) | const [inline, protected, inherited] |
Get the underlying tree node.
DOMTree::Node* DOM::Node::getTreeNode | ( | ) | [inline, protected, inherited] |
Get the underlying tree node.
bool DOM::Node::hasAttributes | ( | ) | const throw () [inline, inherited] |
bool DOM::Node::hasChildNodes | ( | ) | const throw () [inline, inherited] |
Does this node has children ?
const Node* DOM::Node::insertBefore | ( | const Node * | newNode, | |
const Node * | refNode | |||
) | [inline, inherited] |
Insert a node before the given node.
newNode | the new node pointer to insert before refNode | |
refNode | the reference node to find. If refNode is 0, the newNode is appended, otherwise it Exception::NotFound is thrown |
Exceptions::NotFound | if the given node is not found |
void DOM::CharacterData::insertData | ( | uint32 | offset, | |
const DOMString & | arg | |||
) | [inline] |
Insert a string at the given offset.
offset | 0-based index of the first tchar to insert after | |
arg | the string to insert |
Exceptions::IndexSize | if the given indexes are not supported |
bool DOM::CharacterData::isShared | ( | ) | const [inline, protected] |
Is the data shared ?
static bool DOM::Node::isSupported | ( | const DOMString & | feature, | |
const DOMString & | version | |||
) | [inline, static, inherited] |
Tell if the given features is supported.
feature | the feature name | |
version | the version number ("1.0", "2.0" etc...) |
const Node* DOM::Node::lastChild | ( | ) | const [inline, inherited] |
const uint32 DOM::CharacterData::length | ( | ) | const throw () [inline] |
Get the data length.
void DOM::CharacterData::limitTo | ( | uint32 | count | ) | [inline, protected] |
Allow the child text to modify us while splitting.
virtual DOMString DOM::Node::localName | ( | ) | const [inline, virtual, inherited] |
virtual DOMString DOM::Node::namespaceURI | ( | ) | const [inline, virtual, inherited] |
const Node* DOM::Node::nextSibling | ( | ) | const [inline, inherited] |
virtual DOMString DOM::Node::nodeName | ( | ) | const [inline, virtual, inherited] |
Get the node name.
Reimplemented in DOM::Text, DOM::Attr, DOM::Element, DOM::DocumentType, DOM::Comment, and DOM::Document.
virtual void DOM::CharacterData::nodeValue | ( | const DOMString & | newValue | ) | [inline, virtual] |
virtual DOMString DOM::CharacterData::nodeValue | ( | ) | const [inline, virtual] |
void DOM::Node::normalize | ( | ) | throw () [inline, inherited] |
const DOM::Document* DOM::Node::ownerDocument | ( | ) | const [inline, inherited] |
const Node* DOM::Node::parentNode | ( | ) | const [inline, inherited] |
Get the parent node.
void DOM::Node::prefix | ( | const DOMString & | ) | const [inline, inherited] |
virtual DOMString DOM::Node::prefix | ( | ) | const [inline, virtual, inherited] |
const Node* DOM::Node::previousSibling | ( | ) | const [inline, inherited] |
Remove a child.
oldNode | the old node to remove |
Exceptions::NotFound | if the oldNode can't be found in the child list |
const Node* DOM::Node::replaceChild | ( | const Node * | newNode, | |
const Node * | oldNode | |||
) | [inline, inherited] |
Replace a child node by another node.
newNode | the new node pointer to replace oldNode with (if newNode is already in the child list, it is removed first) | |
oldNode | the old node to remove |
Exceptions::NotFound | if the oldNode can't be found in the child list |
void DOM::CharacterData::replaceData | ( | uint32 | offset, | |
uint32 | count, | |||
const DOMString & | arg | |||
) | [inline] |
Replace a part of the data with the given string.
offset | 0-based index of the first tchar to start replace with | |
count | the number of tchar to remove | |
arg | the string to insert |
Exceptions::IndexSize | if the given indexes are not supported |
void DOM::Node::returnToAllocator | ( | const volatile HTML::Elements::Allocators::BaseAllocator * | allocator | ) | [virtual, inherited] |
Return this node to the allocator.
allocator | The allocator to return this node to |
Reimplemented in DOM::Attr, DOM::Element, and DOM::Document.
void DOM::Node::setTreeNode | ( | DOMTree::Node * | newTreeNode | ) | const [inline, inherited] |
Set the reference correctly.
DOMString DOM::CharacterData::substringData | ( | uint32 | offset, | |
uint32 | count | |||
) | [inline] |
Get a substring of the given data.
offset | 0-based index of the first tchar | |
count | the number of tchar to retrieve |
Exceptions::IndexSize | if the given indexes are not supported |
void DOM::Node::Suicide | ( | ) | [inline, inherited] |
Make this node commit suicide itself.
Only call this method for unreachable nodes (like duplicate attribute, and removed or replaced child, and so on)...
const NodeType::Type DOM::Node::nodeType [inherited] |
The node type.