te::map::ExternalGraphicRendererManager Class Reference

This is a singleton for managing all external graphic renderers instances available in the system. More...

#include <ExternalGraphicRendererManager.h>

Inheritance diagram for te::map::ExternalGraphicRendererManager:
te::common::ClassLevelLockable< ExternalGraphicRendererManager,::boost::recursive_mutex,::boost::lock_guard< ::boost::recursive_mutex >,::boost::lock_guard< ::boost::recursive_mutex > > te::common::Singleton< ExternalGraphicRendererManager >

Public Types

typedef ClassLevelLockingPolicy< ::boost::lock_guard< ::boost::recursive_mutex > > LockRead
 
typedef ClassLevelLockingPolicy< ::boost::lock_guard< ::boost::recursive_mutex > > LockWrite
 
typedef volatile ExternalGraphicRendererManager VolatileType
 

Public Member Functions

void add (AbstractExternalGraphicRenderer *renderer)
 It adds a new external graphic renderer to the manager. More...
 
void clear ()
 It clears the graphic renderers of the manager. More...
 
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. More...
 

Static Public Member Functions

static ExternalGraphicRendererManagergetInstance ()
 It returns a reference to the singleton instance. More...
 

Protected Member Functions

 ExternalGraphicRendererManager ()
 It initializes the singleton instance of the external graphic renderer manager. More...
 
 ~ExternalGraphicRendererManager ()
 Singleton destructor. More...
 

Private Attributes

std::vector< AbstractExternalGraphicRenderer * > m_renderers
 The external graphic renderers in the manager. More...
 

Friends

class te::common::Singleton< ExternalGraphicRendererManager >
 

Detailed Description

This is a singleton for managing all external graphic renderers instances available in the system.

If you want to render a external graphic, use commands like: te::color::RBGA** image = te::map::ExternalGraphicRendererManager::getInstance().render(eg, size);

See also
AbstractExternalGraphickRenderer

Definition at line 63 of file ExternalGraphicRendererManager.h.

Member Typedef Documentation

typedef ClassLevelLockingPolicy<::boost::lock_guard< ::boost::recursive_mutex > > te::common::ClassLevelLockable< ExternalGraphicRendererManager , ::boost::recursive_mutex , ::boost::lock_guard< ::boost::recursive_mutex > , ::boost::lock_guard< ::boost::recursive_mutex > >::LockRead
inherited

Definition at line 302 of file ThreadingPolicies.h.

typedef ClassLevelLockingPolicy<::boost::lock_guard< ::boost::recursive_mutex > > te::common::ClassLevelLockable< ExternalGraphicRendererManager , ::boost::recursive_mutex , ::boost::lock_guard< ::boost::recursive_mutex > , ::boost::lock_guard< ::boost::recursive_mutex > >::LockWrite
inherited

Definition at line 303 of file ThreadingPolicies.h.

typedef volatile ExternalGraphicRendererManager te::common::ClassLevelLockable< ExternalGraphicRendererManager , ::boost::recursive_mutex , ::boost::lock_guard< ::boost::recursive_mutex > , ::boost::lock_guard< ::boost::recursive_mutex > >::VolatileType
inherited

Definition at line 301 of file ThreadingPolicies.h.

Constructor & Destructor Documentation

te::map::ExternalGraphicRendererManager::ExternalGraphicRendererManager ( )
protected

It initializes the singleton instance of the external graphic renderer manager.

te::map::ExternalGraphicRendererManager::~ExternalGraphicRendererManager ( )
protected

Singleton destructor.

Member Function Documentation

void te::map::ExternalGraphicRendererManager::add ( AbstractExternalGraphicRenderer renderer)

It adds a new external graphic renderer to the manager.

Parameters
rendererThe new external graphic renderer that will be added on the manager.
Note
The manager will take the owership of the given external graphic renderer.
void te::map::ExternalGraphicRendererManager::clear ( )

It clears the graphic renderers of the manager.

It returns a reference to the singleton instance.

Returns
A reference to the singleton instance.
te::color::RGBAColor** te::map::ExternalGraphicRendererManager::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.

Parameters
egThe Symbology Enconding External Graphic element that will be used as base to build the image pattern.
heightThe height of image pattern that will be generated.
widthAn output parameter that will be filled with the width of generated image pattern.
Returns
The RGBA image that represents the external graphic.
Note
This method will consult all registered external graphic renderers and the first that can process the given element will be used.
The caller will take the ownership of the returned pointer.
Exceptions
ExceptionIt will throws an exception if the image pattern can not be generated.

Friends And Related Function Documentation

Member Data Documentation

std::vector<AbstractExternalGraphicRenderer*> te::map::ExternalGraphicRendererManager::m_renderers
private

The external graphic renderers in the manager.

Definition at line 115 of file ExternalGraphicRendererManager.h.


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