FDO API Reference Feature Data Objects

TopoGeometryPropertyDefinition.h

Go to the documentation of this file.
00001 #ifndef _FDOTOPOGEOMETRYPROPERTYDEFINITION_H_
00002 #define _FDOTOPOGEOMETRYPROPERTYDEFINITION_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/GeometricPropertyDefinition.h>
00027 
00028 /// \brief
00029 /// FdoTopoGeometryPropertyDefinition derives from
00030 /// FdoGeometricPropertyDefinition, but it has behavior of both geometry and
00031 /// fixed association. It can be used to relate an application-domain feature
00032 /// class (other than a topological primitive class) to a topology. One can use
00033 /// the short form TopoGeometry to refer to these properties.  Values of this
00034 /// property can be used:
00035 /// <ul>
00036 /// <li> as spatial geometries; use FdoIFeatureReader::GetGeometry().
00037 /// <li> to gain access to relationships to underlying features, including
00038 /// topology primitives, similar to Association Properties; e.g. use
00039 /// FdoIFeatureReader::GetObject() to retrieve, and associated feature
00040 /// identifiers to insert/update.
00041 /// </ul>
00042 /// \note
00043 /// This Help topic is provided for informational use only. There is
00044 /// no interface or support provided. Autodesk reserves the right to change
00045 /// the software related to the content herein.
00046 class FdoTopoGeometryPropertyDefinition : public FdoGeometricPropertyDefinition
00047 {
00048 public:
00049     FdoTopoGeometryPropertyDefinition(
00050         FdoString * name, 
00051         FdoString * description, 
00052         FdoString * topologyName,
00053         bool        system = false
00054     );
00055 
00056     /// Get the name of the topology to which this property belongs.
00057     FdoString * GetTopologyName();
00058 
00059     /// Set the name of the topology to which this property belongs. The
00060     /// referenced topology must exist.
00061     void SetTopologyName(
00062         FdoString * topologyName
00063     );
00064 
00065     /// Gets the topo geometry property definition on which the current topo
00066     /// geometry property depends. If the current property is not in a topology
00067     /// hierarchy, then null is returned.
00068     FdoTopoGeometryPropertyDefinition * GetDependsOnTopoGeometry();
00069 
00070     /// Set the top geometry property on which the current topo geometry
00071     /// property depends. This is set only if the current topo geometry property
00072     /// is in a topology hierarchy. Set it to null (the default) to indicate
00073     /// that the current property is not in a topology hierarchy.
00074     void SetDependsOnTopoGeometry(
00075         FdoTopoGeometryPropertyDefinition * dependsOnTopoGeometry
00076     );
00077 
00078 /// \cond DOXYGEN-IGNORE
00079     /// Public non-API functions for XML support
00080 
00081     /// Initialize the class from its XML attributes
00082     virtual void InitFromXml(const FdoString* classTypeName, FdoSchemaXmlContext* pContext, FdoXmlAttributeCollection* attrs);
00083     virtual void InitFromXml(FdoSchemaXmlContext* pContext, FdoXmlAttributeCollection* attrs);
00084 
00085     /// Handle sub-elements such as properties
00086     /// Element start
00087     virtual FdoXmlSaxHandler* XmlStartElement(
00088         FdoXmlSaxContext* context, 
00089         FdoString* uri, 
00090         FdoString* name, 
00091         FdoString* qname, 
00092         FdoXmlAttributeCollection* atts
00093     );
00094     /// Element end
00095     virtual FdoBoolean XmlEndElement(
00096         FdoXmlSaxContext* context, 
00097         FdoString* uri, 
00098         FdoString* name, 
00099         FdoString* qname
00100     );
00101 
00102     /// Serialize this class to XML.
00103     virtual void _writeXml( FdoSchemaXmlContext* pContext );
00104 
00105 protected:
00106     /// The name of the related topology.
00107     FdoString * topologyName;
00108 
00109     FdoTopoGeometryPropertyDefinition * dependsOnTopoGeometry;
00110 
00111     /// \brief
00112     /// Dispose this object.
00113     /// 
00114     /// \return
00115     /// Returns nothing
00116     /// 
00117     virtual void Dispose ();
00118  
00119     /// Hide default constructor to ensure that it cannot be used.
00120     FdoTopoGeometryPropertyDefinition() {};
00121     virtual ~FdoTopoGeometryPropertyDefinition();
00122 
00123     /// FdoFeatureSchema::RejectChanges() support
00124     virtual void    _StartChanges();
00125     virtual void    _BeginChangeProcessing();
00126     virtual void    _AcceptChanges();
00127     virtual void    _RejectChanges();
00128     virtual void    _EndChangeProcessing();
00129 /// \endcond
00130 };
00131 
00132 
00133 
00134 #endif /* _FDOTOPOGEOMETRYPROPERTYDEFINITION_H_ */
00135 
00136 

Comments or suggestions? Send us feedback.