FDO API Reference Feature Data Objects

DistanceCondition.h

Go to the documentation of this file.
00001 #ifndef _DISTANCECONDITION_H_
00002 #define _DISTANCECONDITION_H_
00003 // 
00004 
00005 //
00006 // Copyright (C) 2004-2006  Autodesk, Inc.
00007 // 
00008 // This library is free software; you can redistribute it and/or
00009 // modify it under the terms of version 2.1 of the GNU Lesser
00010 // General Public License as published by the Free Software Foundation.
00011 // 
00012 // This library is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 // Lesser General Public License for more details.
00016 // 
00017 // You should have received a copy of the GNU Lesser General Public
00018 // License along with this library; if not, write to the Free Software
00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 //
00021 
00022 #ifdef _WIN32
00023 #pragma once
00024 #endif
00025 
00026 #include <FdoStd.h>
00027 #include <Fdo/Filter/DistanceOperations.h>
00028 #include <Fdo/Filter/GeometricCondition.h>
00029 #include <Fdo/Expression/GeometryValue.h>
00030 #include <Fdo/Expression/Identifier.h>
00031 #include <Fdo/Filter/SpatialOperations.h>
00032 
00033 class FdoGeometry;
00034 
00035 /// \brief
00036 /// The FdoDistanceCondition class derives from FdoGeometricCondition and can be used
00037 /// to test whether the value of a geometric property is within or beyond a
00038 /// specified distance of the specified geometric value. Some feature providers
00039 /// may only support literal geometric values; if so, the provider's capabilities
00040 /// will indicate this limitation.
00041 class FdoDistanceCondition : public FdoGeometricCondition
00042 {
00043 protected:
00044 /// \cond DOXYGEN-IGNORE
00045     /// Constructs a default instance of an FdoDistanceCondition.
00046     FdoDistanceCondition();
00047 
00048     /// Constructs an instance of an FdoDistanceCondition using the specified
00049     /// arguments.
00050     FdoDistanceCondition(FdoString* propertyName, FdoDistanceOperations operation, FdoExpression* geometry, double distance);
00051 
00052     /// Constructs an instance of an FdoDistanceCondition using the specified
00053     /// arguments.
00054     FdoDistanceCondition(FdoIdentifier* propertyName, FdoDistanceOperations operation, FdoExpression* geometry, double distance);
00055 
00056     virtual ~FdoDistanceCondition();
00057 
00058     virtual void Dispose();
00059 /// \endcond
00060 
00061 public:
00062 
00063     /// \brief
00064     /// Constructs a default instance of an FdoDistanceCondition.
00065     /// 
00066     /// \return
00067     /// Returns FdoDistanceCondition
00068     /// 
00069     FDO_API static FdoDistanceCondition* Create();
00070 
00071     /// \brief
00072     /// Constructs an instance of an FdoDistanceCondition using the specified arguments.
00073     /// 
00074     /// \param propertyName 
00075     /// Input property name
00076     /// \param operation 
00077     /// Input operation
00078     /// \param geometry 
00079     /// Input geometry
00080     /// \param distance 
00081     /// Input distance
00082     /// 
00083     /// \return
00084     /// Returns FdoDistanceCondition
00085     /// 
00086     FDO_API static FdoDistanceCondition* Create(FdoString* propertyName, FdoDistanceOperations operation, FdoExpression* geometry, double distance);
00087 
00088     /// \brief
00089     /// Constructs an instance of an FdoDistanceCondition using the specified arguments.
00090     /// 
00091     /// \param propertyName 
00092     /// Input property name
00093     /// \param operation 
00094     /// Input operation
00095     /// \param geometry 
00096     /// Input geometry
00097     /// \param distance 
00098     /// Input distance
00099     /// 
00100     /// \return
00101     /// Returns FdoDistanceCondition
00102     /// 
00103     FDO_API static FdoDistanceCondition* Create(FdoIdentifier* propertyName, FdoDistanceOperations operation, FdoExpression* geometry, double distance);
00104 
00105     /// \brief
00106     /// Gets the distance operation to use.
00107     /// 
00108     /// \return
00109     /// Returns the distance operation
00110     /// 
00111     FDO_API FdoDistanceOperations GetOperation();
00112 
00113     /// \brief
00114     /// Sets the distance operation to use.
00115     /// 
00116     /// \param value 
00117     /// Input the distance operation
00118     /// 
00119     /// \return
00120     /// Returns nothing
00121     /// 
00122     FDO_API void SetOperation(FdoDistanceOperations value);
00123 
00124     /// \brief
00125     /// Gets the literal geometric value.
00126     /// 
00127     /// \return
00128     /// Returns the literal geometric value
00129     /// 
00130     FDO_API FdoExpression* GetGeometry();
00131 
00132     /// \brief
00133     /// Sets the literal geometric value.
00134     /// 
00135     /// \param value 
00136     /// Input the literal geometric value
00137     /// 
00138     /// \return
00139     /// Returns nothing
00140     /// 
00141     FDO_API void SetGeometry(FdoExpression* value);
00142 
00143     /// \brief
00144     /// Gets the distance value.
00145     /// 
00146     /// \return
00147     /// Returns the distance value
00148     /// 
00149     FDO_API double GetDistance();
00150 
00151     /// \brief
00152     /// Sets the distance value.
00153     /// 
00154     /// \param value 
00155     /// Input the distance value
00156     /// 
00157     /// \return
00158     /// Returns nothing
00159     /// 
00160     FDO_API void SetDistance(double value);
00161 
00162     /// \brief
00163     /// Overrides FdoFilter.Process to pass the FdoDistanceCondition to the
00164     /// appropriate filter processor operation.
00165     /// 
00166     /// \param p 
00167     /// Input filter processor
00168     /// 
00169     /// \return
00170     /// Returns nothing
00171     /// 
00172     FDO_API void Process(FdoIFilterProcessor* p);
00173 
00174 /// \cond DOXYGEN-IGNORE
00175     /// \brief
00176     /// This is an internal method. It returns the well defined text representation of the filter. 
00177     /// 
00178     /// \param pIdCol 
00179     /// A identifier collection that contains all the computed identifier used by the filter
00180     /// 
00181     /// \return
00182     /// Returns the well defined text string
00183     /// 
00184     FdoString* ToStringInternal( FdoIdentifierCollection *pIdCol );
00185 /// \endcond
00186 
00187 private:
00188     FdoExpression*          m_geometry;
00189     double                  m_distance;
00190     FdoDistanceOperations   m_operation;
00191 };
00192 #endif
00193 
00194 

Comments or suggestions? Send us feedback.