1 | |
2 | #pragma once |
3 | |
4 | #include "edge-segments.h" |
5 | |
6 | namespace msdfgen { |
7 | |
8 | /// Container for a single edge of dynamic type. |
9 | class EdgeHolder { |
10 | |
11 | public: |
12 | /// Swaps the edges held by a and b. |
13 | static void swap(EdgeHolder &a, EdgeHolder &b); |
14 | |
15 | EdgeHolder(); |
16 | EdgeHolder(EdgeSegment *segment); |
17 | EdgeHolder(Point2 p0, Point2 p1, EdgeColor edgeColor = WHITE); |
18 | EdgeHolder(Point2 p0, Point2 p1, Point2 p2, EdgeColor edgeColor = WHITE); |
19 | EdgeHolder(Point2 p0, Point2 p1, Point2 p2, Point2 p3, EdgeColor edgeColor = WHITE); |
20 | EdgeHolder(const EdgeHolder &orig); |
21 | #ifdef MSDFGEN_USE_CPP11 |
22 | EdgeHolder(EdgeHolder &&orig); |
23 | #endif |
24 | ~EdgeHolder(); |
25 | EdgeHolder & operator=(const EdgeHolder &orig); |
26 | #ifdef MSDFGEN_USE_CPP11 |
27 | EdgeHolder & operator=(EdgeHolder &&orig); |
28 | #endif |
29 | EdgeSegment & operator*(); |
30 | const EdgeSegment & operator*() const; |
31 | EdgeSegment * operator->(); |
32 | const EdgeSegment * operator->() const; |
33 | operator EdgeSegment *(); |
34 | operator const EdgeSegment *() const; |
35 | |
36 | private: |
37 | EdgeSegment *edgeSegment; |
38 | |
39 | }; |
40 | |
41 | } |
42 | |