- Main Page
- Related Pages
- Modules
- Classes
- Files

# Context.h

Go to the documentation of this file.

    00001 #ifndef FDO_XML_CONTEXT_H
    00002 #define FDO_XML_CONTEXT_H
    00003
    00004 //
    00005 // Copyright (C) 2004-2006  Autodesk, Inc.
    00006 //
    00007 // This library is free software; you can redistribute it and/or
    00008 // modify it under the terms of version 2.1 of the GNU Lesser
    00009 // General Public License as published by the Free Software Foundation.
    00010 //
    00011 // This library is distributed in the hope that it will be useful,
    00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00014 // Lesser General Public License for more details.
    00015 //
    00016 // You should have received a copy of the GNU Lesser General Public
    00017 // License along with this library; if not, write to the Free Software
    00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    00019 //
    00020
    00021 #include <FdoStd.h>
    00022 #include <Fdo/Xml/Flags.h>
    00023
    00024 /// \brief
    00025 /// Default context for deserializing from XML documents via
    00026 /// FdoXmlDeserializable.
    00027 class FdoXmlContext : public FdoXmlSaxContext
    00028 {
    00029 public:
    00030     /// \brief
    00031     /// Constructs a context for parsing FDO Deserializable items
    00032     ///
    00033     /// \param flags
    00034     /// Input flags.
    00035      ///
    00036      /// \param xmlReader
    00037      /// Input xmlReader.
    00038     ///
    00039      /// \return
    00040      /// Returns FdoXmlContext.
    00041     FDO_API static FdoXmlContext* Create( FdoXmlFlags* flags, FdoXmlReader* xmlReader );
    00042
    00043     /// \brief
    00044     /// Decodes any element name that was encoded to be XML-compatible.
    00045     ///
    00046      /// \param name
    00047      /// Input name.
    00048      ///
    00049      /// \return
    00050      /// Returns FdoStringP.
    00051     FDO_API FdoStringP DecodeName ( FdoStringP name );
    00052
    00053     /// \brief
    00054     /// Retrieves the current XML flags.
    00055     ///
    00056      /// \return
    00057      /// Returns FdoXmlFlags.
    00058     FDO_API FdoXmlFlags* GetFlags();
    00059
    00060
    00061 protected:
    00062     FdoXmlContext() {}
    00063     FDO_API FdoXmlContext( FdoXmlFlags* flags, FdoXmlReader* xmlReader );
    00064     FDO_API virtual ~FdoXmlContext();
    00065
    00066
    00067 private:
    00068     FdoXmlFlagsP mFlags;
    00069 };
    00070
    00071 /// \ingroup (typedefs)
    00072 /// \brief
    00073 /// FdoXmlContextP is an FdoPtr on FdoXmlContext provided for convenience.
    00074 typedef FdoPtr<FdoXmlContext> FdoXmlContextP;
    00075
    00076 #endif
    00077
    00078

Please send us your comment about this page