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

# NetworkFeatureClass.h

Go to the documentation of this file.

    00001 #ifndef _NETWORKFEATURECLASS_H_
    00002 #define _NETWORKFEATURECLASS_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/FeatureClass.h>
    00027 #include <Fdo/Schema/AssociationPropertyDefinition.h>
    00028 #include <Fdo/Schema/ClassType.h>
    00029
    00030 /// \brief
    00031 /// FdoNetworkFeature is an abstract class that derives from FdoFeatureClass and is a base
    00032 /// for the FdoNetworkNodeFeature and FdoNetworkLinkFeature.
    00033 /// \note
    00034 /// This Help topic is provided for informational use only. There is
    00035 /// no interface or support provided. Autodesk reserves the right to change
    00036 /// the software related to the content herein.
    00037 class FdoNetworkFeatureClass : public FdoFeatureClass
    00038 {
    00039
    00040 /// \cond DOXYGEN-IGNORE
    00041 protected:
    00042     /// Constructs a default instance of an FdoNetworkFeatureClass.
    00043     /// To make a class of this type, you need to either create a FdoNetworkNodeFeatureClass
    00044     /// or FdoNetworkLinkFeatureClass.
    00045     FdoNetworkFeatureClass();
    00046
    00047     /// Constructs an instance of an FdoNetworkNodeFeatureClass using the specified arguments.
    00048     FdoNetworkFeatureClass(FdoString* name, FdoString* description);
    00049
    00050     virtual ~FdoNetworkFeatureClass();
    00051 /// \endcond
    00052
    00053 public:
    00054
    00055     /// \brief
    00056     /// Gets a reference to the cost property.
    00057     ///
    00058     /// \return
    00059     /// Returns a property definition
    00060     ///
    00061     FDO_API FdoDataPropertyDefinition* GetCostProperty();
    00062
    00063     /// \brief
    00064     /// Sets a reference to the cost property.
    00065     ///
    00066     /// \param value
    00067     /// Input a property definition
    00068     ///
    00069     /// \return
    00070     /// Returns nothing
    00071     ///
    00072     FDO_API void SetCostProperty(FdoDataPropertyDefinition* value);
    00073
    00074     /// \brief
    00075     /// Gets a reference to the network property.
    00076     ///
    00077     /// \return
    00078     /// Returns an association property definition
    00079     ///
    00080     FDO_API FdoAssociationPropertyDefinition* GetNetworkProperty();
    00081
    00082     /// \brief
    00083     /// Sets a reference to the network property.
    00084     ///
    00085     /// \param value
    00086     /// Input an association property definition
    00087     ///
    00088     /// \return
    00089     /// Returns nothing
    00090     ///
    00091     FDO_API void SetNetworkProperty(FdoAssociationPropertyDefinition* value);
    00092
    00093     /// \brief
    00094     /// Gets a reference to the referenced feature property.
    00095     ///
    00096     /// \return
    00097     /// Returns an association property definition
    00098     ///
    00099     FDO_API FdoAssociationPropertyDefinition* GetReferencedFeatureProperty();
    00100
    00101     /// \brief
    00102     /// Sets a reference to the referenced feature property.
    00103     ///
    00104     /// \param value
    00105     /// Input an association property definition
    00106     ///
    00107     /// \return
    00108     /// Returns nothing
    00109     ///
    00110     FDO_API void SetReferencedFeatureProperty(FdoAssociationPropertyDefinition* value);
    00111
    00112     /// \brief
    00113     /// Gets a reference to the parent network feature property.
    00114     ///
    00115     /// \return
    00116     /// Returns an association property definition
    00117     ///
    00118     FDO_API FdoAssociationPropertyDefinition* GetParentNetworkFeatureProperty();
    00119
    00120     /// \brief
    00121     /// Sets a reference to the parent network feature property.
    00122     ///
    00123     /// \param value
    00124     /// Input an association property definition
    00125     ///
    00126     /// \return
    00127     /// Returns nothing
    00128     ///
    00129     FDO_API void SetParentNetworkFeatureProperty(FdoAssociationPropertyDefinition* value);
    00130
    00131 /// \cond DOXYGEN-IGNORE
    00132     // Public non-API functions for XML and Schema Merge support
    00133
    00134     // Update this property from the given property.
    00135     virtual void Set( FdoClassDefinition* pProperty, FdoSchemaMergeContext* pContext );
    00136
    00137     // Checks referenced elements.
    00138     // Adds errors to the given merge context if any of the  cost, referenced feature, network
    00139     // or parent network properties are marked for delete.
    00140     virtual void CheckReferences( FdoSchemaMergeContext* pContext );
    00141
    00142     /// Initialize this property from its XML attributes
    00143     virtual void InitFromXml(FdoSchemaXmlContext* pContext, FdoXmlAttributeCollection* attrs);
    00144
    00145     /// Handle sub-elements such as properties
    00146     /// Element start
    00147     virtual FdoXmlSaxHandler* XmlStartElement(
    00148         FdoXmlSaxContext* context,
    00149         FdoString* uri,
    00150         FdoString* name,
    00151         FdoString* qname,
    00152         FdoXmlAttributeCollection* atts
    00153     );
    00154     /// Element end
    00155     virtual FdoBoolean XmlEndElement(
    00156         FdoXmlSaxContext* context,
    00157         FdoString* uri,
    00158         FdoString* name,
    00159         FdoString* qname
    00160     );
    00161
    00162
    00163     /// Serialize this property to XML.
    00164     virtual void _writeXml( FdoSchemaXmlContext* pContext );
    00165
    00166
    00167 private:
    00168     FdoDataPropertyDefinition           *m_costProperty;
    00169     FdoAssociationPropertyDefinition    *m_network;
    00170     FdoAssociationPropertyDefinition    *m_referencedFeature;
    00171     FdoAssociationPropertyDefinition    *m_parentNetworkFeature;
    00172
    00173     bool                                m_bNetwork;
    00174     bool                                m_bReferenceFeature;
    00175     bool                                m_bParentNetwork;
    00176
    00177     FdoAssociationPropertyDefinition    *m_networkHandler;
    00178     FdoAssociationPropertyDefinition    *m_referencedFeatureHandler;
    00179     FdoAssociationPropertyDefinition    *m_parentNetworkFeatureHandler;
    00180
    00181
    00182 protected:
    00183     virtual void    _StartChanges();
    00184     virtual void    _BeginChangeProcessing();
    00185     virtual void    _AcceptChanges();
    00186     virtual void    _RejectChanges();
    00187     virtual void    _EndChangeProcessing();
    00188     FdoDataPropertyDefinition           *m_costPropertyCHANGED;
    00189     FdoAssociationPropertyDefinition    *m_networkCHANGED;
    00190     FdoAssociationPropertyDefinition    *m_referencedFeatureCHANGED;
    00191     FdoAssociationPropertyDefinition    *m_parentNetworkFeatureCHANGED;
    00192 /// \endcond
    00193 };
    00194
    00195 /// \ingroup (typedefs)
    00196 /// \brief
    00197 /// FdoNetworkFeatureClassP is a FdoPtr on FdoNetworkFeatureClass, provided for convenience.
    00198 typedef FdoPtr<FdoNetworkFeatureClass> FdoNetworkFeatureClassP;
    00199
    00200 #endif
    00201
    00202

Please send us your comment about this page