FDO API Reference Feature Data Objects

NetworkLinkFeatureClass.h

Go to the documentation of this file.
00001 #ifndef _NETWORKLINKFEATURECLASS_H_
00002 #define _NETWORKLINKFEATURECLASS_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/NetworkFeatureClass.h>
00027 #include <Fdo/Schema/GeometricPropertyDefinition.h>
00028 #include <Fdo/Schema/ClassType.h>
00029 
00030 /// \brief
00031 /// FdoNetworkLinkFeature derives from FdoNetworkFeature 
00032 /// and can be used to represent a logical link feature.
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 FdoNetworkLinkFeatureClass : public FdoNetworkFeatureClass
00038 {
00039 
00040 protected:
00041 /// \cond DOXYGEN-IGNORE
00042     /// Constructs a default instance of an FdoNetworkLinkFeatureClass.
00043     FdoNetworkLinkFeatureClass();
00044 
00045     /// Constructs an instance of an FdoNetworkLinkFeatureClass using the specified arguments.
00046     FdoNetworkLinkFeatureClass(FdoString* name, FdoString* description);
00047 
00048     virtual ~FdoNetworkLinkFeatureClass();
00049 
00050     virtual void Dispose();
00051 /// \endcond
00052 
00053 public:
00054     /// \brief
00055     /// Constructs a default instance of an FdoNetworkLinkFeatureClass.
00056     /// 
00057     /// \return
00058     /// Returns FdoNetworkLinkFeatureClass
00059     /// 
00060     FDO_API static FdoNetworkLinkFeatureClass* Create();
00061 
00062     /// \brief
00063     /// Constructs an instance of an FdoNetworkLinkFeatureClass using the specified arguments.
00064     /// 
00065     /// \param name 
00066     /// Input name
00067     /// \param description 
00068     /// Input description
00069     /// 
00070     /// \return
00071     /// Returns FdoNetworkLinkFeatureClass
00072     /// 
00073     FDO_API static FdoNetworkLinkFeatureClass* Create(FdoString* name, FdoString* description);
00074 
00075     /// \brief
00076     /// Gets the concrete class type.
00077     /// 
00078     /// \return
00079     /// Returns class type
00080     /// 
00081     FDO_API virtual FdoClassType GetClassType();
00082 
00083     /// \brief
00084     /// Gets a reference to the start node property.
00085     /// 
00086     /// \return
00087     /// Returns an association property definition
00088     /// 
00089     FDO_API FdoAssociationPropertyDefinition* GetStartNodeProperty();
00090 
00091     /// \brief
00092     /// Sets a reference to the start node property.
00093     /// 
00094     /// \param value 
00095     /// Input an association property definition
00096     /// 
00097     /// \return
00098     /// Returns nothing
00099     /// 
00100     FDO_API void SetStartNodeProperty(FdoAssociationPropertyDefinition* value);
00101 
00102     /// \brief
00103     /// Gets a reference to the end node property.
00104     /// 
00105     /// \return
00106     /// Returns an association property definition
00107     /// 
00108     FDO_API FdoAssociationPropertyDefinition* GetEndNodeProperty();
00109 
00110     /// \brief
00111     /// Sets a reference to the end node property.
00112     /// 
00113     /// \param value 
00114     /// Input an association property definition
00115     /// 
00116     /// \return
00117     /// Returns nothing
00118     /// 
00119     FDO_API void SetEndNodeProperty(FdoAssociationPropertyDefinition* value);
00120     
00121 /// \cond DOXYGEN-IGNORE
00122     // Public non-API functions for XML and Schema Merge support
00123 
00124     // Update this property from the given property.
00125     virtual void Set( FdoClassDefinition* pClass, FdoSchemaMergeContext* pContext );
00126 
00127     // Checks referenced elements. 
00128     // Adds errors to the given merge context if the start or end node properties 
00129     // are marked for delete.
00130     virtual void CheckReferences( FdoSchemaMergeContext* pContext );
00131 
00132     /// Initialize this property from its XML attributes
00133     virtual void InitFromXml(const FdoString* classTypeName, FdoSchemaXmlContext* pContext, FdoXmlAttributeCollection* attrs);
00134 
00135     /// Handle sub-elements such as properties
00136     /// Element start
00137     virtual FdoXmlSaxHandler* XmlStartElement(
00138         FdoXmlSaxContext* context, 
00139         FdoString* uri, 
00140         FdoString* name, 
00141         FdoString* qname, 
00142         FdoXmlAttributeCollection* atts
00143     );
00144     /// Element end
00145     virtual FdoBoolean XmlEndElement(
00146         FdoXmlSaxContext* context, 
00147         FdoString* uri, 
00148         FdoString* name, 
00149         FdoString* qname
00150     );
00151 
00152     /// Serialize this property to XML.
00153     virtual void _writeXml( FdoSchemaXmlContext* pContext );
00154 
00155 
00156 private:
00157     FdoAssociationPropertyDefinition    *m_startNodeFeature;
00158     FdoAssociationPropertyDefinition    *m_endNodeFeature;
00159 
00160     bool                                m_bStartNode;
00161     bool                                m_bEndNode;
00162     FdoAssociationPropertyDefinition    *m_startNodeFeatureHandler;
00163     FdoAssociationPropertyDefinition    *m_endNodeFeatureHandler;
00164 
00165 protected:
00166     /// FdoFeatureSchema::RejectChanges() support
00167     virtual void    _StartChanges();
00168     virtual void    _BeginChangeProcessing();
00169     virtual void    _AcceptChanges();
00170     virtual void    _RejectChanges();
00171     virtual void    _EndChangeProcessing();
00172     FdoAssociationPropertyDefinition    *m_startNodeFeatureCHANGED;
00173     FdoAssociationPropertyDefinition    *m_endNodeFeatureCHANGED;
00174 /// \endcond
00175 };
00176 
00177 /// \brief
00178 /// FdoNetworkLinkFeatureClassP is a FdoPtr on FdoNetworkLinkFeatureClass, provided for convenience.
00179 typedef FdoPtr<FdoNetworkLinkFeatureClass> FdoNetworkLinkFeatureClassP;
00180 
00181 #endif
00182 
00183 

Comments or suggestions? Send us feedback.