FDO API Reference Feature Data Objects

FeatureClass.h

Go to the documentation of this file.
00001 #ifndef _FEATURECLASS_H_
00002 #define _FEATURECLASS_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/ClassDefinition.h>
00027 #include <Fdo/Schema/GeometricPropertyDefinition.h>
00028 #include <Fdo/Schema/ClassType.h>
00029 
00030 /// \brief
00031 /// The FdoFeatureClass class can be used to represent spatial or non-spatial features.
00032 /// Spatial features must have at lease one geometric property. The FdoFeatureClass
00033 /// type has one pre-defined base property "Bounds". The "Bounds" read-only
00034 /// property can be used to get the geometric boundary of the spatial feature.
00035 /// The value of this property will be null if the feature is not a spatial
00036 /// feature.
00037 class FdoFeatureClass : public FdoClassDefinition
00038 {
00039     template <class OBJ> friend class FdoSchemaCollection;
00040 
00041 protected:
00042 /// \cond DOXYGEN-IGNORE
00043     /// Constructs a default instance of an FdoFeatureClass.
00044     FdoFeatureClass();
00045 
00046     /// Constructs an instance of an FdoFeatureClass using the specified arguments.
00047     FdoFeatureClass(FdoString* name, FdoString* description);
00048 
00049     virtual ~FdoFeatureClass();
00050 
00051     virtual void Dispose();
00052 /// \endcond
00053 
00054 public:
00055     /// \brief
00056     /// Constructs a default instance of an FdoFeatureClass.
00057     /// 
00058     /// \return
00059     /// Returns FdoFeatureClass
00060     /// 
00061     FDO_API static FdoFeatureClass* Create();
00062 
00063     /// \brief
00064     /// Constructs an instance of an FdoFeatureClass using the specified arguments.
00065     /// 
00066     /// \param name 
00067     /// Input name
00068     /// \param description 
00069     /// Input description
00070     /// 
00071     /// \return
00072     /// Returns FdoFeatureClass
00073     /// 
00074     FDO_API static FdoFeatureClass* Create(FdoString* name, FdoString* description);
00075 
00076     /// \brief
00077     /// Gets the concrete class type.
00078     /// 
00079     /// \return
00080     /// Returns class type
00081     /// 
00082     FDO_API virtual FdoClassType GetClassType();
00083 
00084     /// \brief
00085     /// Gets the geometric property that defines the geometry for this spatial 
00086     /// feature class.
00087     /// 
00088     /// \return
00089     /// Returns the geometric property
00090     /// 
00091     FDO_API FdoGeometricPropertyDefinition* GetGeometryProperty();
00092 
00093     /// \brief
00094     /// Sets the geometric property that defines the geometry for this spatial 
00095     /// feature class. The specified FdoGeometricPropertyDefinition must be a member 
00096     /// of either the FdoClassDefinition.GetBaseProperties or FdoClassDefinition.GetProperties 
00097     /// collection.
00098     /// 
00099     /// \param value 
00100     /// Input the geometric property
00101     /// 
00102     /// \return
00103     /// Returns nothing
00104     /// 
00105     FDO_API void SetGeometryProperty(FdoGeometricPropertyDefinition* value);
00106 
00107 /// \cond DOXYGEN-IGNORE
00108     /// Public non-API functions for XML support
00109 
00110     /// Update this feature class from the given feature class.
00111     virtual void Set( FdoClassDefinition* pClass, FdoSchemaXmlContext* pContext );
00112 
00113     /// Initialize the feature class from its XML attributes
00114     virtual void InitFromXml(const FdoString* classTypeName, FdoSchemaXmlContext* pContext, FdoXmlAttributeCollection* attrs);
00115 
00116     /// Serialize this feature class to XML.
00117     virtual void _writeXml( FdoSchemaXmlContext* pContext );
00118     virtual void _writeBaseXml( FdoSchemaXmlContext* pContext );
00119 
00120 private:
00121     FdoGeometricPropertyDefinition* m_geometry;
00122 
00123 protected:
00124     /// FdoFeatureSchema::RejectChanges() support
00125     virtual void    _StartChanges();
00126     virtual void    _BeginChangeProcessing();
00127     virtual void    _AcceptChanges();
00128     virtual void    _RejectChanges();
00129     virtual void    _EndChangeProcessing();
00130     FdoGeometricPropertyDefinition* m_geometryCHANGED;
00131 /// \endcond
00132 };
00133 
00134 /// \brief
00135 /// FdoFeatureClassP is a FdoPtr on FdoFeatureClass, provided for convenience.
00136 typedef FdoPtr<FdoFeatureClass> FdoFeatureClassP;
00137 
00138 #endif
00139 
00140 

Comments or suggestions? Send us feedback.