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 #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 /// <summary>The factory function that can be used to create new instance of this class.</summary> 00042 /// <returns>Returns a new instance of theSdfCompareHandler class.</returns> 00043 SDF_API static SdfCompareHandler* Create(); 00044 00045 /// <summary>Compares double values.</summary> 00046 /// <param name="name">Is the property name.</param> 00047 /// <param name="val1">Is the value of the first object.</param> 00048 /// <param name="val1">Is the value of the second object.</param> 00049 /// <returns>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.</returns> 00050 SDF_API virtual int Compare( const wchar_t* name, double val1, double val2 ); 00051 00052 /// <summary>Compares float values.</summary> 00053 /// <param name="name">Is the property name.</param> 00054 /// <param name="val1">Is the value of the first object.</param> 00055 /// <param name="val1">Is the value of the second object.</param> 00056 /// <returns>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.</returns> 00057 SDF_API virtual int Compare( const wchar_t* name, float val1, float val2 ); 00058 00059 /// <summary>Compares int64 values.</summary> 00060 /// <param name="name">Is the property name.</param> 00061 /// <param name="val1">Is the value of the first object.</param> 00062 /// <param name="val1">Is the value of the second object.</param> 00063 /// <returns>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.</returns> 00064 SDF_API virtual int Compare( const wchar_t* name, FdoInt64 val1, FdoInt64 val2 ); 00065 00066 /// <summary>Compares int32 values.</summary> 00067 /// <param name="name">Is the property name.</param> 00068 /// <param name="val1">Is the value of the first object.</param> 00069 /// <param name="val1">Is the value of the second object.</param> 00070 /// <returns>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.</returns> 00071 SDF_API virtual int Compare( const wchar_t* name, FdoInt32 val1, FdoInt32 val2 ); 00072 00073 /// <summary>Compares int16 values.</summary> 00074 /// <param name="name">Is the property name.</param> 00075 /// <param name="val1">Is the value of the first object.</param> 00076 /// <param name="val1">Is the value of the second object.</param> 00077 /// <returns>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.</returns> 00078 SDF_API virtual int Compare( const wchar_t* name, FdoInt16 val1, FdoInt16 val2 ); 00079 00080 /// <summary>Compares string values.</summary> 00081 /// <param name="name">Is the property name.</param> 00082 /// <param name="val1">Is the value of the first object.</param> 00083 /// <param name="val1">Is the value of the second object.</param> 00084 /// <returns>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.</returns> 00085 SDF_API virtual int Compare( const wchar_t* name, const wchar_t* val1, const wchar_t* val2 ); 00086 00087 /// <summary>Compares date time values.</summary> 00088 /// <param name="name">Is the property name.</param> 00089 /// <param name="val1">Is the value of the first object.</param> 00090 /// <param name="val1">Is the value of the second object.</param> 00091 /// <returns>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.</returns> 00092 SDF_API virtual int Compare( const wchar_t* name, FdoDateTime val1, FdoDateTime val2 ); 00093 00094 /// <summary>Compares unsigned char values.</summary> 00095 /// <param name="name">Is the property name.</param> 00096 /// <param name="val1">Is the value of the first object.</param> 00097 /// <param name="val1">Is the value of the second object.</param> 00098 /// <returns>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.</returns> 00099 SDF_API virtual int Compare( const wchar_t* name, unsigned char val1, unsigned char val2 ); 00100 00101 }; 00102 00103 00104 #endif 00105 00106
Comments? |