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

# ICurveSegmentAbstract.h

Go to the documentation of this file.

    00001 #ifndef _ICURVESEGMENTABSTRACT_H_
    00002 #define _ICURVESEGMENTABSTRACT_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 <FdoCommon.h>
    00028 #include <Common/Collection.h>
    00029 #include <Geometry/IDirectPosition.h>
    00030 #include <Geometry/IEnvelope.h>
    00031 #include <Common/GeometryType.h>
    00032 #include <Common/Dimensionality.h>
    00033
    00034 /// \brief
    00035 /// The FdoICurveSegmentAbstract class is an abstract geometric Curve Segment object.
    00036 /// This class is used strictly as a component of curves
    00037 /// and, thus, does not inherit from IGeometry.
    00038 class FdoICurveSegmentAbstract : public FdoIDisposable
    00039 {
    00040 public:
    00041
    00042     /// \brief
    00043     /// Gets the envelope for the curve segment.
    00044     ///
    00045     /// \return
    00046     /// Returns the envelope
    00047     ///
    00048     FDO_GEOM_API virtual FdoIEnvelope* GetEnvelope() const = 0;
    00049
    00050     /// \brief
    00051     /// Gets the starting position of this curve segment.
    00052     ///
    00053     /// \return
    00054     /// Returns the starting position
    00055     ///
    00056     FDO_GEOM_API virtual FdoIDirectPosition* GetStartPosition() const = 0;
    00057
    00058     /// \brief
    00059     /// Gets the ending position of this curve segment.
    00060     ///
    00061     /// \return
    00062     /// Returns the ending position
    00063     ///
    00064     FDO_GEOM_API virtual FdoIDirectPosition* GetEndPosition() const = 0;
    00065
    00066     /// \brief
    00067     /// Gets the closure state for the curve segment.
    00068     ///
    00069     /// \remarks
    00070     /// The meaning behind this method is not guaranteed
    00071     /// to be uniform between derived types or between implementations
    00072     /// of this package.
    00073     /// It may represent a computed value, an explicit attribute, or be true by definition.
    00074     /// As a computed value, the result is typically from simply testing the starting and
    00075     /// ending positions for exact equality.  This is only reliable in floating
    00076     /// point arithmetic if these data have identical origins.
    00077     /// As an explicit attribute, it would be persisted with the Geometry and
    00078     /// typically denoted by a parameter in the relevant factory method.
    00079     /// Some Geometry types are closed by definition.
    00080     ///
    00081     /// \return
    00082     /// Returns 'true' if the curve is closed, and false otherwise
    00083     ///
    00084     FDO_GEOM_API virtual bool GetIsClosed() const = 0;
    00085
    00086     /// \brief
    00087     /// Gets the type of the most-derived interface
    00088     /// in the Geometry package for this object
    00089     ///
    00090     /// \return
    00091     /// Returns the derived type
    00092     ///
    00093     FDO_GEOM_API virtual FdoGeometryComponentType GetDerivedType() const = 0;
    00094
    00095     /// \brief
    00096     /// Gets the dimensionality of ordinates in this object.
    00097     ///
    00098     /// \remarks
    00099     ///  Values are from the FdoDimensionality enumeration.
    00100     /// A return type of "FdoInt32" is used instead of the enumeration, catering to typical use with bit masking.
    00101     ///
    00102     /// \return
    00103     /// Returns the ordinate dimensionality
    00104     ///
    00105     FDO_GEOM_API virtual FdoInt32 GetDimensionality() const = 0;
    00106
    00107 protected:
    00108
    00109     /// \brief
    00110     /// Default destructor.
    00111     ///
    00112     /// \return
    00113     /// Returns nothing
    00114     ///
    00115     FDO_GEOM_API virtual ~FdoICurveSegmentAbstract() {};
    00116
    00117 };
    00118
    00119
    00120 /// \brief
    00121 ///  The FdoCurveSegmentCollection class is a collection of CurveSegment objects.
    00122 class FdoCurveSegmentCollection : public FdoCollection<FdoICurveSegmentAbstract, FdoException>
    00123 {
    00124 public:
    00125     /// \brief
    00126     ///  Creates an instance of FdoCurveSegmentCollection with no contained elements.
    00127     ///
    00128     /// \return
    00129     /// Returns an empty collection
    00130     ///
    00131     static FdoCurveSegmentCollection* Create()
    00132     {
    00133         FdoCurveSegmentCollection* value = new FdoCurveSegmentCollection();
    00134         if (NULL == value)
    00135             throw FdoException::Create(FdoException::NLSGetMessage(FDO_NLSID(FDO_1_BADALLOC)));
    00136
    00137         return value;
    00138     }
    00139
    00140 protected:
    00141     void Dispose()
    00142     {
    00143         delete this;
    00144     }
    00145 };
    00146 #endif
    00147
    00148

Please send us your comment about this page