Chrysalis - Pattern Test Coverage


pattern/
File: pattern/include/ProjectSpace.h
Date: 2026-08-27 18:35:18
Lines:
1/1
100.0%
Functions:
2/2
100.0%
Branches:
0/0
-%
Decisions:
0/0
-%
Calls:
0/0
-%

Line Branch Decision Call Exec Source
1 #ifndef CHRYSALIS_SPACE_H
2 #define CHRYSALIS_SPACE_H
3
4 #include <unordered_set>
5
6 #include "Curve.h"
7 #include "serialization.h"
8
9 #include "Point.h"
10
11 namespace Chrysalis {
12 class ProjectSpace {
13 8 SERIALIZED
14 public:
15 ~ProjectSpace();
16
17 void movePoint(const Point* point, CG::Point position) const;
18
19 bool hasCurve(const Point* from, const Point* to) const;
20 const Curve* getCurve(const Point* from, const Point* to) const;
21
22 Point* addPoint(double x, double y);
23 Point* addPoint(const CG::Point& point);
24 Curve* addCurve(const Point* from, const Point* to,
25 const CG::Segment& segmentFrom, const CG::Segment& segmentTo,
26 const std::vector<CG::Point>& points);
27 private:
28 /// @uml{composition}
29 std::unordered_set<Point*> points_;
30 /// @uml{composition}
31 std::unordered_map<const Point*, std::unordered_map<const Point*, Curve*>> curves_;
32 };
33 }
34
35 #endif //CHRYSALIS_SPACE_H
36