FDO API Reference | Feature Data Objects |
00001 #ifndef _INT32VALUE_H_ 00002 #define _INT32VALUE_H_ 00003 // 00004 00005 // 00006 // Copyright (C) 2004-2006 Autodesk, Inc. 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of version 2.1 of the GNU Lesser 00010 // General Public License as published by the Free Software Foundation. 00011 // 00012 // This library is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 // Lesser General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU Lesser General Public 00018 // License along with this library; if not, write to the Free Software 00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 // 00021 00022 #ifdef _WIN32 00023 #pragma once 00024 #endif 00025 00026 #include <FdoStd.h> 00027 #include <Fdo/Expression/DataValue.h> 00028 #include <Fdo/Schema/DataType.h> 00029 00030 /// \brief 00031 /// The FdoInt32Value class derives from FdoDataValue and represents a 32-bit signed integer value. 00032 class FdoInt32Value : public FdoDataValue 00033 { 00034 /// \cond DOXYGEN-IGNORE 00035 friend class FdoByteValue; 00036 friend class FdoInt16Value; 00037 protected: 00038 /// \brief 00039 /// Constructs a default instance of an FdoInt32Value with a 00040 /// value of null. 00041 /// \return 00042 /// Returns nothing 00043 /// 00044 FdoInt32Value(); 00045 00046 /// \brief 00047 /// Constructs a default instance of an FdoInt32Value using the specified arguments. 00048 /// \param value 00049 /// Input a 32 bit integer 00050 /// 00051 /// \return 00052 /// Returns nothing 00053 /// 00054 FdoInt32Value(FdoInt32 value); 00055 00056 /// \brief 00057 /// Default destructor for FdoInt32Value. 00058 /// \return 00059 /// Returns nothing 00060 /// 00061 virtual ~FdoInt32Value(); 00062 00063 virtual void Dispose(); 00064 /// \endcond 00065 00066 public: 00067 /// \brief 00068 /// Constructs a default instance of an FdoInt32Value with a value of null. 00069 /// 00070 /// \return 00071 /// Returns nothing 00072 /// 00073 FDO_API static FdoInt32Value* Create(); 00074 00075 /// \brief 00076 /// Constructs a default instance of an FdoInt32Value using the specified arguments. 00077 /// 00078 /// \param value 00079 /// Input a 32 bit integer 00080 /// 00081 /// \return 00082 /// Returns nothing 00083 /// 00084 FDO_API static FdoInt32Value* Create(FdoInt32 value); 00085 00086 /// \brief 00087 /// Gets the data type of the FdoInt32Value. 00088 /// 00089 /// \return 00090 /// Returns an FdoDataType 00091 /// 00092 FDO_API FdoDataType GetDataType(); 00093 00094 /// \brief 00095 /// Gets the FdoInt32Value. 00096 /// 00097 /// \return 00098 /// Returns a 32 bit integer 00099 /// 00100 FDO_API FdoInt32 GetInt32(); 00101 00102 /// \brief 00103 /// Sets the FdoInt32Value. 00104 /// 00105 /// \param value 00106 /// Input a 32 bit integer 00107 /// 00108 /// \return 00109 /// Returns nothing 00110 /// 00111 FDO_API void SetInt32(FdoInt32 value); 00112 00113 /// \brief 00114 /// Overrides FdoExpression.Process to pass the FdoInt32Value to the appropriate 00115 /// expression processor operation. 00116 /// 00117 /// \param p 00118 /// Input an FdoIExpressionProcessor 00119 /// 00120 /// \return 00121 /// Returns nothing 00122 /// 00123 FDO_API void Process(FdoIExpressionProcessor* p); 00124 00125 /// \brief 00126 /// Returns the well defined text representation of this expression. 00127 /// 00128 /// \return 00129 /// Returns a character string 00130 /// 00131 FDO_API FdoString* ToString(); 00132 00133 /// \brief 00134 /// A cast operator to get the integer value. 00135 /// 00136 /// \return 00137 /// Returns a 32 bit integer 00138 /// 00139 FDO_API operator FdoInt32() 00140 { 00141 return m_data; 00142 } 00143 00144 /// \cond DOXYGEN-IGNORE 00145 protected: 00146 /// \brief 00147 /// Constructs an instance of an FdoInt32Value from another FdoDataValue. 00148 /// 00149 /// \param src 00150 /// Input the other FdoDataValue. Must be of one of the following types: 00151 /// FdoDataType_Byte 00152 /// FdoDataType_Int16 00153 /// FdoDataType_Int32 00154 /// \param truncate 00155 /// Input in the future, will determine what to do if source value does not fit in the int32 00156 /// number range: 00157 /// true - truncate the value to fit. 00158 /// false - throw an exception 00159 /// \param nullIfIncompatible 00160 /// Input in the future, will determine what to do if source value type is not compatible with the 00161 /// FDO int32 type: 00162 /// true - return NULL. 00163 /// false - throw an exception 00164 /// 00165 /// \return 00166 /// Returns an FdoInt32Value 00167 /// 00168 static FdoInt32Value* Create( 00169 FdoDataValue* src, 00170 FdoBoolean truncate = false, 00171 FdoBoolean nullIfIncompatible = false 00172 ); 00173 00174 // See FdoDataValue::DoCompare() 00175 virtual FdoCompareType DoCompare( FdoDataValue* other ); 00176 00177 FdoInt32 m_data; 00178 /// \endcond 00179 }; 00180 #endif 00181 00182
Comments or suggestions? Send us feedback. |