te::gm::WKTWriter Class Reference

A class that serializes a geometry to the WKT format. More...

#include <WKTWriter.h>

Inheritance diagram for te::gm::WKTWriter:
te::gm::Visitor

Public Member Functions

 WKTWriter (std::ostream &o)
 It constructs a new WKT writer. More...
 
void write (const Geometry *geom)
 It serializes the geometry to a WKT representation. More...
 
void write (const Geometry &geom)
 It serializes the geometry to a WKT representation. More...
 
 ~WKTWriter ()
 Destructor. More...
 

Static Public Member Functions

static void write (const Geometry *geom, std::ostream &o)
 It serializes the geometry to a WKT representation. More...
 
static void write (const Geometry &geom, std::ostream &o)
 It serializes the geometry to a WKT representation. More...
 

Protected Member Functions

virtual void visit (const Curve &)
 
virtual void visit (const Geometry &)
 
void visit (const GeometryCollection &visited)
 
void visit (const LinearRing &visited)
 
void visit (const LineString &visited)
 
virtual void visit (const MultiCurve &)
 
void visit (const MultiLineString &visited)
 
void visit (const MultiPoint &visited)
 
void visit (const MultiPolygon &visited)
 
virtual void visit (const MultiSurface &)
 
void visit (const AbstractPoint &)
 
void visit (const Point &visited)
 
void visit (const PointM &visited)
 
void visit (const PointZ &visited)
 
void visit (const PointZM &visited)
 
void visit (const PointKd &)
 
void visit (const Polygon &visited)
 
void visit (const PolyhedralSurface &visited)
 
virtual void visit (const Surface &)
 
void visit (const TIN &visited)
 
void visit (const Triangle &visited)
 
void visit (const CircularString &)
 
void visit (const CompoundCurve &)
 
void visit (const CurvePolygon &)
 

Private Attributes

std::ostream & m_ostream
 The output stream used to serialize the geometry to WKT. More...
 
bool m_tagged
 This flag controls how geometry are write to the output stream. More...
 

Detailed Description

A class that serializes a geometry to the WKT format.

See also
WKTReader

Definition at line 54 of file WKTWriter.h.

Constructor & Destructor Documentation

te::gm::WKTWriter::WKTWriter ( std::ostream &  o)

It constructs a new WKT writer.

Parameters
oAn output stream where we will write the wkt.
te::gm::WKTWriter::~WKTWriter ( )

Destructor.

Member Function Documentation

virtual void te::gm::WKTWriter::visit ( const Curve &  )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 104 of file WKTWriter.h.

virtual void te::gm::WKTWriter::visit ( const Geometry &  )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 105 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const GeometryCollection &  visited)
protectedvirtual

Implements te::gm::Visitor.

void te::gm::WKTWriter::visit ( const LinearRing &  visited)
protectedvirtual

Implements te::gm::Visitor.

void te::gm::WKTWriter::visit ( const LineString &  visited)
protectedvirtual

Implements te::gm::Visitor.

virtual void te::gm::WKTWriter::visit ( const MultiCurve &  )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 109 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const MultiLineString &  visited)
protectedvirtual

Implements te::gm::Visitor.

void te::gm::WKTWriter::visit ( const MultiPoint &  visited)
protectedvirtual

Implements te::gm::Visitor.

void te::gm::WKTWriter::visit ( const MultiPolygon &  visited)
protectedvirtual

Implements te::gm::Visitor.

virtual void te::gm::WKTWriter::visit ( const MultiSurface &  )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 113 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const AbstractPoint &  )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 114 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const Point &  visited)
protectedvirtual

Implements te::gm::Visitor.

void te::gm::WKTWriter::visit ( const PointM &  visited)
protectedvirtual

Implements te::gm::Visitor.

void te::gm::WKTWriter::visit ( const PointZ &  visited)
protectedvirtual

Implements te::gm::Visitor.

void te::gm::WKTWriter::visit ( const PointZM &  visited)
protectedvirtual

Implements te::gm::Visitor.

void te::gm::WKTWriter::visit ( const PointKd &  )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 119 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const Polygon &  visited)
protectedvirtual

Implements te::gm::Visitor.

void te::gm::WKTWriter::visit ( const PolyhedralSurface &  visited)
protectedvirtual

Implements te::gm::Visitor.

virtual void te::gm::WKTWriter::visit ( const Surface &  )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 122 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const TIN &  visited)
protectedvirtual

Implements te::gm::Visitor.

void te::gm::WKTWriter::visit ( const Triangle &  visited)
protectedvirtual

Implements te::gm::Visitor.

void te::gm::WKTWriter::visit ( const CircularString &  )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 125 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const CompoundCurve &  )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 126 of file WKTWriter.h.

void te::gm::WKTWriter::visit ( const CurvePolygon &  )
inlineprotectedvirtual

Implements te::gm::Visitor.

Definition at line 127 of file WKTWriter.h.

void te::gm::WKTWriter::write ( const Geometry *  geom)

It serializes the geometry to a WKT representation.

Parameters
geomThe geometry to be serialized.
Note
You must call reset in successive calls to this method.
void te::gm::WKTWriter::write ( const Geometry &  geom)

It serializes the geometry to a WKT representation.

Parameters
geomThe geometry to be serialized.
Note
You must call reset in successive calls to this method.
static void te::gm::WKTWriter::write ( const Geometry *  geom,
std::ostream &  o 
)
static

It serializes the geometry to a WKT representation.

Parameters
geomThe geometry to be serialized.
oAn output stream where we will write the wkt.
static void te::gm::WKTWriter::write ( const Geometry &  geom,
std::ostream &  o 
)
static

It serializes the geometry to a WKT representation.

Parameters
geomThe geometry to be serialized.
oAn output stream where we will write the wkt.

Member Data Documentation

std::ostream& te::gm::WKTWriter::m_ostream
private

The output stream used to serialize the geometry to WKT.

Definition at line 131 of file WKTWriter.h.

bool te::gm::WKTWriter::m_tagged
private

This flag controls how geometry are write to the output stream.

Definition at line 132 of file WKTWriter.h.


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