FDO API Reference Feature Data Objects

IPoint.h

Go to the documentation of this file.
00001 #ifndef _IPOINT_H_
00002 #define _IPOINT_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 
00022 
00023 #ifdef _WIN32
00024 #pragma once
00025 #endif
00026 
00027 #include <Geometry/IGeometry.h>
00028 #include <Geometry/IDirectPosition.h>
00029 #include <Common/Collection.h>
00030 
00031 /// \brief
00032 /// The FdoIPoint class is a point Geometry type.
00033 class FdoIPoint : public FdoIGeometry
00034 {
00035 public:
00036 
00037     /// \brief
00038     /// Gets the position of this point Geometry.
00039     /// 
00040     /// \return
00041     /// Returns the position
00042     /// 
00043     FDO_GEOM_API virtual FdoIDirectPosition* GetPosition() const = 0;
00044 
00045     /// \brief
00046     /// Gets the position of this point Geometry, by values of its member data.
00047     /// This is in aid of higher performance for any implementation that
00048     /// does not internally use FdoIDirectPosition objects for storage, or for
00049     /// an application seeking to avoid overhead of accessor methods.
00050     /// 
00051     /// \param x 
00052     /// Output X ordinate value.
00053     /// \param y 
00054     /// Output Y ordinate value.
00055     /// \param z 
00056     /// Output Z ordinate value.
00057     /// \param m 
00058     /// Output M ordinate value.
00059     /// \param dimensionality 
00060     /// Output Dimensionality of ordinates in this position.
00061     /// 
00062     /// \return
00063     /// Returns nothing
00064     /// 
00065     FDO_GEOM_API virtual void GetPositionByMembers(
00066         double *x,
00067         double *y,
00068         double *z,
00069         double *m,
00070         FdoInt32 *dimensionality) const = 0;
00071 
00072     /// \brief
00073     /// Gets the ordinates as an array.
00074     /// 
00075     /// \remarks
00076     /// The caller must not free the returned array.
00077     /// The ordinates are in the order XYZMXYZM..., with only those present 
00078     /// according to the dimensionality.
00079     /// 
00080     /// \return
00081     /// Returns the ordinates
00082     /// 
00083     FDO_GEOM_API virtual const double * GetOrdinates() = 0;
00084 
00085 protected:
00086 
00087     /// \brief
00088     /// Constructs a default instance.
00089     /// 
00090     /// \return
00091     /// Returns nothing
00092     /// 
00093     FDO_GEOM_API FdoIPoint() {};
00094 
00095     /// \brief
00096     /// Default destructor.
00097     /// 
00098     /// \return
00099     /// Returns nothing
00100     /// 
00101     FDO_GEOM_API virtual ~FdoIPoint() {};
00102 };
00103 
00104 
00105 /// \brief
00106 ///  The FdoPointCollection class is a collection of CurvePolygon objects.
00107 class FdoPointCollection : public FdoCollection<FdoIPoint, FdoException>
00108 {
00109 public:
00110     /// \brief
00111     ///  Creates an instance of FdoPointCollection with no contained elements.
00112     /// 
00113     /// \return
00114     /// Returns an empty collection
00115     /// 
00116     static FdoPointCollection* Create()
00117     {
00118         FdoPointCollection* value = new FdoPointCollection();
00119         if (NULL == value)
00120             throw FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(FDO_1_BADALLOC)));
00121 
00122         return value;
00123     }
00124 
00125 protected:
00126     void Dispose()
00127     {
00128         delete this;
00129     }
00130 };
00131 #endif
00132 
00133 

Comments or suggestions? Send us feedback.