00001 #ifndef FDO_RDBMSOVPROPERTYMAPPINGRELATION_H 00002 #define FDO_RDBMSOVPROPERTYMAPPINGRELATION_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 /// FdoRdbms.lib 00022 00023 00024 #include <Rdbms/Override/RdbmsOv.h> 00025 #include <Rdbms/Override/RdbmsOvPropertyMappingDefinition.h> 00026 00027 class FdoRdbmsOvClassDefinition; 00028 00029 ///<summary> 00030 ///Abstract class defining the physical schema overrides for relation type 00031 ///object property table mappings. 00032 ///</summary> 00033 class FdoRdbmsOvPropertyMappingRelation : public virtual FdoRdbmsOvPropertyMappingDefinition 00034 { 00035 00036 public: 00037 00038 ///<summary>Gets the internal class</summary> 00039 /// <returns>Returns the internal class</returns> 00040 FDORDBMS_OV_API FdoRdbmsOvClassDefinition* GetInternalClass(); 00041 00042 /// \cond DOXYGEN-IGNORE 00043 00044 // Serialize this property to XML. Not part of the API. 00045 FDORDBMS_OV_API virtual void _writeXml(FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags); 00046 00047 // Creates and optionally attaches an internal class override object. 00048 FDORDBMS_OV_API virtual FdoRdbmsOvClassDefinition* CreateInternalClass( 00049 bool attach // if true then make the new class the internal class for 00050 // this property mapping. Replaces any previous internal class 00051 ) 00052 { 00053 // TODO: throw exception. 00054 return NULL; 00055 } 00056 /// \endcond 00057 00058 protected: 00059 FDORDBMS_OV_API FdoRdbmsOvPropertyMappingRelation(); 00060 FDORDBMS_OV_API virtual ~FdoRdbmsOvPropertyMappingRelation(); 00061 00062 ///<summary>Sets the internal class</summary> 00063 /// <returns>Returns nothing</returns> 00064 FDORDBMS_OV_API void SetInternalClass(FdoRdbmsOvClassDefinition* classDefinition); 00065 00066 // Handle start of sub-elements when deserializing from XML. 00067 FDORDBMS_OV_API virtual FdoXmlSaxHandler* XmlStartElement( 00068 FdoXmlSaxContext* context, 00069 FdoString* uri, 00070 FdoString* name, 00071 FdoString* qname, 00072 FdoXmlAttributeCollection* atts 00073 ); 00074 00075 // Handle end of sub-elements when deserializing from XML. 00076 FDORDBMS_OV_API virtual FdoBoolean XmlEndElement( 00077 FdoXmlSaxContext* context, 00078 FdoString* uri, 00079 FdoString* name, 00080 FdoString* qname 00081 ); 00082 00083 00084 private: 00085 FdoPtr<FdoRdbmsOvClassDefinition> mClassDefinition; 00086 }; 00087 00088 ///<summary> 00089 ///FdoRdbmsOvPropertyMappingRelationP is a FdoPtr on 00090 ///FdoRdbmsOvPropertyMappingRelation, provided for convenience. 00091 ///</summary> 00092 typedef FdoPtr<FdoRdbmsOvPropertyMappingRelation> FdoRdbmsOvPropertyMappingRelationP; 00093 00094 #endif 00095