API Reference | OSGeo FDO Provider for SDF |
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 #ifndef _SdfIExtendedSelect_H_ 00018 #define _SdfIExtendedSelect_H_ 00019 00020 #include "FdoStd.h" 00021 #include "Fdo.h" 00022 #include "SDF/IScrollableFeatureReader.h" 00023 #include "SDF/SdfCompareHandler.h" 00024 00025 class SdfIExtendedSelect : public FdoISelect 00026 { 00027 00028 public: 00029 // Expose the FdoISelect hidden functions 00030 using FdoISelect::GetOrderingOption; 00031 using FdoISelect::SetOrderingOption; 00032 00033 /// <summary>Set the ordering option of the selection. This is only used if the ordering collection is not empty.</summary> 00034 /// <param name="propertyName">Is the property name for which the ordering should be applied. This property should be in the ordering collection.</param> 00035 /// <param name="option">Is the ordering option and should be set to one of FdoOrderingOption_Ascending or FdoOrderingOption_Descending. 00036 /// FdoOrderingOption_Ascending is the default value.</param> 00037 /// <returns>Returns nothing</returns> 00038 virtual void SetOrderingOption( FdoString* propertyName, FdoOrderingOption option ) = 0; 00039 00040 /// <summary>Gets the ordering option for a given property.</summary> 00041 /// <param name="propertyName">Is the property name for which the ordering should be applied. This property should be in the ordering collection.</param> 00042 /// <returns>Returns the ordering option.</returns> 00043 virtual FdoOrderingOption GetOrderingOption( FdoString* propertyName ) = 0; 00044 00045 /// <summary>This method clears the internal list of property/ordering option list and re-sets the ordering option for all 00046 /// the ordering properties to the default FdoOrderingOption_Ascending or to the ordering option specified by the 00047 /// FdoIBaseSelect interface.</summary> 00048 /// <returns>Returns nothing.</returns> 00049 virtual void ClearOrderingOptions( ) = 0; 00050 00051 /// <summary>Set the compare handler. This method is used to override the default sdf compare handler.</summary> 00052 /// <param name="handler">The compare handle that should be derived from the SdfCompareHandler class.</param> 00053 /// <returns>Returns nothing</returns> 00054 virtual void SetCompareHandler( SdfCompareHandler* handler ) = 0; 00055 00056 /// <summary> Executes the select command and returns a SdfIScrollableFeatureReader. 00057 /// If ordering is enabled, then the returned reader is sorted according to 00058 /// the ordering collection. This method perform sorting in memory and allocates an integer value for each row.</summary> 00059 /// <returns>Returns a SdfIScrollableFeatureReader object</returns> 00060 virtual SdfIScrollableFeatureReader* ExecuteScrollable() = 0; 00061 00062 /// <summary> Executes the select command and returns a SdfIScrollableFeatureReader. This method creates a temporary SDF file 00063 /// that contains the selected properties. If ordering is enabled, then the created temporary SDF file is sorted according to 00064 /// the ordering collection. In this case the sorting is file based where the SQLite BTree is used. 00065 // The extendedProps and extendedDefaults can be used to extend the class definition of the selected data. 00066 /// Both collections have to be in-sync otherwise an exception will be thrown.</summary> 00067 /// <param name="sdfCacheFile">File path and name used to store the result of the query.</param> 00068 /// <param name="extendedProps">A collection of data property definition that extends the class definition defined by the selected properties.</param> 00069 /// <param name="extendedDefaults">A collection of property values used as defaults for extended properties defined by extendedProps parameter.</param> 00070 /// <returns>Returns a SdfIScrollableFeatureReader object</returns> 00071 virtual SdfIScrollableFeatureReader* ExecuteScrollable( const wchar_t* sdfCacheFile, FdoDataPropertyDefinitionCollection* extendedProps, FdoPropertyValueCollection* extendedDefaults ) = 0; 00072 }; 00073 00074 #endif 00075
Comments? |