This is a singleton for managing all mark renderers instances available in the system.
More...
#include <MarkRendererManager.h>
|
void | add (const std::string &key, AbstractMarkRenderer *renderer) |
| It adds a new mark renderer to the manager.
|
|
void | clear () |
| It clears the marks renderers of the manager.
|
|
void | getAllSupportedMarks (std::vector< std::string > &marks) const |
| It informs the set of all supported marks available in the system.
|
|
te::color::RGBAColor ** | render (const MarkRendererParams &markRenderParams) |
| It generates the image pattern from the given Symbology Enconding Mark element.
|
|
|
static ::boost::recursive_mutex | sm_mtx |
| The mutex used to control the class lock.
|
|
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);
- See also
- AbstractMarkRenderer
Definition at line 64 of file MarkRendererManager.h.
◆ LockRead
typedef ClassLevelLockingPolicy<::boost::lock_guard< ::boost::recursive_mutex > > te::common::ClassLevelLockable< MarkRendererManager , ::boost::recursive_mutex , ::boost::lock_guard< ::boost::recursive_mutex > , ::boost::lock_guard< ::boost::recursive_mutex > >::LockRead |
|
inherited |
◆ LockWrite
typedef ClassLevelLockingPolicy<::boost::lock_guard< ::boost::recursive_mutex > > te::common::ClassLevelLockable< MarkRendererManager , ::boost::recursive_mutex , ::boost::lock_guard< ::boost::recursive_mutex > , ::boost::lock_guard< ::boost::recursive_mutex > >::LockWrite |
|
inherited |
◆ VolatileType
◆ MarkRendererManager()
te::map::MarkRendererManager::MarkRendererManager |
( |
| ) |
|
|
protected |
It initializes the singleton instance of the mark renderer manager.
◆ ~MarkRendererManager()
te::map::MarkRendererManager::~MarkRendererManager |
( |
| ) |
|
|
protected |
◆ add()
It adds a new mark renderer to the manager.
- Parameters
-
key | The key of the new renderer. |
renderer | The new mark renderer that will be added on the manager. |
- Note
- The manager will take the owership of the given mark renderer.
- Exceptions
-
Exception | It will throws an exception if there is already a mark renderer registered with the given key. |
◆ clear()
void te::map::MarkRendererManager::clear |
( |
| ) |
|
It clears the marks renderers of the manager.
◆ getAllSupportedMarks()
void te::map::MarkRendererManager::getAllSupportedMarks |
( |
std::vector< std::string > & |
marks | ) |
const |
It informs the set of all supported marks available in the system.
- Parameters
-
marks | A pre-created vector of string that will be filled with the supported marks names. |
- Note
- All registered mark renderers will be consulted.
◆ getInstance()
It returns a reference to the singleton instance.
- Returns
- A reference to the singleton instance.
Definition at line 109 of file Singleton.h.
◆ render()
It generates the image pattern from the given Symbology Enconding Mark element.
- Parameters
-
markRenderParams | The parameters that will be used to render the mark |
- Returns
- The RGBA image that represents the mark.
- Note
- This method will look the name of the mark and try extract the associated rendererKey. The pattern used is "rendererKey://markName". Case empty will be used the default mark renderer.
-
The caller will take the ownership of the returned pointer.
- Exceptions
-
Exception | It will throws an exception if the image pattern can not be generated. |
◆ te::common::Singleton< MarkRendererManager >
◆ m_renderers
◆ sm_mtx
The documentation for this class was generated from the following file: