00001 #ifndef FDO_MySQLOVTABLE_H
00002 #define FDO_MySQLOVTABLE_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 #include <Rdbms/Override/RdbmsOvTable.h>
00021 #include <Rdbms/Override/MySQL/MySqlOv.h>
00022 #include <Rdbms/Override/MySQL/MySqlOvStorageEngineType.h>
00023
00024
00025 /// \brief
00026 /// Concrete class defining physical schema overrides for a table.
00027 class FdoMySQLOvTable : public FdoRdbmsOvTable
00028 {
00029
00030 public:
00031 /// \brief
00032 /// Constructs a default of an FdoMySQLOvTable
00033 ///
00034 /// \return
00035 /// Returns FdoMySQLOvTable
00036 ///
00037 FDOMYSQL_OV_API static FdoMySQLOvTable* Create();
00038
00039 /// \brief
00040 /// Constructs an instance of an FdoMySQLOvTable using the specified arguments
00041 ///
00042 /// \param name
00043 /// Input name
00044 ///
00045 /// \return
00046 /// Returns FdoMySQLOvTable
00047 ///
00048 FDOMYSQL_OV_API static FdoMySQLOvTable* Create(FdoString *name);
00049
00050 /// \brief
00051 /// Gets the directory where table data is stored
00052 ///
00053 /// \return
00054 /// Returns the directory where table data is stored
00055 ///
00056 FDOMYSQL_OV_API FdoString *GetDataDirectory();
00057
00058 /// \brief
00059 /// Sets the directory where table data is stored
00060 ///
00061 /// \return
00062 /// Returns nothing
00063 ///
00064 FDOMYSQL_OV_API void SetDataDirectory(FdoString *dataDirectory);
00065
00066 /// \brief
00067 /// Gets the directory where indexes are stored
00068 ///
00069 /// \return
00070 /// Returns the directory where indexes are stored
00071 ///
00072 FDOMYSQL_OV_API FdoString *GetIndexDirectory();
00073
00074 /// \brief
00075 /// Sets the directory where indexes are stored
00076 ///
00077 /// \return
00078 /// Returns nothing
00079 ///
00080 FDOMYSQL_OV_API void SetIndexDirectory(FdoString *indexDirectory);
00081
00082 /// \brief
00083 /// Gets the storage engine type
00084 ///
00085 /// \return
00086 /// Returns the storage engine type
00087 ///
00088 FDOMYSQL_OV_API MySQLOvStorageEngineType GetStorageEngine();
00089
00090 /// \brief
00091 /// Sets the storage engine type
00092 ///
00093 /// \return
00094 /// Returns nothing
00095 ///
00096 FDOMYSQL_OV_API void SetStorageEngine(MySQLOvStorageEngineType storageEngine);
00097
00098 /// \brief
00099 /// Gets the database
00100 ///
00101 /// \return
00102 /// Returns the database
00103 ///
00104 FDOMYSQL_OV_API FdoString *GetDatabase();
00105
00106 /// \brief
00107 /// Sets the database
00108 ///
00109 /// \return
00110 /// Returns nothing
00111 ///
00112 FDOMYSQL_OV_API void SetDatabase(FdoString *database);
00113
00114
00115 /// \cond DOXYGEN-IGNORE
00116
00117 /// XML Serialization functions, not part of the API.
00118
00119 /// Serialize this property to XML.
00120 virtual void _writeXmlContents(FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags);
00121
00122 /// Initialize this element from its XML attributes
00123 virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs);
00124
00125 /// Sets the parent of this object. Not part of the API.
00126 void SetParent(FdoPhysicalElementMapping* value);
00127
00128 /// \endcond
00129
00130 protected:
00131 FdoMySQLOvTable();
00132 FdoMySQLOvTable(FdoString *name);
00133 virtual ~FdoMySQLOvTable();
00134 virtual void Dispose();
00135
00136 /// Common initializer for all constructors:
00137 void Init();
00138
00139 private:
00140 FdoStringP mDataDirectory;
00141 FdoStringP mIndexDirectory;
00142 MySQLOvStorageEngineType mStorageEngine;
00143 FdoStringP mDatabase;
00144 };
00145
00146 /// \brief
00147 /// FdoMySQLOvTableP is a FdoPtr on FdoMySQLOvTable, provided for convenience.
00148 typedef FdoPtr<FdoMySQLOvTable> FdoMySQLOvTableP;
00149
00150 #endif
00151
00152