proland::CurveDataFactory Class Reference
[producer]
CurveData Factory.
More...
#include <CurveDataFactory.h>
List of all members.
Public Member Functions |
| CurveDataFactory () |
| Creates a new CurveDataFactory.
|
| CurveDataFactory (ptr< TileProducer > producer) |
| Creates a new CurveDataFactory.
|
virtual | ~CurveDataFactory () |
| Deletes this CurveDataFactory.
|
virtual CurveData * | newCurveData (CurveId id, CurvePtr flattenCurve) |
| Returns a new CurveData, whose type depends on the class that implements CurveDataFactory.
|
virtual void | graphChanged () |
| See GraphListener::graphChanged().
|
CurveData * | getCurveData (CurvePtr c) |
| Returns the CurveData corresponding to the given Curve.
|
void | putCurveData (CurveId id) |
| Releases the CurveData corresponding to the given CurveId.
|
CurveData * | findCurveData (CurvePtr c) |
| Returns the CurveData corresponding to the given Curve.
|
void | releaseCurveData (int level, int tx, int ty) |
| Releases every used CurveData corresponding to a given tile.
|
void | addUsedCurveDatas (int level, int tx, int ty, set< CurveId > curveDatas) |
| Adds a list of Curves used by a tile of this factory.
|
void | clear () |
| Deletes every CurveData.
|
Protected Member Functions |
void | init (ptr< TileProducer > producer) |
| Initializes CurveDataFactory fields.
|
Protected Attributes |
ptr< TileProducer > | producer |
| The GraphProducer used to generate Curves and their flattened version.
|
map< CurveId, CurveData * > | curveDatas |
| List of every CurveData and their associated CurveId.
|
map< CurveData *, int > | usedDataCount |
| Reference count for each CurveData.
|
map< TileCache::Tile::Id, set
< CurveId > > | usedDatas |
| Maps every tile to the CurveDatas it uses.
|
Detailed Description
CurveData Factory.
Handles creation, access and destruction of CurveDatas, and allows to instantiate different types of CurveData.
- Author:
- Antoine Begault
Constructor & Destructor Documentation
proland::CurveDataFactory::CurveDataFactory |
( |
|
) |
|
proland::CurveDataFactory::CurveDataFactory |
( |
ptr< TileProducer > |
producer |
) |
|
virtual proland::CurveDataFactory::~CurveDataFactory |
( |
|
) |
[virtual] |
Member Function Documentation
void proland::CurveDataFactory::addUsedCurveDatas |
( |
int |
level, |
|
|
int |
tx, |
|
|
int |
ty, |
|
|
set< CurveId > |
curveDatas | |
|
) |
| | |
Adds a list of Curves used by a tile of this factory.
They will require a call to releaseCurveData.
- Parameters:
-
| level | level of the Tile. |
| x | x coordinate of the Tile. |
| y | y coordinate of the Tile. |
| curveDatas | list of Ids corresponding to the used CurveData. |
void proland::CurveDataFactory::clear |
( |
|
) |
|
CurveData* proland::CurveDataFactory::findCurveData |
( |
CurvePtr |
c |
) |
|
Returns the CurveData corresponding to the given Curve.
Doesn't change the reference count.
- Parameters:
-
CurveData* proland::CurveDataFactory::getCurveData |
( |
CurvePtr |
c |
) |
|
Returns the CurveData corresponding to the given Curve.
Handles a count of references.
- Parameters:
-
virtual void proland::CurveDataFactory::graphChanged |
( |
|
) |
[virtual] |
void proland::CurveDataFactory::init |
( |
ptr< TileProducer > |
producer |
) |
[protected] |
virtual CurveData* proland::CurveDataFactory::newCurveData |
( |
CurveId |
id, |
|
|
CurvePtr |
flattenCurve | |
|
) |
| | [virtual] |
void proland::CurveDataFactory::putCurveData |
( |
CurveId |
id |
) |
|
void proland::CurveDataFactory::releaseCurveData |
( |
int |
level, |
|
|
int |
tx, |
|
|
int |
ty | |
|
) |
| | |
Releases every used CurveData corresponding to a given tile.
- Parameters:
-
| level | level of the Tile. |
| x | x coordinate of the Tile. |
| y | y coordinate of the Tile. |
Member Data Documentation
The GraphProducer used to generate Curves and their flattened version.
Maps every tile to the CurveDatas it uses.