FDO .NET API Reference Feature Data Objects

mgICommand.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 BEGIN_NAMESPACE_OSGEO_FDO_CONNECTIONS
00022 public __gc __interface IConnection;
00023 public __gc __interface ITransaction;
00024 END_NAMESPACE_OSGEO_FDO_CONNECTIONS
00025 
00026 BEGIN_NAMESPACE_OSGEO_FDO_COMMANDS
00027 public __gc class ParameterValueCollection;
00028 
00029 /// \ingroup (OSGeoFDOCommands)
00030 /// \interface OSGeo::FDO::Commands::ICommand
00031 /// \brief
00032 /// The ICommand interface defines behavior common to all commands in FDO. In
00033 /// order to be executed, commands must have an association to a connection.
00034 /// Commands can also be optionally associated with a transaction if the
00035 /// connection supports transactions. The parameter values collection allows
00036 /// values to be specified for commands that support expressions and/or filters.
00037 public __gc __interface ICommand : public System::IDisposable
00038 {
00039 public:
00040     /// \brief
00041     /// Gets the IConnection that this command will operate on.
00042     /// 
00043     /// \return
00044     /// Returns the connection object
00045     /// 
00046     __property NAMESPACE_OSGEO_FDO_CONNECTIONS::IConnection* get_Connection();
00047 
00048     /// \brief
00049     /// Gets the transaction in which the command executes.
00050     /// 
00051     /// \return
00052     /// Returns the transaction object
00053     /// 
00054     __property NAMESPACE_OSGEO_FDO_CONNECTIONS::ITransaction* get_Transaction();
00055 
00056     /// \brief
00057     /// Sets the transaction in which the command executes.
00058     /// 
00059     /// \param value 
00060     /// Input the transaction object
00061     /// 
00062     /// \return
00063     /// Returns nothing
00064     /// 
00065     __property System::Void set_Transaction(NAMESPACE_OSGEO_FDO_CONNECTIONS::ITransaction* value);
00066 
00067     /// \brief
00068     /// Gets the number of milliseconds to wait before terminating the attempt
00069     /// to execute a command and generating an error. If the provider does not
00070     /// support the timeout capability, 0 is returned.
00071     /// 
00072     /// \return
00073     /// Returns the time (in milliseconds)
00074     /// 
00075     __property System::Int32 get_CommandTimeOut();
00076 
00077     /// \brief
00078     /// Sets the number of milliseconds to wait before terminating the attempt
00079     /// to execute a command and generating an error. If the provider does not
00080     /// support the timeout capability, then attempting to set a timeout will
00081     /// result in an exception.
00082     /// 
00083     /// \param value 
00084     /// Input the time (in milliseconds)
00085     /// 
00086     /// \return
00087     /// Returns nothing
00088     /// 
00089     __property System::Void set_CommandTimeOut(System::Int32 value);
00090 
00091     /// \brief
00092     /// Returns an ParameterValueCollection. If the command requires parameters, the 
00093     /// literal values to bind to each of those named parameters must be added to
00094     /// this collection.
00095     /// 
00096     /// \return
00097     /// Returns the list of parameters and their respective values
00098     /// 
00099     __property NAMESPACE_OSGEO_FDO_COMMANDS::ParameterValueCollection* get_ParameterValues();
00100 
00101     /// \brief
00102     /// Validates and optimizes the command for execution. Calling this method is
00103     /// optional, but recommended if bound to different sets of parameters and
00104     /// executed multiple times.
00105     /// 
00106     /// \return
00107     /// Returns nothing
00108     /// 
00109     System::Void Prepare();
00110 
00111     /// \brief
00112     /// Attempts to cancel command execution. Cancel may be called on a separate
00113     /// thread after the commands Execute method has been called and before 
00114     /// Execute has returned. If successful, an exception is thrown from the
00115     /// Execute method. If there is nothing to cancel, nothing happens. If
00116     /// command execution is in process, and the attempt to cancel fails or is
00117     /// not supported, an exception is thrown.
00118     /// 
00119     /// \return
00120     /// Returns nothing
00121     /// 
00122     System::Void Cancel();
00123 };
00124 
00125 END_NAMESPACE_OSGEO_FDO_COMMANDS
00126 
00127 

Comments or suggestions? Send us feedback.