FDO API Reference | Feature Data Objects |
00001 #ifndef _DATAPROPERTYDEFINITIONCOLLECTION_H_ 00002 #define _DATAPROPERTYDEFINITIONCOLLECTION_H_ 00003 00004 // 00005 // Copyright (C) 2004-2006 Autodesk, Inc. 00006 // 00007 // This library is free software; you can redistribute it and/or 00008 // modify it under the terms of version 2.1 of the GNU Lesser 00009 // General Public License as published by the Free Software Foundation. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 // 00020 00021 #ifdef _WIN32 00022 #pragma once 00023 #endif 00024 00025 #include <FdoStd.h> 00026 #include <Fdo/Schema/DataPropertyDefinition.h> 00027 #include <Fdo/Schema/SchemaCollection.h> 00028 00029 class FdoClassDefinition; 00030 00031 /// \brief 00032 /// The FdoDataPropertyDefinitionCollection class represents a collection of FdoDataPropertyDefinition objects. 00033 class FdoDataPropertyDefinitionCollection: public FdoSchemaCollection<FdoDataPropertyDefinition> 00034 { 00035 friend class FdoClassDefinition; 00036 friend class FdoAssociationPropertyDefinition; 00037 00038 public: 00039 00040 protected: 00041 /// \cond DOXYGEN-IGNORE 00042 FdoDataPropertyDefinitionCollection() 00043 { 00044 } 00045 /// Constructs an instance of a DataPropertyDefinitionCollection using the specified argument. 00046 FdoDataPropertyDefinitionCollection(FdoSchemaElement* parent) : FdoSchemaCollection<FdoDataPropertyDefinition>(parent) 00047 { 00048 /// DataPropertyCollection is only used for identityProperties, which only reference items 00049 /// in the Properties collection. Since it doesn't own these items, the parent shouldn't 00050 /// be set when adding to this collection. 00051 m_setItemParent = false; 00052 } 00053 00054 virtual ~FdoDataPropertyDefinitionCollection() 00055 { 00056 } 00057 00058 virtual void Dispose() 00059 { 00060 delete this; 00061 } 00062 /// \endcond 00063 00064 public: 00065 00066 /// \brief 00067 /// Constructs an instance of an FdoDataPropertyDefinitionCollection using the specified argument. 00068 /// 00069 /// \param parent 00070 /// Input parent 00071 /// 00072 /// \return 00073 /// Returns FdoDataPropertyDefinitionCollection 00074 /// 00075 FDO_API static FdoDataPropertyDefinitionCollection* Create(FdoSchemaElement* parent); 00076 00077 /// \brief 00078 /// Sets the item in the collection at the specified index to the specified value. 00079 /// Throws an invalid argument exception if the index is out of range. 00080 /// 00081 /// \param index 00082 /// Input index 00083 /// \param value 00084 /// Input value 00085 /// 00086 /// \return 00087 /// Returns nothing 00088 /// 00089 FDO_API virtual void SetItem(FdoInt32 index, FdoDataPropertyDefinition* value); 00090 00091 /// \brief 00092 /// Adds the specified item to the end of the collection. Returns the 00093 /// index of the newly added item. 00094 /// 00095 /// \param value 00096 /// Input value 00097 /// 00098 /// \return 00099 /// Returns the index of the newly added item 00100 /// 00101 FDO_API virtual FdoInt32 Add(FdoDataPropertyDefinition* value); 00102 00103 /// \brief 00104 /// Inserts the specified item at the specified index within the collection. 00105 /// Items following the insertion point are moved down to accommodate the new item. 00106 /// Throws an invalid argument exception if the specified index is out of range. 00107 /// 00108 /// \param index 00109 /// Input index 00110 /// \param value 00111 /// Input value 00112 /// 00113 /// \return 00114 /// Returns nothing 00115 /// 00116 FDO_API virtual void Insert(FdoInt32 index, FdoDataPropertyDefinition* value); 00117 }; 00118 00119 /// \brief 00120 /// FdoDataPropertiesP is a FdoPtr on FdoDataPropertyDefinitionCollection, provided for convenience. 00121 typedef FdoPtr<FdoDataPropertyDefinitionCollection> FdoDataPropertiesP; 00122 00123 #endif 00124 00125
Comments or suggestions? Send us feedback. |