FDO API Reference Feature Data Objects

SaxContext.h

Go to the documentation of this file.
00001 #ifndef FDO_XML_SAXCONTEXT_H
00002 #define FDO_XML_SAXCONTEXT_H
00003 // 
00004 
00005 //
00006 // Copyright (C) 2004-2006  Autodesk, Inc.
00007 // 
00008 // This library is free software; you can redistribute it and/or
00009 // modify it under the terms of version 2.1 of the GNU Lesser
00010 // General Public License as published by the Free Software Foundation.
00011 // 
00012 // This library is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 // Lesser General Public License for more details.
00016 // 
00017 // You should have received a copy of the GNU Lesser General Public
00018 // License along with this library; if not, write to the Free Software
00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 //
00021 
00022 #include <FdoCommon.h>
00023 
00024 class FdoXmlReader;
00025 
00026 /// \brief
00027 /// FdoXmlSaxContext provides contextual information to the 
00028 /// FdoMathUtility callback implementations when an XML document parse
00029 /// is in progress. This class provides very rudimentary functionality such as
00030 /// error reporting and access to the FdoXmlReader doing the parse. Applications
00031 /// can pass extra information by sub-classing from this class.
00032 class FdoXmlSaxContext : public FdoContext
00033 {
00034 public:
00035     /// \brief
00036     /// Constructs the default Sax Context
00037     /// 
00038     /// \param reader 
00039     /// Input the FdoXmlReader that is parsing the XML document.
00040     /// 
00041     /// \return
00042     /// Returns FdoXmlSaxContext
00043     /// 
00044     FDO_API_COMMON static FdoXmlSaxContext* Create(FdoXmlReader* reader);
00045 
00046     /// \brief
00047     /// Gets the FdoXmlReader that is parsing the XML document.
00048     /// 
00049     /// \return
00050     /// Returns FdoXmlReader
00051     /// 
00052     FDO_API_COMMON FdoXmlReader* GetReader();
00053 
00054 protected:
00055     /// Default constructor to keep g++ from complaining.
00056     FDO_API_COMMON FdoXmlSaxContext();
00057     FDO_API_COMMON FdoXmlSaxContext(FdoXmlReader* reader);
00058     FDO_API_COMMON virtual ~FdoXmlSaxContext();
00059 
00060 private:
00061     /// Current XML Reader.
00062     FdoXmlReader*  mpReader;
00063 };
00064 
00065 /// \ingroup (typedefs)
00066 /// \brief
00067 /// FdoXmlSaxContextP is a FdoPtr on FdoXmlSaxContext, provided for convenience.
00068 typedef FdoPtr<FdoXmlSaxContext> FdoXmlSaxContextP;
00069 
00070 #endif
00071 
00072 

Comments or suggestions? Send us feedback.