te::map::ChartRendererManager Class Reference

This is a singleton for managing chart renderer instance available in the system. More...

#include <ChartRendererManager.h>

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

Public Types

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

Public Member Functions

te::color::RGBAColor ** render (const Chart *chart, const te::da::DataSet *dataset, std::size_t &width)
 It generates the image pattern from the given chart and dataset. More...
 
te::color::RGBAColor ** render (const Chart *chart, const std::map< std::string, double > &chartValue, std::size_t &width)
 
void set (AbstractChartRenderer *renderer)
 It sets the chart renderer to the manager. More...
 

Static Public Member Functions

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

Protected Member Functions

 ChartRendererManager ()
 It initializes the singleton instance of the chart renderer manager. More...
 
 ~ChartRendererManager ()
 Singleton destructor. More...
 

Private Attributes

AbstractChartRendererm_renderer
 The chart renderer in the manager. More...
 

Friends

class te::common::Singleton< ChartRendererManager >
 

Detailed Description

This is a singleton for managing chart renderer instance available in the system.

If you want to render a chart, use commands like: te::color::RBGA** image = te::map::ChartRendererManager::getInstance().render(chart, dataset);

See also
AbstractChartRenderer, Chart

Definition at line 61 of file ChartRendererManager.h.

Member Typedef Documentation

typedef ClassLevelLockingPolicy<::boost::lock_guard< ::boost::recursive_mutex > > te::common::ClassLevelLockable< ChartRendererManager , ::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< ChartRendererManager , ::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 ChartRendererManager te::common::ClassLevelLockable< ChartRendererManager , ::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::ChartRendererManager::ChartRendererManager ( )
protected

It initializes the singleton instance of the chart renderer manager.

te::map::ChartRendererManager::~ChartRendererManager ( )
protected

Singleton destructor.

Member Function Documentation

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.

te::color::RGBAColor** te::map::ChartRendererManager::render ( const Chart chart,
const te::da::DataSet dataset,
std::size_t &  width 
)

It generates the image pattern from the given chart and dataset.

Parameters
chartThe chart informations that will be used.
datasetThe dataset that will be used.
widthAn output parameter that will be filled with the width of generated image pattern.
Returns
The RGBA image that represents the chart.
Note
The caller will take the ownership of the returned pointer.
Exceptions
ExceptionIt will throws an exception if the image pattern can not be generated.
te::color::RGBAColor** te::map::ChartRendererManager::render ( const Chart chart,
const std::map< std::string, double > &  chartValue,
std::size_t &  width 
)
void te::map::ChartRendererManager::set ( AbstractChartRenderer renderer)

It sets the chart renderer to the manager.

Parameters
rendererThe renderer that will be set.
Note
The manager will take the owership of the given chart renderer.

Friends And Related Function Documentation

Definition at line 67 of file ChartRendererManager.h.

Member Data Documentation

AbstractChartRenderer* te::map::ChartRendererManager::m_renderer
private

The chart renderer in the manager.

Definition at line 107 of file ChartRendererManager.h.


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