2 Copyright (C) 2000-2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #include "DOMCharacterData.h"
25 @implementation NGDOMCharacterData
27 - (id)initWithString:(NSString *)_s {
28 if ((self = [super init])) {
29 self->data = [_s copy];
40 - (void)setData:(NSString *)_data {
42 self->data = [_data copy];
50 return [self->data length];
55 - (NSString *)substringData:(unsigned)_offset count:(unsigned)_count {
61 return [[self data] substringWithRange:r];
64 - (void)appendData:(NSString *)_data {
67 self->data = old ? [old stringByAppendingString:_data] : _data;
71 - (void)insertData:(NSString *)_data offset:(unsigned)_offset {
72 [self doesNotRecognizeSelector:_cmd];
75 - (void)deleteData:(unsigned)_offset count:(unsigned)_count {
82 new = [self->data substringWithRange:r];
84 self->data = [new copy];
88 - (void)replaceData:(unsigned)_offset count:(unsigned)_c with:(NSString *)_s {
89 [self doesNotRecognizeSelector:_cmd];
94 - (void)_domNodeRegisterParentNode:(id)_parent {
95 self->parent = _parent;
97 - (void)_domNodeForgetParentNode:(id)_parent {
98 if (_parent == self->parent)
99 /* the node's parent was deallocated */
102 - (id<NSObject,DOMNode>)parentNode {
108 - (NSException *)setQueryPathValue:(id)_value {
109 [self setData:[_value stringValue]];
112 - (id)queryPathValue {
116 @end /* NGDOMCharacterData(QPValues) */