All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::edit::SnapManager Class Reference

This is a singleton for managing geometries snap. More...

#include <SnapManager.h>

Inheritance diagram for te::edit::SnapManager:
te::common::Singleton< T >

Public Types

typedef std::map< std::string,
SnapStrategyFnctType
SnapStrategies
 
typedef boost::function< Snap
*(const std::string &source,
int srid)> 
SnapStrategyFnctType
 

Public Member Functions

void buildSnap (const std::string &source, int srid, te::da::DataSet *dataset)
 
void clear (const std::string &source)
 
void clearAll ()
 
void createSnap (const std::string &source, int srid)
 
SnapgetSnap (const std::string &source) const
 
const std::map< std::string,
Snap * > & 
getSnaps () const
 
bool hasSnap (const std::string &source) const
 
void reg (const std::string &name, const SnapStrategyFnctType &strategy)
 
void removeSnap (const std::string &source)
 
bool search (const te::gm::Coord2D &coord, int srid, te::gm::Coord2D &result)
 
void setWorld (const double &llx, const double &lly, const double &urx, const double &ury, const std::size_t &width, const std::size_t &height)
 

Static Public Member Functions

static T & getInstance ()
 It returns a reference to the singleton instance. More...
 

Protected Member Functions

 SnapManager ()
 It initializes the singleton instance of the snap manager. More...
 
 ~SnapManager ()
 Singleton destructor. More...
 

Private Attributes

std::map< std::string, Snap * > m_snaps
 
SnapStrategies m_snapStrategies
 

Friends

class te::common::Singleton< SnapManager >
 

Detailed Description

This is a singleton for managing geometries snap.

Definition at line 65 of file SnapManager.h.

Member Typedef Documentation

Definition at line 72 of file SnapManager.h.

typedef boost::function<Snap* (const std::string& source, int srid)> te::edit::SnapManager::SnapStrategyFnctType

Definition at line 71 of file SnapManager.h.

Constructor & Destructor Documentation

te::edit::SnapManager::SnapManager ( )
protected

It initializes the singleton instance of the snap manager.

Definition at line 154 of file SnapManager.cpp.

te::edit::SnapManager::~SnapManager ( )
protected

Singleton destructor.

Definition at line 158 of file SnapManager.cpp.

Member Function Documentation

void te::edit::SnapManager::buildSnap ( const std::string &  source,
int  srid,
te::da::DataSet dataset 
)

Definition at line 60 of file SnapManager.cpp.

References te::edit::Snap::build().

void te::edit::SnapManager::clear ( const std::string &  source)

Definition at line 109 of file SnapManager.cpp.

References te::edit::Snap::clear().

void te::edit::SnapManager::clearAll ( )

Definition at line 117 of file SnapManager.cpp.

References te::common::FreeContents().

void te::edit::SnapManager::createSnap ( const std::string &  source,
int  srid 
)

Definition at line 45 of file SnapManager.cpp.

template<class T >
T & te::common::Singleton< T >::getInstance ( )
inlinestaticinherited

It returns a reference to the singleton instance.

Returns
A reference to the singleton instance.

Definition at line 120 of file Singleton.h.

Referenced by BBOXReader(), BBOXWriter(), BetweenReader(), BetweenWriter(), BinaryComparsionOpReader(), BinaryComparsionOpWriter(), BinaryOperatorReader(), BinarySpatialOpReader(), BinarySpatialOpWriter(), te::map::AbstractLayerRenderer::buildChart(), te::map::QueryLayerRenderer::buildChart(), te::edit::SnapOptionsDialog::buildOptions(), te::layout::PropertiesOutside::changeMapVisitable(), te::layout::ItemUtils::createLegendChildItemFromLegend(), DistanceBufferOpWriter(), DistanceBufferReader(), te::sa::GetColorBar(), te::edit::Module::initialize(), te::color::Module::initialize(), te::qt::widgets::Module::initialize(), te::qt::af::GeneralConfigWidget::initialize(), te::qt::af::ApplicationController::initialize(), LikeReader(), LikeWriter(), te::qt::widgets::ColorCatalogWidget::loadDefaultColorCatalog(), NullReader(), NullWriter(), te::qt::plugins::edit::ApplicationListener::onApplicationTriggered(), te::qt::widgets::ColorCatalogWidget::onCatalogComboBoxActivated(), te::qt::widgets::ColorCatalogWidget::onGroupComboBoxActivated(), te::edit::SnapOptionsDialog::onOkPushButtonPressed(), te::qt::widgets::ColorCatalogWidget::onSchemaComboBoxActivated(), te::se::serialize::ReadGeometryPropertyHelper(), te::map::serialize::ReadGroupingItem(), te::se::serialize::ReadParameterValue(), te::se::serialize::ReadRule(), te::se::serialize::ReadSvgParameter(), te::qt::widgets::ReadSymbol(), te::se::serialize::Save(), te::color::ColorSchemeCatalog::setName(), te::qt::af::UpdateUserSettingsFile(), te::se::serialize::WriteGeometryPropertyHelper(), and te::map::serialize::WriteLayerGrouping().

te::edit::Snap * te::edit::SnapManager::getSnap ( const std::string &  source) const

Definition at line 99 of file SnapManager.cpp.

const std::map< std::string, te::edit::Snap * > & te::edit::SnapManager::getSnaps ( ) const

Definition at line 94 of file SnapManager.cpp.

bool te::edit::SnapManager::hasSnap ( const std::string &  source) const

Definition at line 40 of file SnapManager.cpp.

References m_snaps.

void te::edit::SnapManager::reg ( const std::string &  name,
const SnapStrategyFnctType strategy 
)

Definition at line 144 of file SnapManager.cpp.

References TE_TR.

void te::edit::SnapManager::removeSnap ( const std::string &  source)

Definition at line 83 of file SnapManager.cpp.

bool te::edit::SnapManager::search ( const te::gm::Coord2D coord,
int  srid,
te::gm::Coord2D result 
)

Definition at line 123 of file SnapManager.cpp.

void te::edit::SnapManager::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 135 of file SnapManager.cpp.

Friends And Related Function Documentation

friend class te::common::Singleton< SnapManager >
friend

Definition at line 67 of file SnapManager.h.

Member Data Documentation

std::map<std::string, Snap*> te::edit::SnapManager::m_snaps
private

Definition at line 109 of file SnapManager.h.

Referenced by hasSnap().

SnapStrategies te::edit::SnapManager::m_snapStrategies
private

Definition at line 108 of file SnapManager.h.


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