URLInputSource.hpp
Go to the documentation of this file.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id$
*/
#if !defined(XERCESC_INCLUDE_GUARD_URLINPUTSOURCE_HPP)
#define XERCESC_INCLUDE_GUARD_URLINPUTSOURCE_HPP
#include <xercesc/util/XMLURL.hpp>
#include <xercesc/sax/InputSource.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class BinInputStream;
class XMLPARSER_EXPORT URLInputSource : public InputSource
{
public :
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
URLInputSource
(
const XMLURL& urlId
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
URLInputSource
(
const XMLCh* const baseId
, const XMLCh* const systemId
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
URLInputSource
(
const XMLCh* const baseId
, const XMLCh* const systemId
, const XMLCh* const publicId
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
URLInputSource
(
const XMLCh* const baseId
, const char* const systemId
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
URLInputSource
(
const XMLCh* const baseId
, const char* const systemId
, const char* const publicId
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
~URLInputSource();
// -----------------------------------------------------------------------
// Virtual input source interface
// -----------------------------------------------------------------------
BinInputStream* makeStream() const;
// -----------------------------------------------------------------------
// Getter methods
// -----------------------------------------------------------------------
const XMLURL& urlSrc() const;
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
URLInputSource(const URLInputSource&);
URLInputSource& operator=(const URLInputSource&);
// -----------------------------------------------------------------------
// Private data members
//
// fURL
// This is the URL created from the passed ids.
// -----------------------------------------------------------------------
XMLURL fURL;
};
inline const XMLURL& URLInputSource::urlSrc() const
{
return fURL;
}
XERCES_CPP_NAMESPACE_END
#endif
InputSource.hpp
XMLURL.hpp
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition XercesDefs.hpp:163
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
XMLCh
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
BinInputStream
Definition BinInputStream.hpp:30
InputSource
A single input source for an XML entity.
Definition InputSource.hpp:63
MemoryManager
Configurable memory manager.
Definition MemoryManager.hpp:40
URLInputSource
This class is a derivative of the standard InputSource class.
Definition URLInputSource.hpp:48
URLInputSource::URLInputSource
URLInputSource(const XMLCh *const baseId, const char *const systemId, const char *const publicId, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
This constructor is identical to the third constructor above, except that it accepts the relative and...
URLInputSource::URLInputSource
URLInputSource(const XMLCh *const baseId, const char *const systemId, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
This constructor is identical to the second constructor above, except that it accepts the relative sy...
URLInputSource::URLInputSource
URLInputSource(const XMLCh *const baseId, const XMLCh *const systemId, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
This constructor takes a base system id URL and a possibly relative system id.
URLInputSource::~URLInputSource
~URLInputSource()
URLInputSource::URLInputSource
URLInputSource(const XMLCh *const baseId, const XMLCh *const systemId, const XMLCh *const publicId, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
This constructor is identical to the previous one, except that it also allows you to set a public id ...
URLInputSource::makeStream
BinInputStream * makeStream() const
This method will return a binary input stream derivative that will parse from the source referred to ...
URLInputSource::urlSrc
const XMLURL & urlSrc() const
This method will return a const reference to the URL member which contains the system id in pre-parse...
Definition URLInputSource.hpp:229
URLInputSource::URLInputSource
URLInputSource(const XMLURL &urlId, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
This constructor accepts an already built URL.
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition PlatformUtils.hpp:121
XMLURL
Definition XMLURL.hpp:36