From 3d9e48e369eb3b0b9d66119b6b35d2f03d210721 Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Wed, 10 Jul 2019 12:16:51 +0200 Subject: [PATCH] Add basic CMake, BicycleCar class --- CMakeLists.txt | 13 +++++++++++++ api/bcar.h | 24 ++++++++++++++++++++++++ src/bcar.cc | 0 3 files changed, 37 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 api/bcar.h create mode 100644 src/bcar.cc diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..296e939 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 2.8) +project(bcar) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/incl) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/api) + +add_library(bcar SHARED + src/bcar.cc +) + +set_target_properties(bcar PROPERTIES + PUBLIC_HEADER api/bcar.h +) diff --git a/api/bcar.h b/api/bcar.h new file mode 100644 index 0000000..a734d2a --- /dev/null +++ b/api/bcar.h @@ -0,0 +1,24 @@ +#ifndef BCAR_H +#define BCAR_H + +/*! \brief Bicycle car basic class. + +This class contains some geometrical computations of bicycle car. +*/ +class BicycleCar { + private: + double x_ = 0; + double y_ = 0; + double h_ = 0; + public: + double x() { return this->x_; } + void x(double x) { this->x_ = x; } + + double y() { return this->y_; } + void y(double y) { this->y_ = y; } + + double h() { return this->h_; } + void h(double h) { this->h_ = h; } +}; + +#endif /* BCAR_H */ diff --git a/src/bcar.cc b/src/bcar.cc new file mode 100644 index 0000000..e69de29 -- 2.39.2