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