FDO .NET API Reference Feature Data Objects

mgIConnectionManagerImp.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\mgIConnectionManager.h"
00022 
00023 BEGIN_NAMESPACE_OSGEO_FDO_CONNECTIONS
00024 public __gc __interface IConnection;
00025 END_NAMESPACE_OSGEO_FDO_CONNECTIONS
00026 
00027 BEGIN_NAMESPACE_OSGEO_FDO
00028 
00029 /// \ingroup (OSGeoFDO)
00030 /// \brief
00031 /// The IConnectionManagerImp class is a concrete implementation of IConnectionManager.
00032 /// IConnectionManager supports dynamic creation of connection objects 
00033 /// given a provider name. 
00034 
00035 /// \remarks
00036 /// In order for dynamic creation to work, each dynamic link library, shared library, 
00037 /// or assembly that implements a provider must supply a well-defined entry point function that 
00038 /// takes as input a provider name and returns an FdoIConnection instance. The definition of the 
00039 /// entry point function is language- and platform-dependent. For this release of FDO, the 
00040 /// windows libraries supporting FDO providers will be expected to support the following well-known 
00041 /// entry point function, which will create and return an unitialized connection object:
00042 ///
00043 ///        IConnection * CreateConnection();
00044 ///
00045 private __gc class IConnectionManagerImp : 
00046     public NAMESPACE_OSGEO_RUNTIME::Disposable, public NAMESPACE_OSGEO_FDO::IConnectionManager
00047 {
00048 public:
00049     /// \brief
00050     /// Creates an unitialized connection object given the provider name.
00051     /// 
00052     /// \param providerName 
00053     /// The unique name of the feature provider. This name should be of the form 
00054     /// [Company].[Provider].[Version].
00055     /// 
00056     /// \return
00057     /// Returns an instance of an IConnection object. Throws an instance of Exception if an error occurs.
00058     /// 
00059     NAMESPACE_OSGEO_FDO_CONNECTIONS::IConnection* CreateConnection(String* providerName);
00060 
00061     /// \brief
00062     /// Frees a connection library reference given the provider name.
00063     /// 
00064     /// \param providerName 
00065     /// The unique name of the feature provider. This name should be of the form 
00066     /// [Company].[Provider].[Version].
00067     /// 
00068     /// \return
00069     /// Returns nothing. Throws an instance of Exception if an error occurs.
00070     /// 
00071     System::Void FreeLibrary(String* providerName);
00072 
00073 public private:
00074     IConnectionManagerImp(System::IntPtr unmanaged, System::Boolean autoDelete);
00075 
00076 	::IConnectionManager* GetImpObj();
00077 
00078 protected:
00079     System::Void ReleaseUnmanagedObject();
00080 };
00081 
00082 END_NAMESPACE_OSGEO_FDO
00083 
00084 

Comments or suggestions? Send us feedback.