Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACEXML_InputSource Class Reference

ACEXML_InputSource encapsulates the actual input stream with some added information. More...

#include "ACEXML/common/InputSource.h"

Collaboration diagram for ACEXML_InputSource:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACEXML_InputSource (void)
 ACEXML_InputSource (ACEXML_CharStream *stream)
 ACEXML_InputSource (const ACEXML_Char *systemId)
virtual ~ACEXML_InputSource (void)
virtual ACEXML_CharStreamgetCharStream (void)
virtual const ACEXML_ChargetEncoding (void)
virtual const ACEXML_ChargetPublicId (void)
virtual const ACEXML_ChargetSystemId (void)
virtual void setCharStream (ACEXML_CharStream *charStream)
virtual void setEncoding (const ACEXML_Char *encoding)
virtual void setPublicId (const ACEXML_Char *publicId)
virtual void setSystemId (const ACEXML_Char *systemId)

Private Attributes

ACEXML_CharpublicId_
ACEXML_CharsystemId_
ACEXML_CharStreamcharStream_
ACEXML_Charencoding_

Detailed Description

ACEXML_InputSource encapsulates the actual input stream with some added information.

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, a byte stream (possibly with a specified encoding), and/or a character stream.

There are two places that the application will deliver this input source to the parser: as the argument to the Parser.parse method, or as the return value of the EntityResolver.resolveEntity method.

The SAX parser will use the InputSource object to determine how to read XML input. If there is a character stream available, the parser will read that stream directly; if not, the parser will use a byte stream, if available; if neither a character stream nor a byte stream is available, the parser will attempt to open a URI connection to the resource identified by the system identifier.

An InputSource object belongs to the application: the SAX parser shall never modify it in any way (it may modify a copy if necessary).

See also:
ACEXML_CharStream

Definition at line 53 of file InputSource.h.


Constructor & Destructor Documentation

ACEXML_InputSource::ACEXML_InputSource void   
 

Definition at line 6 of file InputSource.cpp.

00007   : publicId_ (0),
00008     systemId_ (0),
00009     charStream_ (0),
00010     encoding_ (0)
00011 {
00012 }

ACEXML_InputSource::ACEXML_InputSource ACEXML_CharStream   stream
 

Definition at line 14 of file InputSource.cpp.

References setEncoding.

00015   : publicId_ (0),
00016     systemId_ (0),
00017     charStream_ (stm),
00018     encoding_ (0)
00019 {
00020   this->setEncoding (stm->getEncoding());
00021 }

ACEXML_InputSource::ACEXML_InputSource const ACEXML_Char   systemId
 

Definition at line 29 of file InputSource.cpp.

References ACEXML_Char.

00030   : systemId_ (ACE::strnew (systemId))
00031 {
00032 }

ACEXML_InputSource::~ACEXML_InputSource void    [virtual]
 

Definition at line 34 of file InputSource.cpp.

References charStream_, encoding_, publicId_, and systemId_.

00035 {
00036   delete[] this->publicId_;
00037   delete[] this->systemId_;
00038   delete this->charStream_;
00039   delete[] this->encoding_;
00040 }


Member Function Documentation

ACEXML_CharStream * ACEXML_InputSource::getCharStream void    [virtual]
 

Definition at line 43 of file InputSource.cpp.

References charStream_.

00044 {
00045   return this->charStream_;
00046 }

const ACEXML_Char * ACEXML_InputSource::getEncoding void    [virtual]
 

Definition at line 55 of file InputSource.cpp.

References encoding_.

00056 {
00057   return this->encoding_;
00058 }

const ACEXML_Char * ACEXML_InputSource::getPublicId void    [virtual]
 

Definition at line 61 of file InputSource.cpp.

References publicId_.

00062 {
00063   return this->publicId_;
00064 }

const ACEXML_Char * ACEXML_InputSource::getSystemId void    [virtual]
 

Definition at line 67 of file InputSource.cpp.

References systemId_.

00068 {
00069   return this->systemId_;
00070 }

void ACEXML_InputSource::setCharStream ACEXML_CharStream   charStream [virtual]
 

Definition at line 73 of file InputSource.cpp.

References charStream_.

00074 {
00075   delete this->charStream_;
00076   this->charStream_ = stm;
00077 }

void ACEXML_InputSource::setEncoding const ACEXML_Char   encoding [virtual]
 

Definition at line 85 of file InputSource.cpp.

References ACEXML_Char, encoding_, and ACE::strnew.

Referenced by ACEXML_InputSource.

00086 {
00087   this->encoding_ = ACE::strnew (encoding);
00088 }

void ACEXML_InputSource::setPublicId const ACEXML_Char   publicId [virtual]
 

Definition at line 91 of file InputSource.cpp.

References ACEXML_Char, publicId_, and ACE::strnew.

00092 {
00093   this->publicId_ = ACE::strnew (publicId);
00094 }

void ACEXML_InputSource::setSystemId const ACEXML_Char   systemId [virtual]
 

Definition at line 97 of file InputSource.cpp.

References ACEXML_Char, ACE::strnew, and systemId_.

00098 {
00099   this->systemId_ = ACE::strnew (systemId);
00100 }


Member Data Documentation

ACEXML_CharStream* ACEXML_InputSource::charStream_ [private]
 

Definition at line 123 of file InputSource.h.

Referenced by getCharStream, setCharStream, and ~ACEXML_InputSource.

ACEXML_Char* ACEXML_InputSource::encoding_ [private]
 

Definition at line 124 of file InputSource.h.

Referenced by getEncoding, setEncoding, and ~ACEXML_InputSource.

ACEXML_Char* ACEXML_InputSource::publicId_ [private]
 

Definition at line 121 of file InputSource.h.

Referenced by getPublicId, setPublicId, and ~ACEXML_InputSource.

ACEXML_Char* ACEXML_InputSource::systemId_ [private]
 

Definition at line 122 of file InputSource.h.

Referenced by getSystemId, setSystemId, and ~ACEXML_InputSource.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:27:10 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002