FDO API Reference | Feature Data Objects |
00001 #ifndef FDO_DICTIONARY_ELEMENT_H 00002 #define FDO_DICTIONARY_ELEMENT_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 #include <Common/Disposable.h> 00023 00024 /// \brief 00025 /// FdoDictionaryElement is an element in a FdoDictionary. It consists of a 00026 /// name-value pair. 00027 class FdoDictionaryElement : public FdoDisposable 00028 { 00029 friend class FdoCommonInternal; 00030 00031 public: 00032 00033 /// \brief 00034 /// Constructs and initializes a a FdoDictionaryElement 00035 /// 00036 /// \param name 00037 /// Input the name of the element (required) 00038 /// \param value 00039 /// Input the value of the element. Can be blank (L"") 00040 /// 00041 /// \return 00042 /// Returns FdoDictionaryElement 00043 /// 00044 FDO_API_COMMON static FdoDictionaryElement* Create(FdoString* name, FdoString* value); 00045 00046 /// \brief 00047 /// Gets the name of this element 00048 /// 00049 /// \return 00050 /// Returns the element name 00051 /// 00052 FDO_API_COMMON virtual FdoString* GetName(); 00053 00054 /// \brief 00055 /// Indicates that this object does not allow its name 00056 /// to change. Not allowing name change allows more efficient 00057 /// random access to FdoDictionary. 00058 /// 00059 /// \return 00060 /// Returns false 00061 /// 00062 FDO_API_COMMON virtual FdoBoolean CanSetName() 00063 { 00064 return false; 00065 } 00066 00067 /// \brief 00068 /// Gets the value of this dictionary element. 00069 /// 00070 /// \return 00071 /// Returns the element value 00072 /// 00073 FDO_API_COMMON virtual FdoString* GetValue(); 00074 00075 /// \brief 00076 /// Sets the value of this dictionary element 00077 /// 00078 /// \param value 00079 /// Input the element value 00080 /// 00081 FDO_API_COMMON virtual void SetValue(FdoString* value); 00082 00083 /// \cond DOXYGEN-IGNORE 00084 protected: 00085 /// Constructs a default instance of a FdoDictionaryElement. 00086 FDO_API_COMMON FdoDictionaryElement() 00087 { 00088 } 00089 00090 /// Constructs an instance of a FdoDictionaryElement using the specified arguments. 00091 FDO_API_COMMON FdoDictionaryElement(FdoString* name, FdoString* value); 00092 00093 FDO_API_COMMON virtual ~FdoDictionaryElement() {} 00094 /// \endcond 00095 00096 private: 00097 00098 /// The name of the dictionary element. 00099 FdoStringP mName; 00100 00101 /// The element value 00102 FdoStringP mValue; 00103 }; 00104 00105 /// \ingroup (typedefs) 00106 /// \brief 00107 /// FdoDictionaryElementP is a FdoPtr on FdoDictionaryElement, provided for convenience. 00108 typedef FdoPtr<FdoDictionaryElement> FdoDictionaryElementP; 00109 00110 #endif 00111 00112
Comments or suggestions? Send us feedback. |