te::edit::Snap Class Referenceabstract

This class implements geometry snap concept. More...

#include <Snap.h>

Inheritance diagram for te::edit::Snap:
te::edit::SnapVertex

Public Member Functions

void add (te::da::DataSet *dataset)
 
virtual void add (te::gm::Geometry *geom)=0
 
void build (te::da::DataSet *dataset)
 
virtual void clear ()=0
 
virtual std::string getDescription () const =0
 
std::size_t getMaxGeometries () const
 
virtual std::string getName () const =0
 
std::size_t getNGeometries () const
 
std::string getSource () const
 
int getSRID () const
 
double getTolerance () const
 
virtual bool search (const te::gm::Coord2D &coord, te::gm::Coord2D &result)
 
void setTolerance (const double &t)
 
void setWorld (const double &llx, const double &lly, const double &urx, const double &ury, const std::size_t &width, const std::size_t &height)
 
 Snap (const std::string &source, int srid=TE_UNKNOWN_SRS)
 
virtual ~Snap ()
 

Protected Member Functions

te::gm::Envelope getSearchEnvelope (const te::gm::Coord2D &coord) const
 
virtual bool search (const te::gm::Envelope &e, te::gm::Coord2D &result)=0
 

Protected Attributes

std::size_t m_maxGeometries
 The maximum number of geometries that can be added to the snap. If 0, there will be not limit. More...
 
std::size_t m_nGeometries
 The current number of geometries added to the snap. More...
 
std::string m_source
 The source of the geometries. More...
 
int m_srid
 The SRS of the geometries. More...
 
double m_tolerance
 The tolerance that will be used by the snap. For while, the unit is screen pixels. More...
 
te::map::WorldDeviceTransformerm_transformer
 For transforming from device coordinate to world coordinate and vice-versa. More...
 

Detailed Description

This class implements geometry snap concept.

Definition at line 63 of file Snap.h.

Constructor & Destructor Documentation

te::edit::Snap::Snap ( const std::string &  source,
int  srid = TE_UNKNOWN_SRS 
)

Definition at line 40 of file Snap.cpp.

te::edit::Snap::~Snap ( )
virtual

Definition at line 50 of file Snap.cpp.

References m_transformer.

Member Function Documentation

void te::edit::Snap::add ( te::da::DataSet dataset)
virtual void te::edit::Snap::add ( te::gm::Geometry geom)
pure virtual

Implemented in te::edit::SnapVertex.

void te::edit::Snap::build ( te::da::DataSet dataset)

Definition at line 93 of file Snap.cpp.

References add(), and clear().

Referenced by te::edit::SnapManager::buildSnap().

virtual void te::edit::Snap::clear ( )
pure virtual

Implemented in te::edit::SnapVertex.

Referenced by build(), and te::edit::SnapManager::clear().

virtual std::string te::edit::Snap::getDescription ( ) const
pure virtual

Implemented in te::edit::SnapVertex.

std::size_t te::edit::Snap::getMaxGeometries ( ) const

Definition at line 70 of file Snap.cpp.

References m_maxGeometries.

virtual std::string te::edit::Snap::getName ( ) const
pure virtual

Implemented in te::edit::SnapVertex.

std::size_t te::edit::Snap::getNGeometries ( ) const

Definition at line 65 of file Snap.cpp.

References m_nGeometries.

std::string te::edit::Snap::getSource ( ) const

Definition at line 55 of file Snap.cpp.

References m_source.

int te::edit::Snap::getSRID ( ) const

Definition at line 60 of file Snap.cpp.

References m_srid.

double te::edit::Snap::getTolerance ( ) const

Definition at line 75 of file Snap.cpp.

References m_tolerance.

Referenced by te::edit::SnapOptionsDialog::buildOptions().

bool te::edit::Snap::search ( const te::gm::Coord2D coord,
te::gm::Coord2D result 
)
virtual

Definition at line 118 of file Snap.cpp.

References getSearchEnvelope().

virtual bool te::edit::Snap::search ( const te::gm::Envelope e,
te::gm::Coord2D result 
)
protectedpure virtual

Implemented in te::edit::SnapVertex.

void te::edit::Snap::setTolerance ( const double &  t)

Definition at line 80 of file Snap.cpp.

References m_tolerance.

void te::edit::Snap::setWorld ( const double &  llx,
const double &  lly,
const double &  urx,
const double &  ury,
const std::size_t &  width,
const std::size_t &  height 
)

Definition at line 85 of file Snap.cpp.

References m_transformer.

Member Data Documentation

std::size_t te::edit::Snap::m_maxGeometries
protected

The maximum number of geometries that can be added to the snap. If 0, there will be not limit.

Definition at line 112 of file Snap.h.

Referenced by te::edit::SnapVertex::add(), and getMaxGeometries().

std::size_t te::edit::Snap::m_nGeometries
protected

The current number of geometries added to the snap.

Definition at line 111 of file Snap.h.

Referenced by te::edit::SnapVertex::add(), te::edit::SnapVertex::clear(), and getNGeometries().

std::string te::edit::Snap::m_source
protected

The source of the geometries.

Definition at line 109 of file Snap.h.

Referenced by getSource().

int te::edit::Snap::m_srid
protected

The SRS of the geometries.

Definition at line 110 of file Snap.h.

Referenced by getSRID().

double te::edit::Snap::m_tolerance
protected

The tolerance that will be used by the snap. For while, the unit is screen pixels.

Definition at line 113 of file Snap.h.

Referenced by getSearchEnvelope(), getTolerance(), and setTolerance().

te::map::WorldDeviceTransformer* te::edit::Snap::m_transformer
protected

For transforming from device coordinate to world coordinate and vice-versa.

Definition at line 114 of file Snap.h.

Referenced by getSearchEnvelope(), setWorld(), and ~Snap().


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