2 Copyright (C) 2000-2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo 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 OGo 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 OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #include "DOMCharacterData.h"
26 @implementation DOMCharacterData
28 - (id)initWithString:(NSString *)_s {
29 if ((self = [super init])) {
30 self->data = [_s copy];
41 - (void)setData:(NSString *)_data {
43 self->data = [_data copy];
51 return [self->data length];
56 - (NSString *)substringData:(unsigned)_offset count:(unsigned)_count {
62 return [[self data] substringWithRange:r];
65 - (void)appendData:(NSString *)_data {
68 self->data = old ? [old stringByAppendingString:_data] : _data;
72 - (void)insertData:(NSString *)_data offset:(unsigned)_offset {
73 [self doesNotRecognizeSelector:_cmd];
76 - (void)deleteData:(unsigned)_offset count:(unsigned)_count {
83 new = [self->data substringWithRange:r];
85 self->data = [new copy];
89 - (void)replaceData:(unsigned)_offset count:(unsigned)_c with:(NSString *)_s {
90 [self doesNotRecognizeSelector:_cmd];
95 - (void)_domNodeRegisterParentNode:(id)_parent {
96 self->parent = _parent;
98 - (void)_domNodeForgetParentNode:(id)_parent {
99 if (_parent == self->parent)
100 /* the node's parent was deallocated */
107 @end /* DOMCharacterData */
109 @implementation DOMCharacterData(QPValues)
111 - (NSException *)setQueryPathValue:(id)_value {
112 [self setData:[_value stringValue]];
115 - (id)queryPathValue {
119 @end /* DOMCharacterData(QPValues) */