OSGeo FDO Provider for SDF API Reference

SDF API

API Reference OSGeo FDO Provider for SDF

IExtendedSelect.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 #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     /// \brief
00034     /// Set the ordering option of the selection.
00035     /// 
00036     /// \remarks
00037     /// This is only used if the ordering collection is not empty.
00038     ///
00039     /// \param propertyName
00040     /// Is the property name for which the ordering should be applied. This property should be in the ordering collection.
00041     ///
00042     /// \param option
00043      /// Is the ordering option and should be set to one of FdoOrderingOption_Ascending or FdoOrderingOption_Descending.
00044     /// FdoOrderingOption_Ascending is the default value.
00045     virtual void SetOrderingOption( FdoString* propertyName, FdoOrderingOption  option ) = 0;
00046 
00047     /// \brief
00048      /// Gets the ordering option for a given property.
00049      ///
00050     /// \param propertyName
00051     //Is the property name for which the ordering should be applied. This property should be in the ordering collection.
00052     ///
00053     /// \return
00054      /// Returns the ordering option.
00055     virtual FdoOrderingOption GetOrderingOption( FdoString* propertyName ) = 0;
00056 
00057     /// \brief
00058     /// Clears the internal list of property/ordering option list and re-sets the ordering option for all 
00059     /// the ordering properties to the default FdoOrderingOption_Ascending or to the ordering option specified by the 
00060     /// FdoIBaseSelect interface.
00061     virtual void ClearOrderingOptions( ) = 0;
00062 
00063     /// \brief
00064     /// Sets the compare handler.
00065     ///
00066     /// \remarks
00067     /// This method is used to override the default sdf compare handler.
00068     ///
00069     /// \param handler
00070      /// The compare handle that should be derived from the SdfCompareHandler class.
00071     virtual void SetCompareHandler( SdfCompareHandler*  handler ) = 0;
00072 
00073     /// \brief
00074     /// Executes the select command and returns an SdfIScrollableFeatureReader.
00075     ///
00076     /// \remarks  
00077     /// If ordering is enabled, then the returned reader is sorted according to 
00078     /// the ordering collection. This method perform sorting in memory and allocates an integer value for each row.
00079     /// \return
00080      /// Returns a SdfIScrollableFeatureReader object
00081     virtual SdfIScrollableFeatureReader* ExecuteScrollable() = 0;
00082 
00083     /// \brief
00084     /// Executes the select command and returns a SdfIScrollableFeatureReader.
00085     /// \remarks
00086     /// Creates a temporary SDF file that contains the selected properties.
00087     /// If ordering is enabled, then the created temporary SDF file
00088     /// is sorted according to the ordering collection.
00089     /// In this case the sorting is file based where the SQLite BTree is used. 
00090     //  The extendedProps and extendedDefaults can be used to extend the class definition of the selected data. 
00091     /// Both collections have to be in-sync otherwise an exception will be thrown.
00092     ///
00093     /// \param sdfCacheFile
00094     /// File path and name used to store the result of the query.
00095     ///
00096     /// \param extendedProps
00097     /// A collection of data property definition that extends the class definition defined by the selected properties.
00098     ///
00099     /// \param extendedDefaults
00100     /// A collection of property values used as defaults for extended properties defined by extendedProps parameter.
00101     ///
00102     /// \return
00103      /// Returns a SdfIScrollableFeatureReader object.
00104     virtual SdfIScrollableFeatureReader* ExecuteScrollable( const wchar_t* sdfCacheFile, FdoDataPropertyDefinitionCollection* extendedProps, FdoPropertyValueCollection*  extendedDefaults ) = 0;
00105 };
00106 
00107 #endif
00108 

Comments?