- Main Page
- Classes
- Files
- Directories
- Related Pages

- File List
- File Members

# sfcschemarowsets.h

    00001 /******************************************************************************
    00002  * $Id: sfcschemarowsets.h 10646 2007-01-18 02:38:10Z warmerdam $
    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, warmerdam@pobox.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 #ifndef SFCSCHEMAROWSETS_H_INCLUDED
    00034 #define SFCSCHEMAROWSETS_H_INCLUDED
    00035
    00036 #include <atldbsch.h>
    00037
    00038 #include "oledbgis.h"
    00039
    00040 /************************************************************************/
    00041 /*                        COGISFeatureTableInfo                         */
    00042 /*                                                                      */
    00043 /*      Hardbound record for the OGIS Feature Tables schema rowset.     */
    00044 /*      Modelled on CTableInfo.                                         */
    00045 /************************************************************************/
    00046 class COGISFeatureTableInfo
    00047 {
    00048 public:
    00049 // Constructors
    00050         COGISFeatureTableInfo()
    00051         {
    00052                 memset(this, 0, sizeof(*this));
    00053         }
    00054
    00055 // Attributes
    00056
    00057         TCHAR   m_szFeatureTableAlias[129];
    00058         TCHAR   m_szCatalog[129];
    00059         TCHAR   m_szSchema[129];
    00060         TCHAR   m_szName[129];
    00061         TCHAR   m_szIdColumnName[129];
    00062         TCHAR   m_szDGColumnName[129];
    00063
    00064
    00065 // Binding Map
    00066 BEGIN_COLUMN_MAP(COGISFeatureTableInfo)
    00067         COLUMN_ENTRY(1, m_szFeatureTableAlias)
    00068         COLUMN_ENTRY(2, m_szCatalog)
    00069         COLUMN_ENTRY(3, m_szSchema)
    00070         COLUMN_ENTRY(4, m_szName)
    00071         COLUMN_ENTRY(5, m_szIdColumnName)
    00072         COLUMN_ENTRY(6, m_szDGColumnName)
    00073 END_COLUMN_MAP()
    00074 };
    00075
    00076 class COGISFeatureTables:
    00077       public CSchemaRowset<CAccessor<COGISFeatureTableInfo>,0>
    00078
    00079 {
    00080   public:
    00081     HRESULT Open(const CSession& session, bool bBind = true )
    00082     {
    00083         USES_CONVERSION;
    00084         return CSchemaRowset<CAccessor<COGISFeatureTableInfo>,0>::
    00085             Open(session, DBSCHEMA_OGIS_FEATURE_TABLES /*, bBind */);
    00086     }
    00087 };
    00088
    00089 /************************************************************************/
    00090 /*                       COGISGeometryColumnInfo                        */
    00091 /*                                                                      */
    00092 /*      Hardbound record for the OGIS column info schema rowset.        */
    00093 /*      Modelled on CTableInfo.                                         */
    00094 /************************************************************************/
    00095
    00096 class COGISGeometryColumnInfo
    00097 {
    00098 public:
    00099 // Constructors
    00100         COGISGeometryColumnInfo()
    00101         {
    00102                 memset(this, 0, sizeof(*this));
    00103         }
    00104
    00105 // Attributes
    00106
    00107         TCHAR   m_szCatalog[129];
    00108         TCHAR   m_szSchema[129];
    00109         TCHAR   m_szName[129];
    00110         TCHAR   m_szColumnName[129];
    00111         ULONG   m_nGeomType;
    00112         ULONG   m_nSRS_ID;
    00113
    00114 // Binding Map
    00115 BEGIN_COLUMN_MAP(COGISGeometryColumnInfo)
    00116         COLUMN_ENTRY(1, m_szCatalog)
    00117         COLUMN_ENTRY(2, m_szSchema)
    00118         COLUMN_ENTRY(3, m_szName)
    00119         COLUMN_ENTRY(4, m_szColumnName)
    00120         COLUMN_ENTRY(5, m_nGeomType)
    00121         COLUMN_ENTRY(6, m_nSRS_ID)
    00122 END_COLUMN_MAP()
    00123 };
    00124
    00125 class COGISGeometryColumnTable:
    00126       public CSchemaRowset<CAccessor<COGISGeometryColumnInfo>,0>
    00127
    00128 {
    00129   public:
    00130     HRESULT Open(const CSession& session, bool bBind = true )
    00131     {
    00132         USES_CONVERSION;
    00133         return CSchemaRowset<CAccessor<COGISGeometryColumnInfo>,0>::
    00134             Open(session, DBSCHEMA_OGIS_GEOMETRY_COLUMNS/*, bBind*/);
    00135     }
    00136 };
    00137
    00138 /************************************************************************/
    00139 /*                      COGISSpatialRefSystemsInfo                      */
    00140 /*                                                                      */
    00141 /*      Hardbound record for the OGIS SRS schema rowset record.         */
    00142 /*      Modelled on CTableInfo.                                         */
    00143 /************************************************************************/
    00144
    00145 class COGISSpatialRefSystemsInfo
    00146 {
    00147 public:
    00148 // Constructors
    00149         COGISSpatialRefSystemsInfo()
    00150         {
    00151                 memset(this, 0, sizeof(*this));
    00152         }
    00153
    00154 // Attributes
    00155
    00156         ULONG   m_nSRS_ID;
    00157         TCHAR   m_szAuthorityName[129];
    00158         ULONG   m_nAuthorityID;
    00159         TCHAR   m_szSpatialRefSystemWKT[2048];
    00160
    00161 // Binding Map
    00162 BEGIN_COLUMN_MAP(COGISSpatialRefSystemsInfo)
    00163         COLUMN_ENTRY(1, m_nSRS_ID)
    00164         COLUMN_ENTRY(2, m_szAuthorityName)
    00165         COLUMN_ENTRY(3, m_nAuthorityID)
    00166         COLUMN_ENTRY(4, m_szSpatialRefSystemWKT)
    00167 END_COLUMN_MAP()
    00168 };
    00169
    00170 class COGISSpatialRefSystemsTable:
    00171       public CSchemaRowset<CAccessor<COGISSpatialRefSystemsInfo>,0>
    00172
    00173 {
    00174   public:
    00175     HRESULT Open(const CSession& session, bool bBind = true )
    00176     {
    00177         USES_CONVERSION;
    00178         return CSchemaRowset<CAccessor<COGISSpatialRefSystemsInfo>,0>::
    00179             Open(session, DBSCHEMA_OGIS_SPATIAL_REF_SYSTEMS /*, bBind */);
    00180     }
    00181 };
    00182
    00183 #endif /* ndef SFCSCHEMAROWSETS_H_INCLUDED */

Generated for GDAL by 1.5.1.