20 #ifndef GAIA_APPLIER_H 21 #define GAIA_APPLIER_H 25 #include "transformation.h" 26 #include "pointlayout.h" 27 #include "textprogress.h" 99 void registerAppliers();
105 #define MAPDATASET_PREPARE \ 106 checkLayout(dataset); \ 107 DataSet* result = new DataSet; \ 108 result->setName(dataset->name()); \ 110 TextProgress info(dataset->size(), \ 111 QString("Applying '") + _transfo.analyzerName \ 112 + "' transformation [%1/%2] (%3% done)", \ 114 info.setSilent(!gaia2::verbose); \ 118 #define MAPDATASET_LOOP_POINT \ 119 QVector<Point*> v(dataset->size()); \ 120 for (int i=0; i<dataset->size(); i++) { \ 121 info.update(++npoint); \ 122 const Point* p = dataset->at(i); 125 #define MAPDATASET_END_LOOP_NO_RETURN \ 128 addPointsNoLayoutCheck(result, v); \ 129 transferHistory(dataset, result); 133 #define MAPDATASET_END_LOOP \ 134 MAPDATASET_END_LOOP_NO_RETURN; \ 138 #endif // GAIA_APPLIER_H A basic implementation of a generic factory class.
Definition: factory.h:41
void addPointsNoLayoutCheck(DataSet *dataset, const QVector< Point * > &points) const
Adds the given points to a DataSet without checking for the layout to be correct. ...
Definition: applier.cpp:84
This class represents a dataset and all related information.
Definition: dataset.h:91
This class describes the layout of a point.
Definition: pointlayout.h:60
virtual DataSet * mapDataSet(const DataSet *dataset) const
Provides a default function that maps a whole dataset but which can be overriden in derived classes t...
Definition: applier.cpp:58
Main Gaia namespace, which contains all the library functions.
Definition: addfield.cpp:22
void transferHistory(const DataSet *original, DataSet *destination) const
This method tranfers the transformation history from the original dataset to the one being created...
Definition: applier.cpp:78
The Applier abstract base class.
Definition: applier.h:44
void checkLayout(const PointLayout &layout) const
Check that the given layout is the same as the one that was used during the analysis part of this tra...
Definition: applier.cpp:66
virtual Point * mapPoint(const Point *p) const =0
Ownership of resulting point is handed to caller of this function.