27 #include "../common/STLUtils.h"
28 #include "../common/Translator.h"
51 throw Exception(
TR_MAP(
"Requested size is invalid!"));
54 throw Exception(
TR_MAP(
"The given external graphic is invalid!"));
56 if(m_renderers.empty())
57 throw Exception(
TR_MAP(
"There are not external graphic renderers registered!"));
59 for(std::size_t i = 0; i < m_renderers.size(); ++i)
66 throw Exception(
TR_MAP(
"The given external graphic cannot be processed by any registered external graphic renderer!"));
71 m_renderers.push_back(renderer);
te::color::RGBAColor ** render(const te::se::ExternalGraphic *eg, std::size_t height, std::size_t &width)
It generates the image pattern from the given Symbology Enconding External Graphic element...
void FreeContents(boost::unordered_map< K, V * > &m)
This function can be applied to a map of pointers. It will delete each pointer in the map...
The ExternalGraphic allows a reference to be made to an external graphic file with a Web URL or to in...
ClassLevelLockingPolicy< ::boost::lock_guard< ::boost::recursive_mutex > > LockWrite
An exception class for the MapTools module.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
#define TR_MAP(message)
It marks a string in order to get translated. This is a special mark used in the Map Rendering module...
~ExternalGraphicRendererManager()
Singleton destructor.
ExternalGraphicRendererManager()
It initializes the singleton instance of the external graphic renderer manager.
An abstract class for conversion of Symbology Enconding ExternalGraphic elements to an image pattern...
An abstract class for conversion of Symbology Enconding ExternalGraphic elements to an image pattern...
void add(AbstractExternalGraphicRenderer *renderer)
It adds a new external graphic renderer to the manager.
This is a singleton for managing all external graphic renderers instances available in the system...