This is a singleton for managing all mark renderers instances available in the system. More...
#include <MarkRendererManager.h>
Public Types | |
typedef ClassLevelLockingPolicy < ::boost::lock_guard < ::boost::recursive_mutex > > | LockRead |
typedef ClassLevelLockingPolicy < ::boost::lock_guard < ::boost::recursive_mutex > > | LockWrite |
typedef volatile MarkRendererManager | VolatileType |
Public Member Functions | |
void | add (const std::string &key, AbstractMarkRenderer *renderer) |
It adds a new mark renderer to the manager. More... | |
void | getAllSupportedMarks (std::vector< std::string > &marks) const |
It informs the set of all supported marks available in the system. More... | |
te::color::RGBAColor ** | render (const te::se::Mark *mark, std::size_t size) |
It generates the image pattern from the given Symbology Enconding Mark element. More... | |
Static Public Member Functions | |
static MarkRendererManager & | getInstance () |
It returns a reference to the singleton instance. More... | |
Protected Member Functions | |
MarkRendererManager () | |
It initializes the singleton instance of the mark renderer manager. More... | |
~MarkRendererManager () | |
Singleton destructor. More... | |
Private Attributes | |
std::map< std::string, AbstractMarkRenderer * > | m_renderers |
The mark renderers in the manager. More... | |
Friends | |
class | te::common::Singleton< MarkRendererManager > |
This is a singleton for managing all mark renderers instances available in the system.
If you want to render a mark, use commands like: te::color::RBGA** image = te::map::MarkRendererManager::getInstance().render(mark, size);
Definition at line 63 of file MarkRendererManager.h.
|
inherited |
Definition at line 302 of file ThreadingPolicies.h.
|
inherited |
Definition at line 303 of file ThreadingPolicies.h.
|
inherited |
Definition at line 301 of file ThreadingPolicies.h.
|
protected |
It initializes the singleton instance of the mark renderer manager.
Definition at line 42 of file MarkRendererManager.cpp.
|
protected |
Singleton destructor.
Definition at line 46 of file MarkRendererManager.cpp.
References te::common::FreeContents().
void te::map::MarkRendererManager::add | ( | const std::string & | key, |
AbstractMarkRenderer * | renderer | ||
) |
It adds a new mark renderer to the manager.
key | The key of the new renderer. |
renderer | The new mark renderer that will be added on the manager. |
Exception | It will throws an exception if there is already a mark renderer registered with the given key. |
Definition at line 93 of file MarkRendererManager.cpp.
References TE_TR.
void te::map::MarkRendererManager::getAllSupportedMarks | ( | std::vector< std::string > & | marks | ) | const |
It informs the set of all supported marks available in the system.
marks | A pre-created vector of string that will be filled with the supported marks names. |
Definition at line 86 of file MarkRendererManager.cpp.
|
staticinherited |
It returns a reference to the singleton instance.
Referenced by te::map::CanvasConfigurer::config(), te::qt::widgets::Config2DrawPoints(), te::graph::LayerRenderer::configDefaultPoint(), te::graph::LayerRenderer::configLoopPoint(), te::qt::widgets::Info::drawGeometry(), te::qt::widgets::MarkSymbol::drawSymbols(), te::qt::widgets::GlyphGraphicWidget::getGraphicIcon(), te::qt::widgets::WellKnownGraphicWidget::getGraphicIcon(), te::qt::widgets::WellKnownMarkPropertyItem::getTypeNames(), te::qt::widgets::Module::initialize(), te::qt::widgets::MixtureModelWizardPage::MixtureModelWizardPage(), te::qt::widgets::Terralib2Qwt(), te::qt::widgets::TiePointLocatorWidget::TiePointLocatorWidget(), te::qt::widgets::WellKnownMarkWidget::WellKnownMarkWidget(), and te::qt::widgets::ZoomInMapDisplayWidget::ZoomInMapDisplayWidget().
te::color::RGBAColor ** te::map::MarkRendererManager::render | ( | const te::se::Mark * | mark, |
std::size_t | size | ||
) |
It generates the image pattern from the given Symbology Enconding Mark element.
mark | The Symbology Enconding Mark element that will be used as base to build the image pattern. |
size | The size of image pattern that will be generated. |
Exception | It will throws an exception if the image pattern can not be generated. |
Definition at line 51 of file MarkRendererManager.cpp.
References te::se::Mark::getWellKnownName(), TE_TR, and te::common::Tokenize().
Referenced by te::map::CanvasConfigurer::config().
|
friend |
Definition at line 69 of file MarkRendererManager.h.
|
private |
The mark renderers in the manager.
Definition at line 122 of file MarkRendererManager.h.