- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

# BasicSegmentString.h

    00001 /**********************************************************************
    00002  * $Id: BasicSegmentString.h 2809 2009-12-06 01:05:24Z mloskot $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2009 Sandro Santilli <strk@keybit.net>
    00008  *
    00009  * This is free software; you can redistribute and/or modify it under
    00010  * the terms of the GNU Lesser General Public Licence as published
    00011  * by the Free Software Foundation.
    00012  * See the COPYING file for more information.
    00013  *
    00014  **********************************************************************
    00015  *
    00016  * Last port: noding/BasicSegmentString.java rev. 1.1 (JTS-1.9)
    00017  *
    00018  **********************************************************************/
    00019
    00020 #ifndef GEOS_NODING_BASICSEGMENTSTRING_H
    00021 #define GEOS_NODING_BASICSEGMENTSTRING_H
    00022
    00023 #include <geos/noding/SegmentString.h> // for inheritance
    00024 #include <geos/geom/CoordinateSequence.h> // for inlines (size())
    00025
    00026 #include <geos/inline.h>
    00027
    00028 #include <vector>
    00029
    00030 // Forward declarations
    00031 namespace geos {
    00032         namespace algorithm {
    00033                 //class LineIntersector;
    00034         }
    00035 }
    00036
    00037 namespace geos {
    00038 namespace noding { // geos.noding
    00039
    00050 class BasicSegmentString : public SegmentString {
    00051
    00052 public:
    00053
    00055         //
    00060         BasicSegmentString(geom::CoordinateSequence *newPts,
    00061                         const void* newContext)
    00062                 :
    00063                 SegmentString(newContext),
    00064                 pts(newPts)
    00065         {}
    00066
    00067         virtual ~BasicSegmentString()
    00068         {}
    00069
    00071         virtual unsigned int size() const
    00072         {
    00073                 return pts->size();
    00074         }
    00075
    00077         virtual const geom::Coordinate& getCoordinate(unsigned int i) const;
    00078
    00080         virtual geom::CoordinateSequence* getCoordinates() const;
    00081
    00083         virtual bool isClosed() const;
    00084
    00086         virtual std::ostream& print(std::ostream& os) const;
    00087
    00095         int getSegmentOctant(unsigned int index) const;
    00096
    00097 private:
    00098
    00099         geom::CoordinateSequence *pts;
    00100
    00101 };
    00102
    00103 } // namespace geos.noding
    00104 } // namespace geos
    00105
    00106 #ifdef GEOS_INLINE
    00107 # include "geos/noding/SegmentString.inl"
    00108 #endif
    00109
    00110 #endif // ndef GEOS_NODING_BASICSEGMENTSTRING_H
    00111