Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgxml::InputSource Class Reference
[XML SAX Module]

#include <qgarlib/sax/InputSource.H>

List of all members.


Detailed Description

A single input source for an XML entity.

This class allows a SAX application to encapsulate information about an input source in a single object, which may include a public identifier, a system identifier, and/or a byte stream.

This class is an adaptation for C++ of the interface of the same name implemented in the Java SAX API (http://www.saxproject.org).

Author:
Jan Rendek (Adaptation)
Date:
March 12, 2003 10:00
Since:
Qgar 2.1.1

Definition at line 69 of file InputSource.H.

Public Member Functions

Constructors
 InputSource ()
 Default constructor.
 InputSource (std::istream &byteStream)
 Create a new input source from an input stream.
 InputSource (const std::string &systemId)
 Create a new input source with a system identifier.
 InputSource (const InputSource &rhs)
 Copy-constructor.
Destructor
virtual ~InputSource ()
 Destructor.
Access
virtual std::istream * getByteStream ()
 Get the byte stream for this input source.
virtual std::string getEncoding ()
 Get the character encoding for a byte stream or URI.
virtual std::string getPublicId ()
 Get the public identifier for this input source.
virtual std::string getSystemId ()
 Get the system identifier for this input source.
Transformation
virtual void setByteStream (std::istream &byteStream)
 Set the byte stream for this input source.
virtual void setEncoding (const std::string &encoding)
 Set the character encoding, if known.
virtual void setPublicId (const std::string &publicId)
 Set the public identifier for this input source.
virtual void setSystemId (const std::string &systemId)
 Set the system identifier for this input source.
Operators
InputSourceoperator= (const InputSource &rhs)
 Assignment operator.

Protected Attributes

std::istream * _byteStream
 The input stream the input source gets its data from.
std::string _systemId
 The system ID of this input source, empty if unknown.
std::string _publicId
 The public TD of this input source, empty if unknown.
std::string _encoding
 The encoding of this input source, empty if unknown.


Constructor & Destructor Documentation

qgxml::InputSource::InputSource  )  [inline]
 

Default constructor.

Definition at line 85 of file InputSource.H.

qgxml::InputSource::InputSource std::istream &  byteStream  )  [inline]
 

Create a new input source from an input stream.

Parameters:
byteStream The raw byte stream containing the document.

Definition at line 94 of file InputSource.H.

qgxml::InputSource::InputSource const std::string &  systemId  )  [inline]
 

Create a new input source with a system identifier.

Parameters:
systemId The system identifier (URI).

Definition at line 104 of file InputSource.H.

qgxml::InputSource::InputSource const InputSource rhs  )  [inline]
 

Copy-constructor.

Definition at line 112 of file InputSource.H.

virtual qgxml::InputSource::~InputSource  )  [inline, virtual]
 

Destructor.

Definition at line 129 of file InputSource.H.


Member Function Documentation

virtual std::istream* qgxml::InputSource::getByteStream  )  [inline, virtual]
 

Get the byte stream for this input source.

Returns:
The byte stream, or null if none was supplied.

Definition at line 144 of file InputSource.H.

References _byteStream.

Referenced by qgxml::XercesQgarInputSourceAdaptor::makeStream().

virtual std::string qgxml::InputSource::getEncoding  )  [inline, virtual]
 

Get the character encoding for a byte stream or URI.

Returns:
The encoding.

Definition at line 153 of file InputSource.H.

References _encoding.

virtual std::string qgxml::InputSource::getPublicId  )  [inline, virtual]
 

Get the public identifier for this input source.

Returns:
The public identifier, or an empty string if none was supplied.

Definition at line 161 of file InputSource.H.

References _publicId.

virtual std::string qgxml::InputSource::getSystemId  )  [inline, virtual]
 

Get the system identifier for this input source.

Returns:
The system identifier, or an empty string if none was supplied.

Definition at line 170 of file InputSource.H.

References _systemId.

InputSource& qgxml::InputSource::operator= const InputSource rhs  )  [inline]
 

Assignment operator.

Definition at line 223 of file InputSource.H.

References _byteStream, _encoding, _publicId, and _systemId.

virtual void qgxml::InputSource::setByteStream std::istream &  byteStream  )  [inline, virtual]
 

Set the byte stream for this input source.

Parameters:
byteStream An std::inputstream containing an XML document or other entity.

Definition at line 187 of file InputSource.H.

References _byteStream.

virtual void qgxml::InputSource::setEncoding const std::string &  encoding  )  [inline, virtual]
 

Set the character encoding, if known.

Parameters:
encoding A string describing the character encoding.

Definition at line 195 of file InputSource.H.

References _encoding.

virtual void qgxml::InputSource::setPublicId const std::string &  publicId  )  [inline, virtual]
 

Set the public identifier for this input source.

Parameters:
publicId The public identifier as a string.

Definition at line 203 of file InputSource.H.

References _publicId.

virtual void qgxml::InputSource::setSystemId const std::string &  systemId  )  [inline, virtual]
 

Set the system identifier for this input source.

Parameters:
systemId The system identifier as a string.

Definition at line 211 of file InputSource.H.

References _systemId.


Member Data Documentation

std::istream* qgxml::InputSource::_byteStream [protected]
 

The input stream the input source gets its data from.

Definition at line 244 of file InputSource.H.

Referenced by getByteStream(), operator=(), and setByteStream().

std::string qgxml::InputSource::_encoding [protected]
 

The encoding of this input source, empty if unknown.

Definition at line 253 of file InputSource.H.

Referenced by getEncoding(), operator=(), and setEncoding().

std::string qgxml::InputSource::_publicId [protected]
 

The public TD of this input source, empty if unknown.

Definition at line 250 of file InputSource.H.

Referenced by getPublicId(), operator=(), and setPublicId().

std::string qgxml::InputSource::_systemId [protected]
 

The system ID of this input source, empty if unknown.

Definition at line 247 of file InputSource.H.

Referenced by getSystemId(), operator=(), and setSystemId().


The documentation for this class was generated from the following file: