FDO API Reference | Feature Data Objects |
00001 #ifndef _PROPERTYVALUE_H_ 00002 #define _PROPERTYVALUE_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/Identifier.h> 00028 #include <Fdo/Expression/ValueExpression.h> 00029 #include <Fdo/Commands/CommandException.h> 00030 #include <Common/IStreamReader.h> 00031 00032 /// \brief 00033 /// The FdoPropertyValue class represents a property name/value pair. Instances of 00034 /// this class are used to specify or hold onto a reference to a property name 00035 /// and the properties value. 00036 class FdoPropertyValue : public FdoIDisposable 00037 { 00038 protected: 00039 /// \cond DOXYGEN-IGNORE 00040 /// Constructs a default instance of an FdoPropertyValue. 00041 FdoPropertyValue(); 00042 00043 /// Constructs an instance of an FdoPropertyValue using the specified arguments. 00044 FdoPropertyValue(FdoIdentifier* name, FdoValueExpression* value = NULL); 00045 00046 /// Constructs an instance of an FdoPropertyValue using the specified arguments. 00047 FdoPropertyValue(FdoString* name, FdoValueExpression* value = NULL); 00048 00049 virtual ~FdoPropertyValue(); 00050 00051 virtual void Dispose(); 00052 /// \endcond 00053 00054 public: 00055 /// \brief 00056 /// Constructs a default instance of an FdoPropertyValue. 00057 /// 00058 /// \return 00059 /// Returns FdoPropertyValue 00060 /// 00061 FDO_API static FdoPropertyValue* Create(); 00062 00063 /// \brief 00064 /// Constructs an instance of an FdoPropertyValue using the specified arguments. 00065 /// 00066 /// \param name 00067 /// Input property name as identifier 00068 /// \param value 00069 /// Input value of property 00070 /// 00071 /// \return 00072 /// Returns FdoPropertyValue 00073 /// 00074 FDO_API static FdoPropertyValue* Create(FdoIdentifier* name, FdoValueExpression* value); 00075 00076 /// \brief 00077 /// Constructs an instance of an FdoPropertyValue using the specified arguments. 00078 /// 00079 /// \param name 00080 /// Input property name as a string 00081 /// \param value 00082 /// Input value of property 00083 /// 00084 /// \return 00085 /// Returns FdoPropertyValue 00086 /// 00087 FDO_API static FdoPropertyValue* Create(FdoString* name, FdoValueExpression* value); 00088 00089 /// \brief 00090 /// Gets the property name as an identifier. 00091 /// 00092 /// \return 00093 /// Returns identifier 00094 /// 00095 FDO_API FdoIdentifier* GetName(); 00096 00097 /// \brief 00098 /// Sets the property name as an identifier. 00099 /// 00100 /// \param value 00101 /// Input identifier 00102 /// 00103 /// \return 00104 /// Returns nothing 00105 /// 00106 FDO_API void SetName(FdoIdentifier* value); 00107 00108 /// \brief 00109 /// Sets the property name as a string. 00110 /// 00111 /// \param value 00112 /// Input string 00113 /// 00114 /// \return 00115 /// Returns nothing 00116 /// 00117 FDO_API void SetName(FdoString* value); 00118 00119 /// \brief 00120 /// Gets the value of the property as an FdoValueExpression. 00121 /// 00122 /// \return 00123 /// Returns FdoValueExpression 00124 /// 00125 FDO_API FdoValueExpression* GetValue(); 00126 00127 /// \brief 00128 /// Sets the value of the property as an FdoValueExpression. 00129 /// 00130 /// \param value 00131 /// Input value 00132 /// 00133 /// \return 00134 /// Returns nothing 00135 /// 00136 FDO_API void SetValue(FdoValueExpression* value); 00137 00138 /// \brief 00139 /// Sets the value of the property as a string. The string content 00140 /// will be parsed to produce the required FdoValueExpression. 00141 /// 00142 /// \param value 00143 /// Input value 00144 /// 00145 /// \return 00146 /// Returns nothing 00147 /// 00148 FDO_API void SetValue(FdoString* value); 00149 00150 /// \brief 00151 /// Provides a Reader on a external data source to allow reading 00152 /// in blocks of data. 00153 /// 00154 /// \param stream 00155 /// Input reference to a stream reader 00156 /// 00157 /// \return 00158 /// Returns nothing 00159 /// 00160 FDO_API void SetStreamReader(FdoIStreamReader *stream); 00161 00162 /// \brief 00163 /// Gets the value of the property as an Stream Reader. 00164 /// 00165 /// \return 00166 /// Returns FdoIStreamReader 00167 /// 00168 FDO_API FdoIStreamReader* GetStreamReader(); 00169 00170 private: 00171 FdoValueExpression *m_Value; 00172 FdoIdentifier *m_Name; 00173 FdoIStreamReader *m_StreamReader; 00174 }; 00175 #endif 00176 00177
Comments or suggestions? Send us feedback. |