2 #include "gearsurf/MeasurementSurfaceStore.h"
10 #include "gearsurf/MeasurementSurface.h"
11 #include "gearsurf/BoundaryRectangle.h"
12 #include "gearsurf/BoundaryTrapezoid.h"
14 #include "gearsurf/CartesianCoordinateSystem.h"
22 _store_filled = right._store_filled;
24 _measurement_surface_map = right._measurement_surface_map;
26 _fillerName = right._fillerName;
33 ms_map_it it = _measurement_surface_map.begin();
34 std::vector<MeasurementSurface*> deleted_objects;
36 for( ; it!=_measurement_surface_map.end(); ++it)
38 if( std::find( deleted_objects.begin(), deleted_objects.end(), (*it).second ) != deleted_objects.end() ) {
40 deleted_objects.push_back((*it).second) ;
46 ms_map_it it = _measurement_surface_map.find(ID) ;
48 if ( it == _measurement_surface_map.end() ) {
51 s <<
"GetMeasurementSurface: The surface with ID " << ID <<
" is not in the map!";
67 ms_map_it it = _measurement_surface_map.find(ID) ;
70 if ( it != _measurement_surface_map.end() ) {
73 s <<
"addMeasurementSurface: The surface with ID " << ID <<
" can't be added as it already is in the map!";
79 _measurement_surface_map[ID] = ms ;
86 if ( _store_filled ==
false ) {
87 gear::Exception exp(
"MeasurementSurfaceStore::getFillerName(): Store has not yet been filled!" ) ;
100 s <<
"FillStore: Store already filled with MeasurementSurfaceStoreFiller " << _fillerName ;
108 _fillerName = filler->getName();
109 std::vector<MeasurementSurface*> surface_list;
110 filler->getMeasurementSurfaces(surface_list);
112 std::vector<MeasurementSurface*>::iterator it;
114 for (it = surface_list.begin(); it!=surface_list.end(); ++it) {
115 this->addMeasurementSurface(*it);
118 _store_filled =
true;
Base exception class for GEAR - all other exceptions extend this.
MeasurementSurface const * GetMeasurementSurface(int ID) const
Get Measurement Surface via ID.
MeasurementSurfaceStore()
Default Constructor.
~MeasurementSurfaceStore()
Destructor.
void FillStore(MeasurementSurfaceStoreFiller *filler)
Fill Store.
std::string getFillerName() const
Get the Name of the Filler used to fill the store.