00001 #ifndef _IDESCRIBESCHEMA_H_ 00002 #define _IDESCRIBESCHEMA_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/Commands/ICommand.h> 00028 #include <Fdo/Schema/FeatureSchemaCollection.h> 00029 #include <Fdo/Connections/IConnection.h> 00030 00031 /// \brief 00032 /// The FdoIDescribeSchema interface defines the DescribeSchema command, which 00033 /// describes the feature schemas available from the connection. The DescribeSchema 00034 /// command can describe a single schema or all schemas available from 00035 /// the connection. The Execute operation returns an FdoFeatureSchemaCollection 00036 /// object. 00037 class FdoIDescribeSchema : public FdoICommand 00038 { 00039 friend class FdoIConnection; 00040 00041 public: 00042 /// \brief 00043 /// Gets the name of the schema to describe. This function is optional; 00044 /// if not specified, execution of the command will describe all schemas. 00045 /// 00046 /// \return 00047 /// Returns the schema name 00048 /// 00049 FDO_API virtual FdoString* GetSchemaName() = 0; 00050 00051 /// \brief 00052 /// Sets the name of the schema to describe. This function is optional; if not 00053 /// specified execution of the command will describe all schemas. 00054 /// 00055 /// \param value 00056 /// Input the schema name 00057 /// 00058 /// \return 00059 /// Returns nothing 00060 /// 00061 FDO_API virtual void SetSchemaName(FdoString* value) = 0; 00062 00063 /// \brief 00064 /// Gets the names of the classes to retrieve. This is optional, 00065 /// if not specified execution of the command will describe all classes. 00066 /// If the class name is not qualified, and the schema name is not specified, 00067 /// the requested class from all schemas will be described. 00068 /// The class names specified serve only as a hint. Use of the hint 00069 /// during command execution is provider dependent. Providers that 00070 /// will not use the hint will describe the schema for all classes. 00071 /// 00072 /// \return 00073 /// Returns the collection of class names 00074 /// 00075 FDO_API virtual FdoStringCollection* GetClassNames() = 0; 00076 00077 /// \brief 00078 /// Sets the name of the classes to retrieve. This is optional, if not 00079 /// specified execution of the command will describe all classes. 00080 /// If the class name is not qualified, and the schema name is not specified, 00081 /// the requested class from all schemas will be described. 00082 /// The class names specified serve only as a hint. Use of the hint 00083 /// during command execution is provider dependent. Providers that 00084 /// will not use the hint will describe the schema for all classes. 00085 /// 00086 /// \param value 00087 /// Input the collection of class names 00088 /// 00089 /// \return 00090 /// Returns nothing 00091 /// 00092 FDO_API virtual void SetClassNames(FdoStringCollection* value) = 0; 00093 00094 /// \brief 00095 /// Executes the DescribeSchema command and returns a 00096 /// FdoFeatureSchemaCollection. If a schema name is given that has 00097 /// references to another schema, the dependent schemas will 00098 /// be returned as well. If the specified schema name does not exist, 00099 /// the Execute method throws an exception. 00100 /// 00101 /// \return 00102 /// Returns the schema collection representing the schema created. 00103 /// The element states for all elements will be set to FdoSchemaElementState_Unchanged. 00104 /// Each provider-specific implementation of Execute() can ensure 00105 /// that this is the case by 00106 /// calling FdoFeatureSchema::AcceptChanges() for each feature schema 00107 /// in the returned collection. 00108 /// 00109 FDO_API virtual FdoFeatureSchemaCollection* Execute() = 0; 00110 }; 00111 #endif 00112 00113 00114