From b3340bf8f2f924456c82277b176abb03df93e268 Mon Sep 17 00:00:00 2001 From: tobiglaser <76131623+tobiglaser@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:18:57 +0200 Subject: [PATCH] add and include commandlib header --- CMakeLists.txt | 7 +++++-- include/commandlib.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 include/commandlib.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d4167a..5f2a6ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,5 +9,8 @@ set(CMAKE_CXX_STANDARD 20) add_executable("Info3_Praktikum-test" - src/testCommandList.cpp -) \ No newline at end of file +src/testCommandList.cpp +) + +# Add include directory +target_include_directories("Info3_Praktikum-test" PUBLIC include/) \ No newline at end of file diff --git a/include/commandlib.h b/include/commandlib.h new file mode 100644 index 0000000..210b926 --- /dev/null +++ b/include/commandlib.h @@ -0,0 +1,34 @@ +// hsrt.mec.controldeveloper.core.com.command +#pragma once +#include <string> + +class ICommand +{ +public: + virtual std::string getName() = 0; +}; + +class IDirection +{ +public: + inline static const std::string direction = "Direction"; + + virtual int getDegree() = 0; +}; + +class IGear +{ +public: + inline static const std::string gear = "Gear"; + + virtual int getSpeed() = 0; + virtual double getDuration() = 0; +}; + +class IPause +{ +public: + inline static const std::string pause = "Pause"; + + virtual double getDuration() = 0; +}; \ No newline at end of file -- GitLab