FDO API Reference Feature Data Objects

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 protected:
00041 /// \cond DOXYGEN-IGNORE
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 support
00133 
00134     /// Update this property from the given property.
00135     virtual void Set( FdoClassDefinition* pProperty, FdoSchemaXmlContext* pContext );
00136 
00137     /// Initialize this property from its XML attributes
00138     virtual void InitFromXml(FdoSchemaXmlContext* pContext, FdoXmlAttributeCollection* attrs);
00139 
00140     /// Handle sub-elements such as properties
00141     /// Element start
00142     virtual FdoXmlSaxHandler* XmlStartElement(
00143         FdoXmlSaxContext* context, 
00144         FdoString* uri, 
00145         FdoString* name, 
00146         FdoString* qname, 
00147         FdoXmlAttributeCollection* atts
00148     );
00149     /// Element end
00150     virtual FdoBoolean XmlEndElement(
00151         FdoXmlSaxContext* context, 
00152         FdoString* uri, 
00153         FdoString* name, 
00154         FdoString* qname
00155     );
00156 
00157 
00158     /// Serialize this property to XML.
00159     virtual void _writeXml( FdoSchemaXmlContext* pContext );
00160 
00161 
00162 private:
00163     FdoDataPropertyDefinition           *m_costProperty;
00164     FdoAssociationPropertyDefinition    *m_network;
00165     FdoAssociationPropertyDefinition    *m_referencedFeature;
00166     FdoAssociationPropertyDefinition    *m_parentNetworkFeature;
00167 
00168     bool                                m_bNetwork;
00169     bool                                m_bReferenceFeature;
00170     bool                                m_bParentNetwork;
00171 
00172     FdoAssociationPropertyDefinition    *m_networkHandler;
00173     FdoAssociationPropertyDefinition    *m_referencedFeatureHandler;
00174     FdoAssociationPropertyDefinition    *m_parentNetworkFeatureHandler;
00175 
00176 
00177 protected:
00178     virtual void    _StartChanges();
00179     virtual void    _BeginChangeProcessing();
00180     virtual void    _AcceptChanges();
00181     virtual void    _RejectChanges();
00182     virtual void    _EndChangeProcessing();
00183     FdoDataPropertyDefinition           *m_costPropertyCHANGED;
00184     FdoAssociationPropertyDefinition    *m_networkCHANGED;
00185     FdoAssociationPropertyDefinition    *m_referencedFeatureCHANGED;
00186     FdoAssociationPropertyDefinition    *m_parentNetworkFeatureCHANGED;
00187 /// \endcond
00188 };
00189 
00190 /// \brief
00191 /// FdoNetworkFeatureClassP is a FdoPtr on FdoNetworkFeatureClass, provided for convenience.
00192 typedef FdoPtr<FdoNetworkFeatureClass> FdoNetworkFeatureClassP;
00193 
00194 #endif
00195 
00196 

Comments or suggestions? Send us feedback.