- Main Page
- Related Pages
- Modules
- Classes
- Files

# SpatialCondition.h

Go to the documentation of this file.

    00001 #ifndef _SPATIALCONDITION_H_
    00002 #define _SPATIALCONDITION_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/GeometricCondition.h>
    00028 #include <Fdo/Expression/Identifier.h>
    00029 #include <Fdo/Expression/GeometryValue.h>
    00030 #include <Fdo/Filter/SpatialOperations.h>
    00031
    00032 class FdoGeometry;
    00033
    00034 /// \brief
    00035 /// The FdoSpatialCondition class derives from FdoGeometricCondition and can be used
    00036 /// to test whether the value of a geometric property (referenced using the name
    00037 /// of the property) and another geometric value satisfy the spatial
    00038 /// relationship implied by the operation. Some feature providers may only
    00039 /// support literal geometric values; if so, the provider's capabilities
    00040 /// will indicate this limitation.
    00041 class FdoSpatialCondition : public FdoGeometricCondition
    00042 {
    00043 /// \cond DOXYGEN-IGNORE
    00044 protected:
    00045     /// Constructs a default instance of an FdoSpatialCondition.
    00046     FdoSpatialCondition();
    00047
    00048     /// Constructs an instance of an FdoSpatialCondition using the specified
    00049     /// arguments.
    00050     FdoSpatialCondition(FdoString* propertyName, FdoSpatialOperations operation, FdoExpression* geometry);
    00051
    00052     /// Constructs an instance of an FdoSpatialCondition using the specified
    00053     /// arguments.
    00054     FdoSpatialCondition(FdoIdentifier* propertyName, FdoSpatialOperations operation, FdoExpression* geometry);
    00055
    00056     virtual ~FdoSpatialCondition();
    00057
    00058     virtual void Dispose();
    00059 /// \endcond
    00060
    00061 public:
    00062     /// \brief
    00063     /// Constructs a default instance of an FdoSpatialCondition.
    00064     ///
    00065     /// \return
    00066     /// Returns FdoSpatialCondition
    00067     ///
    00068     FDO_API static FdoSpatialCondition* Create();
    00069
    00070     /// \brief
    00071     /// Constructs an instance of an FdoSpatialCondition using the specified arguments.
    00072     ///
    00073     /// \param propertyName
    00074     /// Input property name
    00075     /// \param operation
    00076     /// Input spatial operation
    00077     /// \param geometry
    00078     /// Input geometry
    00079     ///
    00080     /// \return
    00081     /// Returns FdoSpatialCondition
    00082     ///
    00083     FDO_API static FdoSpatialCondition* Create(FdoString* propertyName, FdoSpatialOperations operation, FdoExpression* geometry);
    00084
    00085     /// \brief
    00086     /// Constructs an instance of an FdoSpatialCondition using the specified arguments.
    00087     ///
    00088     /// \param propertyName
    00089     /// Input property name
    00090     /// \param operation
    00091     /// Input spatial operation
    00092     /// \param geometry
    00093     /// Input geometry
    00094     ///
    00095     /// \return
    00096     /// Returns FdoSpatialCondition
    00097     ///
    00098     FDO_API static FdoSpatialCondition* Create(FdoIdentifier* propertyName, FdoSpatialOperations operation, FdoExpression* geometry);
    00099
    00100     /// \brief
    00101     /// Gets the spatial operation to use.
    00102     ///
    00103     /// \return
    00104     /// Returns the spatial operation to use
    00105     ///
    00106     FDO_API FdoSpatialOperations GetOperation();
    00107
    00108     /// \brief
    00109     /// Sets the spatial operation to use.
    00110     ///
    00111     /// \param value
    00112     /// Input the spatial operation to use
    00113     ///
    00114     /// \return
    00115     /// Returns nothing
    00116     ///
    00117     FDO_API void SetOperation(FdoSpatialOperations value);
    00118
    00119     /// \brief
    00120     /// Gets the literal geometric value.
    00121     ///
    00122     /// \return
    00123     /// Returns the literal geometric valueg
    00124     ///
    00125     FDO_API FdoExpression* GetGeometry();
    00126
    00127     /// \brief
    00128     /// Sets the literal geometric value.
    00129     ///
    00130     /// \param value
    00131     /// Input the literal geometric value
    00132     ///
    00133     /// \return
    00134     /// Returns nothing
    00135     ///
    00136     FDO_API void SetGeometry(FdoExpression* value);
    00137
    00138     /// \brief
    00139     /// Overrides FdoFilter.Process to pass the FdoSpatialCondition to the
    00140     /// appropriate filter processor operation.
    00141     ///
    00142     /// \param p
    00143     /// Input filter processor
    00144     ///
    00145     /// \return
    00146     /// Returns nothing
    00147     ///
    00148     FDO_API void Process(FdoIFilterProcessor* p);
    00149
    00150 /// \cond DOXYGEN-IGNORE
    00151
    00152     /// \brief
    00153     /// This is an internal method. It returns the well defined text representation of the filter.
    00154     ///
    00155     /// \param pIdCol
    00156     /// A identifier collection that contains all the computed identifier used by the filter
    00157     ///
    00158     /// \return
    00159     /// Returns the well defined text string
    00160     ///
    00161     FdoString* ToStringInternal( FdoIdentifierCollection *pIdCol );
    00162 /// \endcond
    00163
    00164 private:
    00165     FdoExpression*          m_geometry;
    00166     FdoSpatialOperations    m_operation;
    00167 };
    00168 #endif
    00169
    00170

Please send us your comment about this page