OSGeo FDO Provider for SDF API Reference

SDF API

API Reference OSGeo FDO Provider for SDF

SdfCompareHandler.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 #ifndef SDFCOMPAREHANDLER_H
00017 #define SDFCOMPAREHANDLER_H
00018 
00019 #ifdef _WIN32
00020     #ifdef SDF_EXPORTS
00021         #define SDF_API __declspec(dllexport)
00022         #else
00023         #define SDF_API __declspec(dllimport)
00024     #endif
00025 #else 
00026 #define SDF_API
00027 #endif
00028 
00029 class SdfCompareHandler: public FdoIDisposable
00030 {
00031 private:
00032     SDF_API SdfCompareHandler();
00033 
00034 protected:
00035     SDF_API virtual ~SdfCompareHandler();
00036 
00037     // dispose this object
00038     SDF_API virtual void Dispose() { delete this; }
00039 
00040 public:
00041     /// \brief
00042     /// The factory function that can be used to create new instance of this class.
00043     ///
00044     /// \return
00045      /// Returns a new instance of theSdfCompareHandler class.
00046     SDF_API static SdfCompareHandler* Create();
00047 
00048     /// \brief
00049     /// Compares double values.
00050     ///
00051     /// \param name
00052     /// Is the property name.</param>
00053     //
00054     /// \param val1
00055     /// Is the value of the first object.
00056     /// \param val2
00057     /// Is the value of the second object.
00058     ///
00059     /// \return
00060     /// Returns a positive value if val1 is greater than val2, negative if val1 is smaller than val2 or zero if both val1 and val2 are equal.
00061     SDF_API virtual int Compare( const wchar_t* name, double val1, double val2 );
00062 
00063     /// \brief
00064     /// Compares float values.
00065     ///
00066     /// \param name
00067     /// Is the property name.</param>
00068     //
00069     /// \param val1
00070     /// Is the value of the first object.
00071     /// \param val2
00072     /// Is the value of the second object.
00073     ///
00074     /// \return
00075     /// Returns a positive value if val1 is greater than val2, negative if val1 is smaller than val2 or zero if both val1 and val2 are equal.
00076     SDF_API virtual int Compare( const wchar_t* name, float val1, float val2 );
00077 
00078     /// \brief
00079     /// Compares int64 values.
00080     ///
00081     /// \param name
00082     /// Is the property name.</param>
00083     //
00084     /// \param val1
00085     /// Is the value of the first object.
00086     /// \param val2
00087     /// Is the value of the second object.
00088     ///
00089     /// \return
00090     /// Returns a positive value if val1 is greater than val2, negative if val1 is smaller than val2 or zero if both val1 and val2 are equal.
00091     SDF_API virtual int Compare( const wchar_t* name, FdoInt64 val1, FdoInt64 val2 );
00092 
00093     /// \brief
00094     /// Compares int32 values.
00095     ///
00096     /// \param name
00097     /// Is the property name.</param>
00098     //
00099     /// \param val1
00100     /// Is the value of the first object.
00101     /// \param val2
00102     /// Is the value of the second object.
00103     ///
00104     /// \return
00105     /// Returns a positive value if val1 is greater than val2, negative if val1 is smaller than val2 or zero if both val1 and val2 are equal.
00106     SDF_API virtual int Compare( const wchar_t* name, FdoInt32 val1, FdoInt32 val2 );
00107 
00108     /// \brief
00109     /// Compares int16 values.
00110     ///
00111     /// \param name
00112     /// Is the property name.</param>
00113     //
00114     /// \param val1
00115     /// Is the value of the first object.
00116     /// \param val2
00117     /// Is the value of the second object.
00118     ///
00119     /// \return
00120     /// Returns a positive value if val1 is greater than val2, negative if val1 is smaller than val2 or zero if both val1 and val2 are equal.
00121     SDF_API virtual int Compare( const wchar_t* name, FdoInt16 val1, FdoInt16 val2 );
00122 
00123     /// \brief
00124     /// Compares string values.
00125     ///
00126     /// \param name
00127     /// Is the property name.</param>
00128     //
00129     /// \param val1
00130     /// Is the value of the first object.
00131     /// \param val2
00132     /// Is the value of the second object.
00133     ///
00134     /// \return
00135     /// Returns a positive value if val1 is greater than val2, negative if val1 is smaller than val2 or zero if both val1 and val2 are equal.
00136     SDF_API virtual int Compare( const wchar_t* name, const wchar_t* val1, const wchar_t* val2 );
00137 
00138     /// \brief
00139     /// Compares date time values.
00140     ///
00141     /// \param name
00142     /// Is the property name.</param>
00143     //
00144     /// \param val1
00145     /// Is the value of the first object.
00146     /// \param val2
00147     /// Is the value of the second object.
00148     ///
00149     /// \return
00150     /// Returns a positive value if val1 is greater than val2, negative if val1 is smaller than val2 or zero if both val1 and val2 are equal.
00151     SDF_API virtual int Compare( const wchar_t* name, FdoDateTime val1, FdoDateTime val2 );
00152 
00153     /// \brief
00154     /// Compares unsigned char values.
00155     ///
00156     /// \param name
00157     /// Is the property name.</param>
00158     //
00159     /// \param val1
00160     /// Is the value of the first object.
00161     /// \param val2
00162     /// Is the value of the second object.
00163     ///
00164     /// \return
00165     /// Returns a positive value if val1 is greater than val2, negative if val1 is smaller than val2 or zero if both val1 and val2 are equal.
00166     SDF_API virtual int Compare( const wchar_t* name, unsigned char val1, unsigned char val2 );
00167 
00168 };
00169 
00170 
00171 #endif
00172 
00173 

Comments?