GEOS 3.11.1
Public Types | Public Member Functions | Friends | List of all members
geos::noding::SegmentString Class Referenceabstract

An interface for classes which represent a sequence of contiguous line segments. More...

#include <SegmentString.h>

Inheritance diagram for geos::noding::SegmentString:
geos::noding::BasicSegmentString geos::noding::NodableSegmentString geos::noding::NodedSegmentString

Public Types

typedef std::vector< const SegmentString * > ConstVect
 
typedef std::vector< SegmentString * > NonConstVect
 

Public Member Functions

 SegmentString (const void *newContext)
 Construct a SegmentString. More...
 
const void * getData () const
 Gets the user-defined data for this segment string. More...
 
void setData (const void *data)
 Sets the user-defined data for this segment string. More...
 
virtual std::size_t size () const =0
 
virtual const geom::CoordinategetCoordinate (std::size_t i) const =0
 
virtual geom::CoordinateSequencegetCoordinates () const =0
 Return a pointer to the CoordinateSequence associated with this SegmentString. More...
 
virtual bool isClosed () const =0
 
virtual std::ostream & print (std::ostream &os) const
 

Friends

std::ostream & operator<< (std::ostream &os, const SegmentString &ss)
 

Detailed Description

An interface for classes which represent a sequence of contiguous line segments.

SegmentStrings can carry a context object, which is useful for preserving topological or parentage information.

Constructor & Destructor Documentation

◆ SegmentString()

geos::noding::SegmentString::SegmentString ( const void *  newContext)
inline

Construct a SegmentString.

Parameters
newContextthe context associated to this SegmentString

Member Function Documentation

◆ getCoordinates()

virtual geom::CoordinateSequence * geos::noding::SegmentString::getCoordinates ( ) const
pure virtual

Return a pointer to the CoordinateSequence associated with this SegmentString.

Note
The CoordinateSequence is owned by this SegmentString!

Implemented in geos::noding::BasicSegmentString, and geos::noding::NodedSegmentString.

◆ getData()

const void * geos::noding::SegmentString::getData ( ) const
inline

Gets the user-defined data for this segment string.

Returns
the user-defined data

◆ setData()

void geos::noding::SegmentString::setData ( const void *  data)
inline

Sets the user-defined data for this segment string.

Parameters
dataan Object containing user-defined data

The documentation for this class was generated from the following file: