OGS
DuplicateGeometry.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <memory>
14#include <string>
15#include <vector>
16
17namespace GeoLib
18{
19class GEOObjects;
20class Point;
21class Polyline;
22class Surface;
23
28{
29
30public:
38 std::string const& input_name,
39 std::string output_name);
40
41 // Returns the (possibly modified) output name of the new geometry.
42 std::string const& getFinalizedOutputName() const { return _output_name; }
43 // Returns a reference to the copied point vector for modification
44 std::vector<GeoLib::Point*>& getPointVectorCopy();
45 // Returns a reference to the copied polyline vector for modification
46 std::vector<GeoLib::Polyline*>& getPolylineVectorCopy();
47 // Returns a reference to the copied surface vector for modification
48 std::vector<GeoLib::Surface*>& getSurfaceVectorCopy();
49
50private:
51 // creates a deep copy of the designated geometry
52 void duplicate(std::string const& input_name);
53
54 // creates a deep copy of the polyline vector
55 std::vector<GeoLib::Polyline*> copyPolylinesVector(
56 std::vector<GeoLib::Polyline*> const& polylines) const;
57
58 // creates a deep copy of the surface vector
59 std::vector<Surface*> copySurfacesVector(
60 std::vector<Surface*> const& surfaces) const;
61
62 std::string _output_name;
64
65}; // class
66
67} // namespace GeoLib
std::vector< GeoLib::Surface * > & getSurfaceVectorCopy()
void duplicate(std::string const &input_name)
GeoLib::GEOObjects & _geo_objects
std::string const & getFinalizedOutputName() const
std::vector< Surface * > copySurfacesVector(std::vector< Surface * > const &surfaces) const
std::vector< GeoLib::Point * > & getPointVectorCopy()
std::vector< GeoLib::Polyline * > & getPolylineVectorCopy()
std::vector< GeoLib::Polyline * > copyPolylinesVector(std::vector< GeoLib::Polyline * > const &polylines) const
Container class for geometric objects.
Definition: GEOObjects.h:61
TemplateElement< PointRule1 > Point
Definition: Point.h:20