00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
#ifndef _DOM_CharacterData_h_
00030
#define _DOM_CharacterData_h_
00031
00032
#include <dom/dom_node.h>
00033
00034
namespace DOM {
00035
00036
class DOMString;
00037
class CharacterDataImpl;
00038
00049 class KHTML_EXPORT CharacterData :
public Node
00050 {
00051
friend class CharacterDataImpl;
00052
00053
public:
00054 CharacterData();
00055 CharacterData(
const CharacterData &other);
00056 CharacterData(
const Node &other) :
Node()
00057 {(*this)=other;}
00058
00059 CharacterData & operator = (
const Node &other);
00060 CharacterData & operator = (
const CharacterData &other);
00061
00062 ~CharacterData();
00063
00080
DOMString data()
const;
00081
00088
void setData(
const DOMString & );
00089
00097
unsigned long length()
const;
00098
00120
DOMString substringData (
const unsigned long offset,
const unsigned long count );
00121
00136
void appendData (
const DOMString &arg );
00137
00154
void insertData (
const unsigned long offset,
const DOMString &arg );
00155
00178
void deleteData (
const unsigned long offset,
const unsigned long count );
00179
00206
void replaceData (
const unsigned long offset,
const unsigned long count,
const DOMString &arg );
00207
00208
protected:
00209 CharacterData(CharacterDataImpl *i);
00210 };
00211
00212
00213
class CommentImpl;
00214
00223 class KHTML_EXPORT Comment :
public CharacterData
00224 {
00225
friend class Document;
00226
friend class TextImpl;
00227
00228
public:
00229 Comment();
00230 Comment(
const Comment &other);
00231 Comment(
const Node &other) : CharacterData()
00232 {(*this)=other;}
00233
00234 Comment & operator = (
const Node &other);
00235 Comment & operator = (
const Comment &other);
00236
00237 ~Comment();
00238
00239
protected:
00240 Comment(CommentImpl *i);
00241 };
00242
00243
class TextImpl;
00244
00269 class KHTML_EXPORT Text :
public CharacterData
00270 {
00271
friend class Document;
00272
friend class TextImpl;
00273
00274
public:
00275 Text();
00276 Text(
const Text &other);
00277 Text(
const Node &other) : CharacterData()
00278 {(*this)=other;}
00279
00280 Text & operator = (
const Node &other);
00281 Text & operator = (
const Text &other);
00282
00283 ~Text();
00284
00304 Text splitText (
const unsigned long offset );
00305
00306
protected:
00307 Text(TextImpl *i);
00308
00309 };
00310
00311 }
00312
#endif