# Wrapper4InputSource.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Licensed to the Apache Software Foundation (ASF) under one or more
    00003  * contributor license agreements.  See the NOTICE file distributed with
    00004  * this work for additional information regarding copyright ownership.
    00005  * The ASF licenses this file to You under the Apache License, Version 2.0
    00006  * (the "License"); you may not use this file except in compliance with
    00007  * the License.  You may obtain a copy of the License at
    00008  *
    00009  *      http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  * Unless required by applicable law or agreed to in writing, software
    00012  * distributed under the License is distributed on an "AS IS" BASIS,
    00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  * See the License for the specific language governing permissions and
    00015  * limitations under the License.
    00016  */
    00017
    00018 /*
    00019  * $Id: Wrapper4InputSource.hpp 527149 2007-04-10 14:56:39Z amassari $
    00020  */
    00021
    00022 #if !defined(XERCESC_INCLUDE_GUARD_WRAPPER4INPUTSOURCE_HPP)
    00023 #define XERCESC_INCLUDE_GUARD_WRAPPER4INPUTSOURCE_HPP
    00024
    00025 #include <xercesc/dom/DOMLSInput.hpp>
    00026 #include <xercesc/util/PlatformUtils.hpp>
    00027
    00028 XERCES_CPP_NAMESPACE_BEGIN
    00029
    00030 class InputSource;
    00031
    00032
    00036 class XMLPARSER_EXPORT Wrapper4InputSource: public DOMLSInput
    00037 {
    00038 public:
    00041
    00053     Wrapper4InputSource(InputSource* const inputSource
    00054                         , const bool adoptFlag = true
    00055                         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
    00056
    00061     virtual ~Wrapper4InputSource();
    00063
    00064
    00065     // -----------------------------------------------------------------------
    00072     virtual const XMLCh* getStringData() const;
    00073
    00082     virtual InputSource* getByteStream() const;
    00084
    00085     // -----------------------------------------------------------------------
    00098     virtual const XMLCh* getEncoding() const;
    00099
    00100
    00108     const XMLCh* getPublicId() const;
    00109
    00110
    00120     const XMLCh* getSystemId() const;
    00121
    00132     const XMLCh* getBaseURI() const;
    00133
    00142     bool getIssueFatalErrorIfNotFound() const;
    00143
    00145
    00146
    00147     // -----------------------------------------------------------------------
    00154     virtual void setStringData(const XMLCh* data);
    00155
    00160     virtual void setByteStream(InputSource* stream);
    00161
    00174     void setEncoding(const XMLCh* const encodingStr);
    00175
    00176
    00189     void setPublicId(const XMLCh* const publicId);
    00190
    00206     void setSystemId(const XMLCh* const systemId);
    00207
    00218     void setBaseURI(const XMLCh* const baseURI);
    00219
    00232     void setIssueFatalErrorIfNotFound(bool flag);
    00233
    00240     void              release();
    00241
    00243
    00244
    00245 private:
    00246     // -----------------------------------------------------------------------
    00247     //  Unimplemented constructors and operators
    00248     // -----------------------------------------------------------------------
    00249     Wrapper4InputSource(const Wrapper4InputSource&);
    00250     Wrapper4InputSource& operator=(const Wrapper4InputSource&);
    00251
    00252     // -----------------------------------------------------------------------
    00253     //  Private data members
    00254     // -----------------------------------------------------------------------
    00255     bool         fAdoptInputSource;
    00256     InputSource* fInputSource;
    00257 };
    00258
    00259
    00260 // ---------------------------------------------------------------------------
    00261 //  Wrapper4InputSource: Getter methods
    00262 // ---------------------------------------------------------------------------
    00263 inline const XMLCh* Wrapper4InputSource::getBaseURI() const
    00264 {
    00265     return 0; // REVISIT - should we return an empty string?
    00266 }
    00267
    00268 inline const XMLCh* Wrapper4InputSource::getStringData() const
    00269 {
    00270     return 0;
    00271 }
    00272
    00273 // ---------------------------------------------------------------------------
    00274 //  Wrapper4InputSource: Setter methods
    00275 // ---------------------------------------------------------------------------
    00276 inline void Wrapper4InputSource::setBaseURI(const XMLCh* const)
    00277 {
    00278 }
    00279
    00280 inline void Wrapper4InputSource::setStringData(const XMLCh*)
    00281 {
    00282 }
    00283
    00284 inline void Wrapper4InputSource::setByteStream(InputSource*)
    00285 {
    00286 }
    00287
    00288 XERCES_CPP_NAMESPACE_END
    00289
    00290 #endif