1 | /* |
---|
2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
---|
3 | * contributor license agreements. See the NOTICE file distributed with |
---|
4 | * this work for additional information regarding copyright ownership. |
---|
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
6 | * (the "License"); you may not use this file except in compliance with |
---|
7 | * the License. You may obtain a copy of the License at |
---|
8 | * |
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
10 | * |
---|
11 | * Unless required by applicable law or agreed to in writing, software |
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
14 | * See the License for the specific language governing permissions and |
---|
15 | * limitations under the License. |
---|
16 | */ |
---|
17 | |
---|
18 | /* |
---|
19 | * $Id: DOMLSInputImpl.hpp 641193 2008-03-26 08:06:57Z borisk $ |
---|
20 | */ |
---|
21 | |
---|
22 | #if !defined(XERCESC_INCLUDE_GUARD_DOMLSINPUTIMPL_HPP) |
---|
23 | #define XERCESC_INCLUDE_GUARD_DOMLSINPUTIMPL_HPP |
---|
24 | |
---|
25 | #include <xercesc/dom/DOM.hpp> |
---|
26 | #include <xercesc/dom/DOMLSInput.hpp> |
---|
27 | |
---|
28 | XERCES_CPP_NAMESPACE_BEGIN |
---|
29 | |
---|
30 | class CDOM_EXPORT DOMLSInputImpl : public XMemory, public DOMLSInput |
---|
31 | { |
---|
32 | |
---|
33 | public: |
---|
34 | |
---|
35 | DOMLSInputImpl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); |
---|
36 | ~DOMLSInputImpl(); |
---|
37 | |
---|
38 | virtual const XMLCh* getStringData() const; |
---|
39 | virtual InputSource* getByteStream() const; |
---|
40 | virtual const XMLCh* getEncoding() const; |
---|
41 | virtual const XMLCh* getPublicId() const; |
---|
42 | virtual const XMLCh* getSystemId() const; |
---|
43 | virtual const XMLCh* getBaseURI() const; |
---|
44 | |
---|
45 | virtual void setStringData(const XMLCh* data); |
---|
46 | virtual void setByteStream(InputSource* stream); |
---|
47 | virtual void setEncoding(const XMLCh* const encodingStr); |
---|
48 | virtual void setPublicId(const XMLCh* const publicId); |
---|
49 | virtual void setSystemId(const XMLCh* const systemId); |
---|
50 | virtual void setBaseURI(const XMLCh* const baseURI); |
---|
51 | |
---|
52 | virtual void setIssueFatalErrorIfNotFound(bool flag); |
---|
53 | virtual bool getIssueFatalErrorIfNotFound() const; |
---|
54 | virtual void release(); |
---|
55 | |
---|
56 | |
---|
57 | private: |
---|
58 | /** unimplemented copy ctor and assignment operator */ |
---|
59 | DOMLSInputImpl(const DOMLSInputImpl&); |
---|
60 | DOMLSInputImpl & operator = (const DOMLSInputImpl&); |
---|
61 | |
---|
62 | protected: |
---|
63 | // ----------------------------------------------------------------------- |
---|
64 | // Private data members |
---|
65 | // |
---|
66 | // fStringData |
---|
67 | // We don't own it |
---|
68 | // |
---|
69 | // fByteStream |
---|
70 | // We don't own it |
---|
71 | // |
---|
72 | // fEncoding |
---|
73 | // We own it |
---|
74 | // |
---|
75 | // fPublicId |
---|
76 | // We own it |
---|
77 | // |
---|
78 | // fSystemId |
---|
79 | // We own it |
---|
80 | // |
---|
81 | // fBaseURI |
---|
82 | // We own it |
---|
83 | // |
---|
84 | // ----------------------------------------------------------------------- |
---|
85 | |
---|
86 | const XMLCh *fStringData; |
---|
87 | InputSource *fByteStream; |
---|
88 | XMLCh *fEncoding; |
---|
89 | XMLCh *fPublicId; |
---|
90 | XMLCh *fSystemId; |
---|
91 | XMLCh *fBaseURI; |
---|
92 | bool fIssueFatalErrorIfNotFound; |
---|
93 | MemoryManager* fMemoryManager; |
---|
94 | }; |
---|
95 | |
---|
96 | inline const XMLCh* DOMLSInputImpl::getStringData() const |
---|
97 | { |
---|
98 | return fStringData; |
---|
99 | } |
---|
100 | |
---|
101 | inline InputSource* DOMLSInputImpl::getByteStream() const |
---|
102 | { |
---|
103 | return fByteStream; |
---|
104 | } |
---|
105 | |
---|
106 | inline const XMLCh* DOMLSInputImpl::getEncoding() const |
---|
107 | { |
---|
108 | return fEncoding; |
---|
109 | } |
---|
110 | |
---|
111 | inline const XMLCh* DOMLSInputImpl::getPublicId() const |
---|
112 | { |
---|
113 | return fPublicId; |
---|
114 | } |
---|
115 | |
---|
116 | inline const XMLCh* DOMLSInputImpl::getSystemId() const |
---|
117 | { |
---|
118 | return fSystemId; |
---|
119 | } |
---|
120 | |
---|
121 | inline const XMLCh* DOMLSInputImpl::getBaseURI() const |
---|
122 | { |
---|
123 | return fBaseURI; |
---|
124 | } |
---|
125 | |
---|
126 | inline bool DOMLSInputImpl::getIssueFatalErrorIfNotFound() const |
---|
127 | { |
---|
128 | return fIssueFatalErrorIfNotFound; |
---|
129 | } |
---|
130 | |
---|
131 | |
---|
132 | XERCES_CPP_NAMESPACE_END |
---|
133 | |
---|
134 | #endif |
---|