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 SHPIEXTENDEDSELECT_H
00018 #define SHPIEXTENDEDSELECT_H
00019
00020 #include "FdoStd.h"
00021 #include "Fdo.h"
00022 #include "SHP/IScrollableFeatureReader.h"
00023 #include "SHP/ShpCompareHandler.h"
00024
00025 class ShpIExtendedSelect : 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 Shp compare handler.</summary>
00052 /// <param name="handler">The compare handle that should be derived from the ShpCompareHandler class.</param>
00053 /// <returns>Returns nothing</returns>
00054 virtual void SetCompareHandler( ShpCompareHandler* handler ) = 0;
00055
00056 /// <summary> Executes the select command and returns a ShpIScrollableFeatureReader.
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 ShpIScrollableFeatureReader object</returns>
00060 virtual ShpIScrollableFeatureReader* ExecuteScrollable() = 0;
00061
00062 };
00063
00064 #endif
00065