Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

geos::DefaultCoordinateSequence Class Reference

The default implementation of CoordinateSequence. More...

#include <geos.h>

Inheritance diagram for geos::DefaultCoordinateSequence:

geos::CoordinateSequence List of all members.

Public Member Functions

CoordinateSequenceclone () const
 Returns a deep copy of this collection.
const CoordinategetAt (int pos) const
 Returns a read-only reference to Coordinate at position i.
int getSize () const
 Returns the number of Coordinates (actual or otherwise, as this implementation may not store its data in Coordinate objects).
const vector< Coordinate > * toVector () const
 Returns a read-only vector with the Coordinates in this collection.
 DefaultCoordinateSequence ()
 Construct an empty sequence.
 DefaultCoordinateSequence (vector< Coordinate > *coords)
 Construct sequence taking ownership of given Coordinate vector.
 DefaultCoordinateSequence (int n)
 Construct sequence allocating space for n coordinates.
bool isEmpty () const
 Returns true it list contains no coordinates.
void add (const Coordinate &c)
 Add a Coordinate to the list.
void setAt (const Coordinate &c, int pos)
 Copy Coordinate c to position pos.
void deleteAt (int pos)
 Delete Coordinate at position pos (list will shrink).
string toString () const
 Get a string rapresentation of CoordinateSequence.
void setPoints (const vector< Coordinate > &v)
 Substitute Coordinate list with a copy of the given vector.
unsigned int getDimension () const
 Get number of dimensions.

Detailed Description

The default implementation of CoordinateSequence.


Member Function Documentation

const Coordinate & geos::DefaultCoordinateSequence::getAt int  pos  )  const [virtual]
 

Returns a read-only reference to Coordinate at position i.

Whether or not the Coordinate returned is the actual underlying Coordinate or merely a copy depends on the implementation.

Implements geos::CoordinateSequence.

const vector< Coordinate > * geos::DefaultCoordinateSequence::toVector  )  const [virtual]
 

Returns a read-only vector with the Coordinates in this collection.

Whether or not the Coordinates returned are the actual underlying Coordinates or merely copies depends on the implementation. Note that if this implementation does not store its data as an array of Coordinates, this method will incur a performance penalty because the array needs to be built from scratch.

Implements geos::CoordinateSequence.


The documentation for this class was generated from the following files:
Generated on Sun Aug 5 23:04:38 2007 for GEOS by  doxygen 1.3.9.1