- Main Page
- Related Pages
- Modules
- Classes
- Files

# 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 /// \cond DOXYGEN-IGNORE
    00042 protected:
    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 and Schema Merge support
    00109
    00110     // Update this feature class from the given feature class.
    00111     virtual void Set( FdoClassDefinition* pClass, FdoSchemaMergeContext* pContext );
    00112
    00113     // Checks referenced elements.
    00114     // Adds errors to the given merge context if the GeometryProperty
    00115     // is marked for delete.
    00116     virtual void CheckReferences( FdoSchemaMergeContext* pContext );
    00117
    00118     /// Initialize the feature class from its XML attributes
    00119     virtual void InitFromXml(FdoString* classTypeName, FdoSchemaXmlContext* pContext, FdoXmlAttributeCollection* attrs);
    00120
    00121     /// Serialize this feature class to XML.
    00122     virtual void _writeXml( FdoSchemaXmlContext* pContext );
    00123     virtual void _writeBaseXml( FdoSchemaXmlContext* pContext );
    00124
    00125 private:
    00126     FdoGeometricPropertyDefinition* m_geometry;
    00127
    00128 protected:
    00129     /// FdoFeatureSchema::RejectChanges() support
    00130     virtual void    _StartChanges();
    00131     virtual void    _BeginChangeProcessing();
    00132     virtual void    _AcceptChanges();
    00133     virtual void    _RejectChanges();
    00134     virtual void    _EndChangeProcessing();
    00135     FdoGeometricPropertyDefinition* m_geometryCHANGED;
    00136 /// \endcond
    00137 };
    00138
    00139 /// \ingroup (typedefs)
    00140 /// \brief
    00141 /// FdoFeatureClassP is a FdoPtr on FdoFeatureClass, provided for convenience.
    00142 typedef FdoPtr<FdoFeatureClass> FdoFeatureClassP;
    00143
    00144 #endif
    00145
    00146

Please send us your comment about this page