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

InputSource.cpp

Go to the documentation of this file.
00001 // -*- C++ -*- $Id: InputSource.cpp,v 1.1.1.1 2003/02/21 18:36:32 chad Exp $
00002 
00003 #include "ACEXML/common/InputSource.h"
00004 #include "ace/ACE.h"
00005 
00006 ACEXML_InputSource::ACEXML_InputSource (void)
00007   : publicId_ (0),
00008     systemId_ (0),
00009     charStream_ (0),
00010     encoding_ (0)
00011 {
00012 }
00013 
00014 ACEXML_InputSource::ACEXML_InputSource (ACEXML_CharStream *stm)
00015   : publicId_ (0),
00016     systemId_ (0),
00017     charStream_ (stm),
00018     encoding_ (0)
00019 {
00020   this->setEncoding (stm->getEncoding());
00021 }
00022 
00023   /*
00024    * Create a new input source with a character stream.
00025    * /
00026     InputSource (Reader);
00027   */
00028 
00029 ACEXML_InputSource::ACEXML_InputSource (const ACEXML_Char *systemId)
00030   : systemId_ (ACE::strnew (systemId))
00031 {
00032 }
00033 
00034 ACEXML_InputSource::~ACEXML_InputSource (void)
00035 {
00036   delete[] this->publicId_;
00037   delete[] this->systemId_;
00038   delete this->charStream_;
00039   delete[] this->encoding_;
00040 }
00041 
00042 ACEXML_CharStream *
00043 ACEXML_InputSource::getCharStream (void)
00044 {
00045   return this->charStream_;
00046 }
00047 
00048   /*
00049    * Get the character stream for this input source.
00050    * /
00051    virtual Reader *getCharacterStream (void);
00052   */
00053 
00054 const ACEXML_Char *
00055 ACEXML_InputSource::getEncoding (void)
00056 {
00057   return this->encoding_;
00058 }
00059 
00060 const ACEXML_Char *
00061 ACEXML_InputSource::getPublicId (void)
00062 {
00063   return this->publicId_;
00064 }
00065 
00066 const ACEXML_Char *
00067 ACEXML_InputSource::getSystemId (void)
00068 {
00069   return this->systemId_;
00070 }
00071 
00072 void
00073 ACEXML_InputSource::setCharStream (ACEXML_CharStream *stm)
00074 {
00075   delete this->charStream_;
00076   this->charStream_ = stm;
00077 }
00078 
00079   /*
00080    * Set the character stream for this input source.
00081    *
00082   */
00083 
00084 void
00085 ACEXML_InputSource::setEncoding (const ACEXML_Char *encoding)
00086 {
00087   this->encoding_ = ACE::strnew (encoding);
00088 }
00089 
00090 void
00091 ACEXML_InputSource::setPublicId (const ACEXML_Char *publicId)
00092 {
00093   this->publicId_ = ACE::strnew (publicId);
00094 }
00095 
00096 void
00097 ACEXML_InputSource::setSystemId (const ACEXML_Char *systemId)
00098 {
00099   this->systemId_ = ACE::strnew (systemId);
00100 }

Generated on Mon Jun 16 13:23:22 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002