Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:27:02

0001 /*
0002  * Licensed to the Apache Software Foundation (ASF) under one or more
0003  * contributor license agreements.  See the NOTICE file distributed with
0004  * this work for additional information regarding copyright ownership.
0005  * The ASF licenses this file to You under the Apache License, Version 2.0
0006  * (the "License"); you may not use this file except in compliance with
0007  * the License.  You may obtain a copy of the License at
0008  *
0009  *      http://www.apache.org/licenses/LICENSE-2.0
0010  *
0011  * Unless required by applicable law or agreed to in writing, software
0012  * distributed under the License is distributed on an "AS IS" BASIS,
0013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014  * See the License for the specific language governing permissions and
0015  * limitations under the License.
0016  */
0017 
0018 /*
0019  * $Id$
0020  */
0021 
0022 #if !defined(XERCESC_INCLUDE_GUARD_DOMTEXTIMPL_HPP)
0023 #define XERCESC_INCLUDE_GUARD_DOMTEXTIMPL_HPP
0024 
0025 //
0026 //  This file is part of the internal implementation of the C++ XML DOM.
0027 //  It should NOT be included or used directly by application programs.
0028 //
0029 //  Applications should include the file <xercesc/dom/DOM.hpp> for the entire
0030 //  DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class
0031 //  name is substituded for the *.
0032 //
0033 
0034 
0035 
0036 #include <xercesc/util/XercesDefs.hpp>
0037 #include <xercesc/dom/DOMText.hpp>
0038 #include "DOMNodeBase.hpp"
0039 #include "DOMChildNode.hpp"
0040 #include "DOMNodeImpl.hpp"
0041 #include "DOMCharacterDataImpl.hpp"
0042 
0043 XERCES_CPP_NAMESPACE_BEGIN
0044 
0045 
0046 class CDOM_EXPORT DOMTextImpl: public DOMText, public HasDOMNodeImpl, public HasDOMChildImpl {
0047 public:
0048     DOMNodeImpl             fNode;
0049     DOMChildNode            fChild;
0050     DOMCharacterDataImpl    fCharacterData;
0051 
0052 public:
0053     DOMTextImpl(DOMDocument* ownerDoc, const XMLCh* data);
0054     DOMTextImpl(DOMDocument *ownerDoc, const XMLCh* data, XMLSize_t n);
0055     DOMTextImpl(const DOMTextImpl& other, bool deep=false);
0056 
0057     virtual                ~DOMTextImpl();
0058     virtual DOMText*        splitText(XMLSize_t offset);
0059     // DOM Level 3
0060     virtual bool            getIsElementContentWhitespace() const;
0061     virtual const XMLCh*    getWholeText() const;
0062     virtual DOMText*        replaceWholeText(const XMLCh* content);
0063 
0064     // non-standard extension
0065     virtual bool            isIgnorableWhitespace() const;
0066 
0067 public:
0068     // Declare the functions coming from DOMNode.
0069     DOMNODE_FUNCTIONS;
0070 
0071     // Add accessors for implementation bits.
0072     DOMNODEIMPL_DECL;
0073     DOMCHILDIMPL_DECL;
0074 
0075 public:
0076     // All of the functions coming from DOMCharacterData
0077     virtual const XMLCh*    getData() const;
0078     virtual XMLSize_t       getLength() const;
0079     virtual const XMLCh*    substringData(XMLSize_t offset,
0080                                           XMLSize_t count) const;
0081     virtual void            appendData(const XMLCh *arg);
0082     virtual void            insertData(XMLSize_t offset, const  XMLCh *arg);
0083     virtual void            deleteData(XMLSize_t offset,
0084                                        XMLSize_t count);
0085     virtual void            replaceData(XMLSize_t offset,
0086                                         XMLSize_t count,
0087                                         const XMLCh *arg);
0088     virtual void            setData(const XMLCh *data);
0089 
0090     // Non-standard extension.
0091     //
0092     virtual void            appendData(const XMLCh *arg, XMLSize_t n);
0093     void                    appendDataFast(const XMLCh *arg, XMLSize_t n);
0094 
0095 protected:
0096     virtual void            setIgnorableWhitespace(bool ignorable);
0097     friend class            AbstractDOMParser;
0098 
0099 private:
0100     // -----------------------------------------------------------------------
0101     // Unimplemented constructors and operators
0102     // -----------------------------------------------------------------------
0103     DOMTextImpl & operator = (const DOMTextImpl &);
0104 };
0105 
0106 XERCES_CPP_NAMESPACE_END
0107 
0108 #endif