OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
Step.h
Go to the documentation of this file.
1/*
2 * File: Step.h
3 * Package: rbeCore
4 *
5 * Created on: September 07, 2021
6 * Author: Alexander Kuester
7 * Copyright (c) 2021 Alexander Kuester
8 * This file is part of the RubberbandEngine package.
9 * This file is subject to the terms and conditions defined in
10 * file 'LICENSE', which is part of this source code package.
11 */
12
13#pragma once
14
15// RBE header
16#include <rbeCore/dataTypes.h>
17
18// C++ header
19#include <string>
20#include <list>
21#include <sstream>
22
23namespace rbeCalc { class VariableValue; }
24
25namespace rbeCore {
26
27 class Point;
28 class RubberbandEngine;
29 class AbstractConnection;
30 class AbstractPoint;
31 class Limit;
32
34 public:
35
38 pW
39 };
40
41 Step();
42 virtual ~Step();
43
44 // ###################################################################################
45
46 // Setter
47
48 void setId(int _id) { m_id = _id; }
49
50 void setMayEndWithout(bool _mayEnd) { m_mayEndWithout = _mayEnd; }
51
52 void setProjection(eProjection _projection) { m_projection = _projection; }
53
54 void addPoint(Point * _p);
55
56 void addLimit(Limit * _limit);
57
58 void setupFromJson(RubberbandEngine * _engine, const std::string& _json);
59
60 void givePointOwnershipToEngine(RubberbandEngine * _engine);
61
62 // ###################################################################################
63
64 // Getter
65
66 int id(void) const { return m_id; }
67
68 bool mayEndWithout(void) const { return m_mayEndWithout; }
69
70 bool hasPointOwnership(void) const { return m_pointsOwned; }
71
72 eProjection projection(void) const { return m_projection; }
73
74 Point * point(int _id);
75
76 bool hasPoint(int _id);
77
78 std::string debugInformation(const std::string& _prefix);
79
80 void addConnectionsToJsonArray(RubberbandEngine * _engine, std::stringstream& _array, bool& _first, bool _isHistory);
81
82 void addConnectionsToList(std::list<AbstractConnection *>& _list, bool _isHistory);
83
85 void adjustCoordinateToLimits(coordinate_t & _u, coordinate_t & _v, coordinate_t & _w);
86
87 void setLastPosition(coordinate_t _u, coordinate_t _v, coordinate_t _w);
88
89 AbstractPoint * lastPosition(void);
90
91 private:
92 struct sData;
93
94 bool m_pointsOwned;
95 bool m_mayEndWithout;
96 int m_id;
97 sData * m_data;
98 eProjection m_projection;
99 AbstractPoint * m_lastCurrent;
100 rbeCalc::VariableValue * m_lastCurrentU;
101 rbeCalc::VariableValue * m_lastCurrentV;
102 rbeCalc::VariableValue * m_lastCurrentW;
103
104 Step(Step&) = delete;
105 Step& operator = (Step&) = delete;
106 };
107
108}
@ point
Definition MonitorSettings.h:19
Definition VariableValue.h:19
Definition AbstractPoint.h:24
A limit is used for the engine to forbid values exceeding a defined range of values Limits can be add...
Definition Limit.h:24
Definition Point.h:24
Definition RubberbandEngine.h:30
Definition Step.h:33
bool hasPointOwnership(void) const
Definition Step.h:70
void setId(int _id)
Definition Step.h:48
bool mayEndWithout(void) const
Definition Step.h:68
void setMayEndWithout(bool _mayEnd)
Definition Step.h:50
eProjection projection(void) const
Definition Step.h:72
void setProjection(eProjection _projection)
Definition Step.h:52
int id(void) const
Definition Step.h:66
eProjection
Definition Step.h:36
@ pUV
Definition Step.h:37
float coordinate_t
Definition dataTypes.h:26
#define RBE_API_EXPORT
Definition dataTypes.h:18
Definition AbstractCalculationItem.h:18
Definition ParserAPI.h:21