Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

sfcschemarowsets.h

00001 /****************************************************************************** 00002 * $Id: sfcschemarowsets.h,v 1.3 2001/11/01 17:06:31 warmerda Exp $ 00003 * 00004 * Project: OpenGIS Simple Features Reference Implementation 00005 * Purpose: Definitions for OGIS specific, and generic OLE DB schema rowsets. 00006 * Generally application code shouldn't need to include this file 00007 * directly or indirectly. It exists mostly to support the other 00008 * SFC class implementations. 00009 * Author: Frank Warmerdam, warmerda@home.com 00010 * 00011 ****************************************************************************** 00012 * Copyright (c) 1999, Les Technologies SoftMap Inc. 00013 * 00014 * Permission is hereby granted, free of charge, to any person obtaining a 00015 * copy of this software and associated documentation files (the "Software"), 00016 * to deal in the Software without restriction, including without limitation 00017 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00018 * and/or sell copies of the Software, and to permit persons to whom the 00019 * Software is furnished to do so, subject to the following conditions: 00020 * 00021 * The above copyright notice and this permission notice shall be included 00022 * in all copies or substantial portions of the Software. 00023 * 00024 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00025 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00026 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00027 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00028 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00029 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 00030 * DEALINGS IN THE SOFTWARE. 00031 ****************************************************************************** 00032 * 00033 * $Log: sfcschemarowsets.h,v $ 00034 * Revision 1.3 2001/11/01 17:06:31 warmerda 00035 * convert use of CRestrictions to deriving from CSchemaRowset 00036 * 00037 * Revision 1.2 1999/11/18 19:02:20 warmerda 00038 * expanded tabs 00039 * 00040 * Revision 1.1 1999/06/10 19:34:33 warmerda 00041 * New 00042 * 00043 */ 00044 00045 #ifndef SFCSCHEMAROWSETS_H_INCLUDED 00046 #define SFCSCHEMAROWSETS_H_INCLUDED 00047 00048 #include <atldbsch.h> 00049 00050 #include "oledbgis.h" 00051 00052 /************************************************************************/ 00053 /* COGISFeatureTableInfo */ 00054 /* */ 00055 /* Hardbound record for the OGIS Feature Tables schema rowset. */ 00056 /* Modelled on CTableInfo. */ 00057 /************************************************************************/ 00058 class COGISFeatureTableInfo 00059 { 00060 public: 00061 // Constructors 00062 COGISFeatureTableInfo() 00063 { 00064 memset(this, 0, sizeof(*this)); 00065 } 00066 00067 // Attributes 00068 00069 TCHAR m_szFeatureTableAlias[129]; 00070 TCHAR m_szCatalog[129]; 00071 TCHAR m_szSchema[129]; 00072 TCHAR m_szName[129]; 00073 TCHAR m_szIdColumnName[129]; 00074 TCHAR m_szDGColumnName[129]; 00075 00076 00077 // Binding Map 00078 BEGIN_COLUMN_MAP(COGISFeatureTableInfo) 00079 COLUMN_ENTRY(1, m_szFeatureTableAlias) 00080 COLUMN_ENTRY(2, m_szCatalog) 00081 COLUMN_ENTRY(3, m_szSchema) 00082 COLUMN_ENTRY(4, m_szName) 00083 COLUMN_ENTRY(5, m_szIdColumnName) 00084 COLUMN_ENTRY(6, m_szDGColumnName) 00085 END_COLUMN_MAP() 00086 }; 00087 00088 class COGISFeatureTables: 00089 public CSchemaRowset<CAccessor<COGISFeatureTableInfo>,0> 00090 00091 { 00092 public: 00093 HRESULT Open(const CSession& session, bool bBind = true ) 00094 { 00095 USES_CONVERSION; 00096 return CSchemaRowset<CAccessor<COGISFeatureTableInfo>,0>:: 00097 Open(session, DBSCHEMA_OGIS_FEATURE_TABLES /*, bBind */); 00098 } 00099 }; 00100 00101 /************************************************************************/ 00102 /* COGISGeometryColumnInfo */ 00103 /* */ 00104 /* Hardbound record for the OGIS column info schema rowset. */ 00105 /* Modelled on CTableInfo. */ 00106 /************************************************************************/ 00107 00108 class COGISGeometryColumnInfo 00109 { 00110 public: 00111 // Constructors 00112 COGISGeometryColumnInfo() 00113 { 00114 memset(this, 0, sizeof(*this)); 00115 } 00116 00117 // Attributes 00118 00119 TCHAR m_szCatalog[129]; 00120 TCHAR m_szSchema[129]; 00121 TCHAR m_szName[129]; 00122 TCHAR m_szColumnName[129]; 00123 ULONG m_nGeomType; 00124 ULONG m_nSRS_ID; 00125 00126 // Binding Map 00127 BEGIN_COLUMN_MAP(COGISGeometryColumnInfo) 00128 COLUMN_ENTRY(1, m_szCatalog) 00129 COLUMN_ENTRY(2, m_szSchema) 00130 COLUMN_ENTRY(3, m_szName) 00131 COLUMN_ENTRY(4, m_szColumnName) 00132 COLUMN_ENTRY(5, m_nGeomType) 00133 COLUMN_ENTRY(6, m_nSRS_ID) 00134 END_COLUMN_MAP() 00135 }; 00136 00137 class COGISGeometryColumnTable: 00138 public CSchemaRowset<CAccessor<COGISGeometryColumnInfo>,0> 00139 00140 { 00141 public: 00142 HRESULT Open(const CSession& session, bool bBind = true ) 00143 { 00144 USES_CONVERSION; 00145 return CSchemaRowset<CAccessor<COGISGeometryColumnInfo>,0>:: 00146 Open(session, DBSCHEMA_OGIS_GEOMETRY_COLUMNS/*, bBind*/); 00147 } 00148 }; 00149 00150 /************************************************************************/ 00151 /* COGISSpatialRefSystemsInfo */ 00152 /* */ 00153 /* Hardbound record for the OGIS SRS schema rowset record. */ 00154 /* Modelled on CTableInfo. */ 00155 /************************************************************************/ 00156 00157 class COGISSpatialRefSystemsInfo 00158 { 00159 public: 00160 // Constructors 00161 COGISSpatialRefSystemsInfo() 00162 { 00163 memset(this, 0, sizeof(*this)); 00164 } 00165 00166 // Attributes 00167 00168 ULONG m_nSRS_ID; 00169 TCHAR m_szAuthorityName[129]; 00170 ULONG m_nAuthorityID; 00171 TCHAR m_szSpatialRefSystemWKT[2048]; 00172 00173 // Binding Map 00174 BEGIN_COLUMN_MAP(COGISSpatialRefSystemsInfo) 00175 COLUMN_ENTRY(1, m_nSRS_ID) 00176 COLUMN_ENTRY(2, m_szAuthorityName) 00177 COLUMN_ENTRY(3, m_nAuthorityID) 00178 COLUMN_ENTRY(4, m_szSpatialRefSystemWKT) 00179 END_COLUMN_MAP() 00180 }; 00181 00182 class COGISSpatialRefSystemsTable: 00183 public CSchemaRowset<CAccessor<COGISSpatialRefSystemsInfo>,0> 00184 00185 { 00186 public: 00187 HRESULT Open(const CSession& session, bool bBind = true ) 00188 { 00189 USES_CONVERSION; 00190 return CSchemaRowset<CAccessor<COGISSpatialRefSystemsInfo>,0>:: 00191 Open(session, DBSCHEMA_OGIS_SPATIAL_REF_SYSTEMS /*, bBind */); 00192 } 00193 }; 00194 00195 #endif /* ndef SFCSCHEMAROWSETS_H_INCLUDED */

Generated on Thu Jul 29 19:47:50 2004 for OGR by doxygen 1.3.7