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