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

# PhysicalPropertyMapping.h

Go to the documentation of this file.

    00001 #ifndef FDO_PHYSICALPROPERTYMAPPING_H
    00002 #define FDO_PHYSICALPROPERTYMAPPING_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 #ifdef _WIN32
    00023 #pragma once
    00024 #endif
    00025
    00026 #include <FdoStd.h>
    00027 #include <Fdo/Xml/Context.h>
    00028 #include <Fdo/Commands/CommandException.h>
    00029 #include <Fdo/Commands/Schema/PhysicalElementMapping.h>
    00030
    00031 class FdoPhysicalSchemaMapping;
    00032 class FdoXmlFlags;
    00033
    00034 /// \brief
    00035 /// FdoPhysicalPropertyMapping is an abstract class that acts as a base class for all
    00036 /// Physical Schema Mapping property overrides.
    00037 class FdoPhysicalPropertyMapping :
    00038     public FdoPhysicalElementMapping
    00039 {
    00040 public:
    00041     /// \brief
    00042     /// Initializes this Physical Property Mapping from its XML attributes. Called when
    00043     /// this element is deserialized from XML. This function decodes any
    00044     /// encoded property names (See _writeXml). Can be extended to handle
    00045     /// particular XML attributes for derived classes.
    00046     ///
    00047     /// \param pContext
    00048     /// Input context contain information about the current deserialization operation
    00049     /// \param attrs
    00050     /// Input the XML attributes.
    00051     ///
    00052     /// \return
    00053     /// Returns nothing
    00054     ///
    00055     FDO_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs);
    00056
    00057     /// \brief
    00058     /// Writes this Physical Property Mapping to XML. Called when
    00059     /// this element is serialized to XML. This function converts (encodes)
    00060     /// property names to be valid XML element names. Can be extended to handle
    00061     /// particular XML attributes and sub-elements for derived classes.
    00062     /// \note
    00063     /// Schema Override elements that do not require name encoding
    00064     /// should be based on FdoPhysicalElementMapping instead of this class.
    00065     ///
    00066     /// \param xmlWriter
    00067     /// Input write the element to this XML writer
    00068     /// \param flags
    00069     /// Input flags that control the writing of the element.
    00070     ///
    00071     /// \return
    00072     /// Returns nothing
    00073     ///
    00074     FDO_API virtual void _writeXml(
    00075         FdoXmlWriter* xmlWriter,
    00076         const FdoXmlFlags* flags
    00077     );
    00078
    00079
    00080 protected:
    00081     /// \brief
    00082     /// Constructs a default instance of a property mapping.
    00083     ///
    00084     FDO_API FdoPhysicalPropertyMapping();
    00085
    00086     /// \brief
    00087     /// Constructs a named instance of a property mapping.
    00088     ///
    00089     /// \param name
    00090     /// Input the class name
    00091     ///
    00092     FDO_API FdoPhysicalPropertyMapping( FdoString* name );
    00093
    00094     /// \brief
    00095     /// property mapping destructor.
    00096     ///
    00097     FDO_API virtual ~FdoPhysicalPropertyMapping();
    00098
    00099 };
    00100
    00101 /// \ingroup (typedefs)
    00102 /// \brief
    00103 /// FdoPhysicalPropertyMappingP is a FdoPtr on FdoPhysicalPropertyMapping, provided for convenience.
    00104 typedef FdoPtr<FdoPhysicalPropertyMapping> FdoPhysicalPropertyMappingP;
    00105
    00106 #endif
    00107
    00108

Please send us your comment about this page