FDO .NET API Reference Feature Data Objects

mgICommandImp.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (C) 2004-2006  Autodesk, Inc.
00003 * 
00004 * This library is free software; you can redistribute it and/or
00005 * modify it under the terms of version 2.1 of the GNU Lesser
00006 * General Public License as published by the Free Software Foundation.
00007 * 
00008 * This library is distributed in the hope that it will be useful,
00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 * Lesser General Public License for more details.
00012 * 
00013 * You should have received a copy of the GNU Lesser General Public
00014 * License along with this library; if not, write to the Free Software
00015 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00016 *
00017 */
00018 
00019 #pragma once
00020 
00021 #include "FDO\Commands\mgICommand.h"
00022 
00023 class FdoFdoICommand;
00024 
00025 BEGIN_NAMESPACE_OSGEO_FDO_CONNECTIONS
00026 public __gc __interface IConnection;
00027 public __gc __interface ITransaction;
00028 END_NAMESPACE_OSGEO_FDO_CONNECTIONS
00029 
00030 BEGIN_NAMESPACE_OSGEO_FDO_COMMANDS
00031 public __gc class ParameterValueCollection;
00032 
00033 /// \ingroup (OSGeoFDOCommands)
00034 /// \brief
00035 /// The ICommandImp class is a concrete instantiation of interface ICommand. 
00036 /// ICommand defines behavior common to all commands in FDO. In
00037 /// order to be executed, commands must have an association to a connection.
00038 /// Commands can also be optionally associated with a transaction if the
00039 /// connection supports transactions. The parameter values collection allows
00040 /// values to be specified for commands that support expressions and/or filters.
00041 public __gc class ICommandImp : public NAMESPACE_OSGEO_RUNTIME::Disposable, 
00042                                 public NAMESPACE_OSGEO_FDO_COMMANDS::ICommand
00043 {
00044 public:
00045     /// \brief
00046     /// Gets the IConnection that this command will operate on.
00047     /// 
00048     /// \return
00049     /// Returns the connection object
00050     /// 
00051     __property NAMESPACE_OSGEO_FDO_CONNECTIONS::IConnection* get_Connection();
00052 
00053     /// \brief
00054     /// Gets the transaction in which the command executes.
00055     /// 
00056     /// \return
00057     /// Returns the transaction object
00058     /// 
00059     __property NAMESPACE_OSGEO_FDO_CONNECTIONS::ITransaction* get_Transaction();
00060 
00061     /// \brief
00062     /// Sets the transaction in which the command executes.
00063     /// 
00064     /// \param value 
00065     /// Input the transaction object
00066     /// 
00067     /// \return
00068     /// Returns nothing
00069     /// 
00070     __property System::Void set_Transaction(NAMESPACE_OSGEO_FDO_CONNECTIONS::ITransaction* value);
00071 
00072     /// \brief
00073     /// Gets the number of milliseconds to wait before terminating the attempt
00074     /// to execute a command and generating an error. If the provider does not
00075     /// support the timeout capability, 0 is returned.
00076     /// 
00077     /// \return
00078     /// Returns the time (in milliseconds)
00079     /// 
00080     __property System::Int32 get_CommandTimeOut();
00081 
00082     /// \brief
00083     /// Sets the number of milliseconds to wait before terminating the attempt
00084     /// to execute a command and generating an error. If the provider does not
00085     /// support the timeout capability, then attempting to set a timeout will
00086     /// result in an exception.
00087     /// 
00088     /// \param value 
00089     /// Input the time (in milliseconds)
00090     /// 
00091     /// \return
00092     /// Returns nothing
00093     /// 
00094     __property System::Void set_CommandTimeOut(System::Int32 value);
00095 
00096     /// \brief
00097     /// Returns an ParameterValueCollection. If the command requires parameters, the 
00098     /// literal values to bind to each of those named parameters must be added to
00099     /// this collection.
00100     /// 
00101     /// \return
00102     /// Returns the list of parameters and their respective values
00103     /// 
00104     __property NAMESPACE_OSGEO_FDO_COMMANDS::ParameterValueCollection* get_ParameterValues();
00105 
00106     /// \brief
00107     /// Validates and optimizes the command for execution. Calling this method is
00108     /// optional, but recommended if bound to different sets of parameters and
00109     /// executed multiple times.
00110     /// 
00111     /// \return
00112     /// Returns nothing
00113     /// 
00114     System::Void Prepare();
00115 
00116     /// \brief
00117     /// Attempts to cancel command execution. Cancel may be called on a separate
00118     /// thread after the commands Execute method has been called and before 
00119     /// Execute has returned. If successful, an exception is thrown from the
00120     /// Execute method. If there is nothing to cancel, nothing happens. If
00121     /// command execution is in process, and the attempt to cancel fails or is
00122     /// not supported, an exception is thrown.
00123     /// 
00124     /// \return
00125     /// Returns nothing
00126     /// 
00127     System::Void Cancel();
00128 
00129 /// \cond DOXYGEN-IGNORE
00130 protected:
00131     System::Void ReleaseUnmanagedObject();
00132 /// \endcond
00133 
00134 public protected:
00135     ICommandImp(System::IntPtr unmanaged, System::Boolean autoDelete);
00136 
00137 public private:
00138     inline FdoICommand* GetImpObj();
00139 };
00140 
00141 END_NAMESPACE_OSGEO_FDO_COMMANDS
00142 
00143 

Comments or suggestions? Send us feedback.