FDO API Reference | Feature Data Objects |
00001 #ifndef _DECIMALVALUE_H_ 00002 #define _DECIMALVALUE_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 FdoDecimalValue class derives from FdoDataValue and represents a decimal value. 00032 class FdoDecimalValue : public FdoDataValue 00033 { 00034 protected: 00035 /// \cond DOXYGEN-IGNORE 00036 /// \brief 00037 /// Constructs a default instance of an FdoDecimalValue with a 00038 /// value of null. 00039 /// \return 00040 /// Returns nothing 00041 /// 00042 FdoDecimalValue(); 00043 00044 /// \brief 00045 /// Constructs a default instance of an FdoDecimalValue using the specified arguments. 00046 /// \param value 00047 /// Input a double 00048 /// 00049 /// \return 00050 /// Returns nothing 00051 /// 00052 FdoDecimalValue(double value); 00053 00054 /// \brief 00055 /// Default destructor for FdoDecimalValue. 00056 /// \return 00057 /// Returns nothing 00058 /// 00059 virtual ~FdoDecimalValue(); 00060 00061 virtual void Dispose(); 00062 /// \endcond 00063 00064 public: 00065 00066 /// \brief 00067 /// Constructs a default instance of an FdoDecimalValue with a value of null. 00068 /// 00069 /// \return 00070 /// Returns nothing 00071 /// 00072 FDO_API static FdoDecimalValue* Create(); 00073 00074 /// \brief 00075 /// Constructs an instance of an FdoDecimalValue using the specified arguments. 00076 /// 00077 /// \param value 00078 /// Input a double 00079 /// 00080 /// \return 00081 /// Returns nothing 00082 /// 00083 FDO_API static FdoDecimalValue* Create(double value); 00084 00085 /// \brief 00086 /// Gets the data type of the FdoDecimalValue. 00087 /// 00088 /// \return 00089 /// Returns an FdoDataType 00090 /// 00091 FDO_API FdoDataType GetDataType(); 00092 00093 /// \brief 00094 /// Gets the decimal value. 00095 /// 00096 /// \return 00097 /// Returns a double 00098 /// 00099 FDO_API double GetDecimal(); 00100 00101 /// \brief 00102 /// Sets the decimal value. 00103 /// 00104 /// \param value 00105 /// Input a double 00106 /// 00107 /// \return 00108 /// Returns nothing 00109 /// 00110 FDO_API void SetDecimal(double value); 00111 00112 /// \brief 00113 /// Overrides FdoExpression.Process to pass the FdoDecimalValue to the appropriate 00114 /// expression processor operation. 00115 /// 00116 /// \param p 00117 /// Input an FdoIExpressionProcessor 00118 /// 00119 /// \return 00120 /// Returns nothing 00121 /// 00122 FDO_API void Process(FdoIExpressionProcessor* p); 00123 00124 /// \brief 00125 /// Returns the well defined text representation of this expression. 00126 /// 00127 /// \return 00128 /// Returns a character string 00129 /// 00130 FDO_API FdoString* ToString(); 00131 00132 /// \brief 00133 /// A cast operator to get the decimal value. 00134 /// 00135 /// \return 00136 /// Returns a double 00137 /// 00138 FDO_API operator double() 00139 { 00140 return m_data; 00141 } 00142 00143 protected: 00144 /// \cond DOXYGEN-IGNORE 00145 double m_data; 00146 }; 00147 /// \endcond 00148 #endif 00149 00150
Comments or suggestions? Send us feedback. |