FDO API Reference | Feature Data Objects |
00001 #ifndef _INT16VALUE_H_ 00002 #define _INT16VALUE_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 FdoInt16Value class derives from FdoDataValue and represents a 16-bit signed integer value. 00032 class FdoInt16Value : public FdoDataValue 00033 { 00034 /// \cond DOXYGEN-IGNORE 00035 friend class FdoByteValue; 00036 protected: 00037 /// \brief 00038 /// Constructs a default instance of an FdoInt16Value with a 00039 /// value of null. 00040 /// \return 00041 /// Returns nothing 00042 /// 00043 FdoInt16Value(); 00044 00045 /// \brief 00046 /// Constructs a default instance of an FdoInt16Value using the specified arguaments. 00047 /// \param value 00048 /// Input a 16 bit integer 00049 /// 00050 /// \return 00051 /// Returns nothing 00052 /// 00053 FdoInt16Value(FdoInt16 value); 00054 00055 /// \brief 00056 /// Default destructor for FdoInt16Value. 00057 /// \return 00058 /// Returns nothing 00059 /// 00060 virtual ~FdoInt16Value(); 00061 00062 virtual void Dispose(); 00063 /// \endcond 00064 00065 public: 00066 00067 /// \brief 00068 /// Constructs a default instance of an FdoInt16Value with a value of null. 00069 /// 00070 /// \return 00071 /// Returns the created FdoInt16Value 00072 /// 00073 FDO_API static FdoInt16Value* Create(); 00074 00075 /// \brief 00076 /// Constructs a default instance of an FdoInt16Value using the specified arguments. 00077 /// 00078 /// \param value 00079 /// Input a 16 bit integer 00080 /// 00081 /// \return 00082 /// Returns the created FdoInt16Value 00083 /// 00084 FDO_API static FdoInt16Value* Create(FdoInt16 value); 00085 00086 /// \brief 00087 /// Gets the data type of the FdoInt16Value. 00088 /// 00089 /// \return 00090 /// Returns an FdoDataType 00091 /// 00092 FDO_API FdoDataType GetDataType(); 00093 00094 /// \brief 00095 /// Gets the FdoInt16Value. 00096 /// 00097 /// \return 00098 /// Returns a 16 bit integer 00099 /// 00100 FDO_API FdoInt16 GetInt16(); 00101 00102 /// \brief 00103 /// Sets the FdoInt16Value. 00104 /// 00105 /// \param value 00106 /// Input a 16 bit integer 00107 /// 00108 /// \return 00109 /// Returns nothing 00110 /// 00111 FDO_API void SetInt16(FdoInt16 value); 00112 00113 /// \brief 00114 /// Overrides FdoExpression.Process to pass the FdoInt16Value 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 16 bit integer 00138 /// 00139 FDO_API operator FdoInt16() 00140 { 00141 return m_data; 00142 } 00143 00144 /// \cond DOXYGEN-IGNORE 00145 protected: 00146 /// \brief 00147 /// Constructs an instance of an FdoInt16Value 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 /// \param truncate 00154 /// Input in the future, will determine what to do if source value does not fit in the int16 00155 /// number range: 00156 /// true - truncate the value to fit. 00157 /// false - throw an exception 00158 /// \param nullIfIncompatible 00159 /// Input in the future, will determine what to do if source value type is not compatible with the 00160 /// FDO int16 type: 00161 /// true - return NULL. 00162 /// false - throw an exception 00163 /// 00164 /// \return 00165 /// Returns an FdoInt16Value 00166 /// 00167 static FdoInt16Value* Create( 00168 FdoDataValue* src, 00169 FdoBoolean truncate = false, 00170 FdoBoolean nullIfIncompatible = false 00171 ); 00172 00173 // See FdoDataValue::DoCompare() 00174 virtual FdoCompareType DoCompare( FdoDataValue* other ); 00175 00176 FdoInt16 m_data; 00177 /// \endcond 00178 }; 00179 #endif 00180 00181
Comments or suggestions? Send us feedback. |