FDO API Reference | Feature Data Objects |
00001 #ifndef _PROPERTYDEFINITION_H_ 00002 #define _PROPERTYDEFINITION_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/PropertyType.h> 00027 #include <Fdo/Schema/SchemaElement.h> 00028 00029 /// \brief 00030 /// FdoPropertyDefinition is an abstract class that derives from FdoSchemaElement. 00031 /// FdoPropertyDefinition is the base class of FdoDataPropertyDefinition, 00032 /// FdoGeometricPropertyDefinition, and FdoObjectPropertyDefinition. 00033 class FdoPropertyDefinition : public FdoSchemaElement 00034 { 00035 protected: 00036 /// \cond DOXYGEN-IGNORE 00037 /// Constructs a default instance of a PropertyDefinition. 00038 FdoPropertyDefinition(); 00039 00040 /// Constructs an instance of a PropertyDefinition using the specified 00041 /// arguments. 00042 FdoPropertyDefinition(FdoString* name, FdoString* description, bool system = false); 00043 00044 virtual ~FdoPropertyDefinition(); 00045 /// \endcond 00046 00047 public: 00048 /// \brief 00049 /// Abstract operation that must be implemented by derived classes to return the concrete property type. 00050 /// 00051 /// \return 00052 /// Returns the property type 00053 /// 00054 FDO_API virtual FdoPropertyType GetPropertyType() = 0; 00055 00056 /// \brief 00057 /// Gets the fully qualified name of this property 00058 /// 00059 /// \return 00060 /// Returns {schema_name}:{class_name}.{property_name} 00061 /// 00062 FDO_API virtual FdoStringP GetQualifiedName(); 00063 00064 /// \brief 00065 /// Returns a Boolean value that indicates if this is a system generated property. 00066 /// 00067 /// \return 00068 /// Returns true if this property is system generated, false otherwise. 00069 /// 00070 /// System properties are not written out to the XML schema file, which remains provider-portable. 00071 FDO_API virtual bool GetIsSystem(); 00072 00073 /// \brief 00074 /// Sets whether this is a system property. 00075 /// This function must only be called by an FDO Provider. Typically, it would be 00076 /// called by the DescribeSchema command implementation. 00077 /// 00078 /// \param value 00079 /// Input true if this is a system property. 00080 /// 00081 FDO_API virtual void SetIsSystem( bool value ); 00082 00083 /// \cond DOXYGEN-IGNORE 00084 /// Public non-API functions for XML and Schema Merge support 00085 00086 /// Update this property from the given property. 00087 virtual void Set( FdoPropertyDefinition* pProperty, FdoSchemaMergeContext* pContext ); 00088 00089 /// Initialize this property from its XML attributes 00090 virtual void InitFromXml(const FdoString* propertyTypeName, FdoSchemaXmlContext* pContext, FdoXmlAttributeCollection* attrs); 00091 virtual void InitFromXml(FdoSchemaXmlContext* pContext, FdoXmlAttributeCollection* attrs); 00092 00093 /// Serialize this property to XML. 00094 virtual void _writeXml( FdoSchemaXmlContext* pContext ); 00095 00096 protected: 00097 bool m_system; 00098 /// \endcond 00099 }; 00100 00101 /// \brief 00102 /// FdoPropertyP is a FdoPtr on FdoPropertyDefinition, provided for convenience. 00103 typedef FdoPtr<FdoPropertyDefinition> FdoPropertyP; 00104 00105 #endif 00106 00107
Comments or suggestions? Send us feedback. |