|  | 
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members 
 DOM_CharacterData  Class ReferenceTheDOM_CharacterDatainterface extends Node with a set of methods for accessing character data in the DOM. 
More...
#include <DOM_CharacterData.hpp> 
Inheritance diagram for DOM_CharacterData  [legend]Collaboration diagram for DOM_CharacterData:  [legend]List of all members. 
 Detailed DescriptionTheDOM_CharacterDatainterface extends Node with a set of methods for accessing character data in the DOM.
For clarity this set is defined here rather than on each class that uses  these methods. No DOM objects correspond directly to  CharacterData, thoughTextand others do inherit  the interface from it. Alloffsets in this interface start  from 0, and index in terms of Unicode 16 bit storage units. 
 
 Constructor & Destructor Documentation
 
  
    | 
        
          | DOM_CharacterData::DOM_CharacterData ( | ) |  |  
  
    |  | 
Default constructor for DOM_CharacterData.
 
While there can be no actual DOM nodes of type CharacterData, the C++ objects function more like reference variables, and instances of DOM_CharacterDatacan exist. They will be null when created by this constructor, and can then be assigned to refer to Text or CDATASection nodes. |  
 
  
    | 
        
          | DOM_CharacterData::DOM_CharacterData ( | const DOM_CharacterData & other ) |  |  
  
    |  | 
Copy constructor.
 
 
Parameters: 
| other | The object to be copied | 
 |  
 
  
    | 
        
          | DOM_CharacterData::~DOM_CharacterData ( | ) |  |  
  
    |  | 
Destructor for DOM_CharacterData.
 
The object being destroyed is the reference to the Character Data node, not the character data itself.      |  
 
  
    | 
        
          | DOM_CharacterData::DOM_CharacterData ( | CharacterDataImpl * impl )  [protected] |  |  
 Member Function Documentation
 
  
    | 
        
          | void DOM_CharacterData::appendData ( | const DOMString & arg ) |  |  
  
    |  | 
Append the string to the end of the character data of the node.
 
Upon success, dataprovides access to the concatenation ofdataand theDOMStringspecified. 
Parameters: 
 
Exceptions: 
| DOMException | NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. | 
 |  
 
  
    | 
        
          | void DOM_CharacterData::deleteData ( | unsigned int offset, |  
          |  | unsigned int count ) |  |  
  
    |  | 
Remove a range of characters from the node.
 
Upon success,  dataandlengthreflect the change. 
Parameters: 
| offset | The offset from which to remove characters. |  | count | The number of characters to delete. If the sum of offsetandcountexceedslengththen all characters fromoffsetto the end of the data  are deleted. | 
 
Exceptions: 
| DOMException | INDEX_SIZE_ERR: Raised if the specified offset is negative or greater  than the number of characters in data, or if the  specifiedcountis negative.NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 | 
 |  
 
  
    | 
        
          | DOMString DOM_CharacterData::getData ( | ) const |  |  
  
    |  | 
Returns the character data of the node that implements this interface.
 
The DOM implementation may not put arbitrary limits on the amount of data that  may be stored in a CharacterDatanode. However,  implementation limits may mean that the entirety of a node's data may  not fit into a singleDOMString. In such cases, the user  may callsubstringDatato retrieve the data in  appropriately sized pieces. 
Exceptions: 
| DOMException | NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. |  | DOMException | DOMSTRING_SIZE_ERR: Raised when it would return more characters than  fit in a DOMStringvariable on the implementation  platform. | 
 |  
 
  
    | 
        
          | unsigned int DOM_CharacterData::getLength ( | ) const |  |  
  
    |  | 
Returns the number of characters that are available through dataand thesubstringDatamethod below. 
This may have the value  zero, i.e., CharacterDatanodes may be empty. |  
 
  
    | 
        
          | void DOM_CharacterData::insertData ( | unsigned int offset, |  
          |  | const DOMString & arg ) |  |  
  
    |  | 
Insert a string at the specified character offset.
 
 
Parameters: 
| offset | The character offset at which to insert. |  | arg | The DOMStringto insert. | 
 
Exceptions: 
| DOMException | INDEX_SIZE_ERR: Raised if the specified offset is negative or greater  than the number of characters in data.NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 | 
 |  
 
  
    | 
        
          | DOM_CharacterData & DOM_CharacterData::operator= ( | const DOM_NullPtr * val ) |  |  
  
    |  | 
Assignment operator.
 
This overloaded variant is provided for the sole purpose of setting a DOM_Node reference variable to zero. Nulling out a reference variable in this way will decrement the reference count on the underlying Node object that the variable formerly referenced. This effect is normally obtained when reference variable goes out of scope, but zeroing them can be useful for global instances, or for local instances that will remain in scope for an extended time, when the storage belonging to the underlying node needs to be reclaimed. 
Parameters: 
| val. | Only a value of 0, or null, is allowed. | 
 
Reimplemented from DOM_Node.
 
Reimplemented in DOM_CDATASection, DOM_Comment, and DOM_Text.     |  
 
  
    | 
        
          | DOM_CharacterData & DOM_CharacterData::operator= ( | const DOM_CharacterData & other ) |  |  
  
    |  | 
Assignment operator.
 
 
Parameters: 
| other | The object to be copied | 
 |  
 
  
    | 
        
          | void DOM_CharacterData::replaceData ( | unsigned int offset, |  
          |  | unsigned int count, |  
          |  | const DOMString & arg ) |  |  
  
    |  | 
Replace the characters starting at the specified character offset with the specified string.
 
 
Parameters: 
| offset | The offset from which to start replacing. |  | count | The number of characters to replace. If the sum of offsetandcountexceedslength, then all characters to the end of the data are replaced (i.e., the  effect is the same as aremovemethod call with the same  range, followed by anappendmethod invocation). |  | arg | The DOMStringwith which the range must be  replaced. | 
 
Exceptions: 
| DOMException | INDEX_SIZE_ERR: Raised if the specified offset is negative or greater  than the number of characters in data, or if the  specifiedcountis negative.NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 | 
 |  
 
  
    | 
        
          | void DOM_CharacterData::setData ( | const DOMString & data ) |  |  
  
    |  | 
Sets the character data of the node that implements this interface.
 
 
Parameters: 
 |  
 
  
    | 
        
          | DOMString DOM_CharacterData::substringData ( | unsigned int offset, |  
          |  | unsigned int count ) const |  |  
  
    |  | 
Extracts a range of data from the node.
 
 
Parameters: 
| offset | Start offset of substring to extract. |  | count | The number of characters to extract. | 
 
Returns: 
 The specified substring. If the sum of offsetandcountexceeds thelength, then all  characters to the end of the data are returned.
 
Exceptions: 
| DOMException | INDEX_SIZE_ERR: Raised if the specified offset is negative or greater  than the number of characters in data, or if the  specifiedcountis negative.DOMSTRING_SIZE_ERR: Raised if the specified range of text does not  fit into a
 DOMString. | 
 |  The documentation for this class was generated from the following file:
 |