FDO API Reference Feature Data Objects

NetworkClass.h

Go to the documentation of this file.
00001 #ifndef _NETWORKCLASS_H_
00002 #define _NETWORKCLASS_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/NetworkLayerClass.h>
00027 #include <Fdo/Schema/ClassDefinition.h>
00028 #include <Fdo/Schema/AssociationPropertyDefinition.h>
00029 #include <Fdo/Schema/ClassType.h>
00030 
00031 /// \brief
00032 /// FdoNetworkClass derives from FdoClassDefinition and can be used to represent a 
00033 /// linear network. The FdoNetworkClass type has 2 pre-defined base properties. The first is a bool 
00034 /// type called "Directed". And the second is a FdoObjectPropertyDefinition of an ordered collection called "Layers".
00035 /// The "Directed" property is used to indicate if the network is directed or undirected. 
00036 /// The network is directed if the Directed property is set to true. Otherwise, it is undirected. The Layers property
00037 /// is used to contain the ordered list of layers. The class of the layers object property must be of type FdoNetworkLayer.
00038 /// \note
00039 /// This Help topic is provided for informational use only. There is
00040 /// no interface or support provided. Autodesk reserves the right to change
00041 /// the software related to the content herein.
00042 class FdoNetworkClass : public FdoClassDefinition
00043 {
00044 
00045 protected:
00046 /// \cond DOXYGEN-IGNORE
00047     /// Constructs a default instance of an FdoNetworkClass.
00048     FdoNetworkClass();
00049 
00050     /// Constructs an instance of an FdoNetworkClass using the specified arguments.
00051     FdoNetworkClass(FdoString* name, FdoString* description);
00052 
00053     virtual ~FdoNetworkClass();
00054 
00055     virtual void Dispose();
00056 /// \endcond
00057 
00058 public:
00059     /// \brief
00060     /// Constructs a default instance of an FdoNetworkClass.
00061     /// 
00062     /// \return
00063     /// Returns FdoNetworkClass
00064     /// 
00065     FDO_API static FdoNetworkClass* Create();
00066 
00067     /// \brief
00068     /// Constructs an instance of an FdoNetworkClass using the specified arguments.
00069     /// 
00070     /// \param name 
00071     /// Input name
00072     /// \param description 
00073     /// Input description
00074     /// 
00075     /// \return
00076     /// Returns FdoNetworkClass
00077     /// 
00078     FDO_API static FdoNetworkClass* Create(FdoString* name, FdoString* description);
00079 
00080     /// \brief
00081     /// Gets the concrete class type.
00082     /// 
00083     /// \return
00084     /// Returns class type
00085     /// 
00086     FDO_API virtual FdoClassType GetClassType();
00087 
00088     /// \brief
00089     /// Gets a reference to the layer class.
00090     /// 
00091     /// \return
00092     /// Returns a network layer class definition
00093     /// 
00094     FDO_API FdoNetworkLayerClass* GetLayerClass();
00095 
00096     /// \brief
00097     /// Sets a reference to the layer class. The layer class is used to define the system
00098     /// layers ordered collection object  property.
00099     /// 
00100     /// \param value 
00101     /// Input an network layer class
00102     /// 
00103     /// \return
00104     /// Returns nothing
00105     /// 
00106     FDO_API void SetLayerClass(FdoNetworkLayerClass* value);
00107 
00108 /// \cond DOXYGEN-IGNORE
00109     /// Public non-API functions for XML support
00110 
00111     /// Update this property from the given property.
00112     virtual void Set( FdoClassDefinition* pClass, FdoSchemaXmlContext* pContext );
00113 
00114     /// Initialize this property from its XML attributes
00115     virtual void InitFromXml(const FdoString* propertyTypeName, FdoSchemaXmlContext* pContext, FdoXmlAttributeCollection* attrs);
00116 
00117     /// Serialize this property to XML.
00118     virtual void _writeXml( FdoSchemaXmlContext* pContext );
00119 
00120 private:
00121     FdoNetworkLayerClass            *m_layerClass;
00122 
00123 protected:
00124     virtual void    _StartChanges();
00125     virtual void    _BeginChangeProcessing();
00126     virtual void    _AcceptChanges();
00127     virtual void    _RejectChanges();
00128     virtual void    _EndChangeProcessing();
00129     FdoNetworkLayerClass            *m_layerClassCHANGED;
00130 /// \endcond
00131 };
00132 
00133 /// \brief
00134 /// FdoNetworkClassP is a FdoPtr on FdoNetworkClass, provided for convenience.
00135 typedef FdoPtr<FdoNetworkClass> FdoNetworkClassP;
00136 
00137 #endif
00138 
00139 

Comments or suggestions? Send us feedback.