ACEXML_Parser_Context Class Reference

#include <ParserContext.h>

Collaboration diagram for ACEXML_Parser_Context:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACEXML_Parser_Context ()
 Default constructor.

 ACEXML_Parser_Context (ACEXML_InputSource *instream, ACEXML_LocatorImpl *locator)
 Constructor which initializes the context.

bool operator!= (const ACEXML_Parser_Context &src)
 Comparison operator.

virtual ~ACEXML_Parser_Context ()
 Destructor.

void reset (void)
virtual ACEXML_InputSourcegetInputSource (void)
 Get the underlying input source.

virtual ACEXML_LocatorImplgetLocator (void)
 Get the underlying locator.

virtual void setInputSource (ACEXML_InputSource *ip)
 Set the underlying input source.

virtual void setLocator (ACEXML_LocatorImpl *locator)
 Set the underlying locator.


Private Member Functions

 ACEXML_Parser_Context (const ACEXML_Parser_Context &src)
 Copy constructor.

ACEXML_Parser_Contextoperator= (const ACEXML_Parser_Context &src)
 Assignment operator.


Private Attributes

ACEXML_InputSourceinstream_
 Current input char stream.

ACEXML_LocatorImpllocator_
 Current Locator which provides line no., column no. systemId and publicId.


Constructor & Destructor Documentation

ACEXML_INLINE ACEXML_Parser_Context::ACEXML_Parser_Context  ) 
 

Default constructor.

Definition at line 8 of file ParserContext.inl.

00009   : instream_ (0),
00010     locator_ (0)
00011 {
00012 
00013 }

ACEXML_INLINE ACEXML_Parser_Context::ACEXML_Parser_Context ACEXML_InputSource instream,
ACEXML_LocatorImpl locator
 

Constructor which initializes the context.

Definition at line 16 of file ParserContext.inl.

00018   : instream_ (instream),
00019     locator_ (locator)
00020 {
00021 
00022 }

ACEXML_Parser_Context::~ACEXML_Parser_Context  )  [virtual]
 

Destructor.

Definition at line 9 of file ParserContext.cpp.

References instream_.

00010 {
00011   delete this->instream_;
00012   this->instream_ = 0;
00013   delete this->locator_;
00014   this->locator_ = 0;
00015 }

ACEXML_INLINE ACEXML_Parser_Context::ACEXML_Parser_Context const ACEXML_Parser_Context src  )  [private]
 

Copy constructor.

Definition at line 25 of file ParserContext.inl.

00026   : instream_ (src.instream_),
00027     locator_ (src.locator_)
00028 {
00029 
00030 }


Member Function Documentation

ACEXML_INLINE ACEXML_InputSource * ACEXML_Parser_Context::getInputSource void   )  [virtual]
 

Get the underlying input source.

Definition at line 49 of file ParserContext.inl.

References instream_.

Referenced by ACEXML_Parser::get(), ACEXML_Parser::parse_encoding_decl(), ACEXML_Parser::peek(), and ACEXML_Parser::reset().

00050 {
00051   return this->instream_;
00052 }

ACEXML_INLINE ACEXML_LocatorImpl * ACEXML_Parser_Context::getLocator void   )  [virtual]
 

Get the underlying locator.

Definition at line 55 of file ParserContext.inl.

Referenced by ACEXML_Parser::get(), and ACEXML_Parser::normalize_systemid().

00056 {
00057   return this->locator_;
00058 }

ACEXML_INLINE bool ACEXML_Parser_Context::operator!= const ACEXML_Parser_Context src  ) 
 

Comparison operator.

Definition at line 33 of file ParserContext.inl.

References instream_, and locator_.

00034 {
00035   return (this->instream_ != src.instream_ && this->locator_ != src.locator_);
00036 }

ACEXML_INLINE ACEXML_Parser_Context & ACEXML_Parser_Context::operator= const ACEXML_Parser_Context src  )  [private]
 

Assignment operator.

Definition at line 39 of file ParserContext.inl.

References instream_, and locator_.

00040 {
00041   ACEXML_Parser_Context tmp (src);
00042   std::swap (this->instream_, tmp.instream_);
00043   std::swap (this->locator_, tmp.locator_);
00044   return *this;
00045 }

ACEXML_INLINE void ACEXML_Parser_Context::reset void   ) 
 

Reset the parser context. This does not free up the memory. Only sets it to zero. Meant to be called after a context is pushed on to a stack.

Definition at line 73 of file ParserContext.inl.

References instream_.

00074 {
00075   this->instream_ = 0;
00076   this->locator_ = 0;
00077 }

ACEXML_INLINE void ACEXML_Parser_Context::setInputSource ACEXML_InputSource ip  )  [virtual]
 

Set the underlying input source.

Definition at line 61 of file ParserContext.inl.

References instream_.

Referenced by ACEXML_Parser::reset().

00062 {
00063   this->instream_ = ip;
00064 }

ACEXML_INLINE void ACEXML_Parser_Context::setLocator ACEXML_LocatorImpl locator  )  [virtual]
 

Set the underlying locator.

Definition at line 67 of file ParserContext.inl.

00068 {
00069   this->locator_ = locator;
00070 }


Member Data Documentation

ACEXML_InputSource* ACEXML_Parser_Context::instream_ [private]
 

Current input char stream.

Definition at line 72 of file ParserContext.h.

Referenced by getInputSource(), operator!=(), operator=(), reset(), setInputSource(), and ~ACEXML_Parser_Context().

ACEXML_LocatorImpl* ACEXML_Parser_Context::locator_ [private]
 

Current Locator which provides line no., column no. systemId and publicId.

Definition at line 75 of file ParserContext.h.

Referenced by operator!=(), and operator=().


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 13:05:05 2008 for ACEXML by doxygen 1.3.6