OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
AbstractConnection.h
Go to the documentation of this file.
1/*
2 * File: AbstractConnection.h
3 * Package: rbeCore
4 *
5 * Created on: September 10, 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 <sstream>
21
22namespace rbeCore {
23
24 class RubberbandEngine;
25
27 public:
28
32 ctHistory
33 };
34
35 AbstractConnection(connectionType _type);
37
38 // ######################################################################################
39
40 // Getter
41
42 connectionType type(void) const { return m_type; }
43
44 bool ignoreInHistory(void) const { return m_ignoreInHistory; }
45
46 // ######################################################################################
47
48 // Setter
49
50 void setIgnoreInHistory(bool _ignore) { m_ignoreInHistory = _ignore; }
51
52 // ######################################################################################
53
54 // Abstract functions
55
56 virtual std::string debugInformation(const std::string& _prefix) = 0;
57
58 virtual void addToJsonArray(RubberbandEngine * _engine, std::stringstream& _array, bool& _first) = 0;
59
60 private:
61 connectionType m_type;
62 bool m_ignoreInHistory;
63
64 AbstractConnection() = delete;
66 AbstractConnection& operator = (AbstractConnection&) = delete;
67 };
68
69}
Definition AbstractConnection.h:26
virtual ~AbstractConnection()
Definition AbstractConnection.h:36
connectionType
Definition AbstractConnection.h:29
@ ctCircle
Definition AbstractConnection.h:31
@ ctLine
Definition AbstractConnection.h:30
bool ignoreInHistory(void) const
Definition AbstractConnection.h:44
void setIgnoreInHistory(bool _ignore)
Definition AbstractConnection.h:50
virtual std::string debugInformation(const std::string &_prefix)=0
connectionType type(void) const
Definition AbstractConnection.h:42
virtual void addToJsonArray(RubberbandEngine *_engine, std::stringstream &_array, bool &_first)=0
Definition RubberbandEngine.h:30
#define RBE_API_EXPORT
Definition dataTypes.h:18
Definition ParserAPI.h:21