diff --git a/headers/enduro2d/high/_all.hpp b/headers/enduro2d/high/_all.hpp index 8090a2d9..14b656ce 100644 --- a/headers/enduro2d/high/_all.hpp +++ b/headers/enduro2d/high/_all.hpp @@ -7,3 +7,5 @@ #pragma once #include "_high.hpp" + +#include "library.hpp" diff --git a/headers/enduro2d/high/_high.hpp b/headers/enduro2d/high/_high.hpp index c0e443cc..774ebffd 100644 --- a/headers/enduro2d/high/_high.hpp +++ b/headers/enduro2d/high/_high.hpp @@ -10,4 +10,5 @@ namespace e2d { + class library; } diff --git a/headers/enduro2d/high/library.hpp b/headers/enduro2d/high/library.hpp new file mode 100644 index 00000000..9b3718e6 --- /dev/null +++ b/headers/enduro2d/high/library.hpp @@ -0,0 +1,28 @@ +/******************************************************************************* + * This file is part of the "Enduro2D" + * For conditions of distribution and use, see copyright notice in LICENSE.md + * Copyright (C) 2018 Matvey Cherevko + ******************************************************************************/ + +#pragma once + +#include "_high.hpp" + +namespace e2d +{ + class bad_library_operation final : public exception { + public: + const char* what() const noexcept final { + return "bad library operation"; + } + }; + + class library final : public module { + public: + library(); + ~library() noexcept final; + private: + class internal_state; + std::unique_ptr state_; + }; +} diff --git a/sources/enduro2d/high/library.cpp b/sources/enduro2d/high/library.cpp new file mode 100644 index 00000000..afb6115d --- /dev/null +++ b/sources/enduro2d/high/library.cpp @@ -0,0 +1,25 @@ +/******************************************************************************* + * This file is part of the "Enduro2D" + * For conditions of distribution and use, see copyright notice in LICENSE.md + * Copyright (C) 2018 Matvey Cherevko + ******************************************************************************/ + +#include + +namespace e2d +{ + // + // library::internal_state + // + + class library::internal_state final : private e2d::noncopyable { + }; + + // + // library + // + + library::library() + : state_(new internal_state()){} + library::~library() noexcept = default; +} diff --git a/untests/CMakeLists.txt b/untests/CMakeLists.txt index 84ff44a5..d4f69429 100644 --- a/untests/CMakeLists.txt +++ b/untests/CMakeLists.txt @@ -51,5 +51,6 @@ endfunction(add_e2d_tests) add_e2d_tests(base) add_e2d_tests(core) +add_e2d_tests(high) add_e2d_tests(math) add_e2d_tests(utils) diff --git a/untests/sources/untests_high/_high.cpp b/untests/sources/untests_high/_high.cpp new file mode 100644 index 00000000..b0eccf3d --- /dev/null +++ b/untests/sources/untests_high/_high.cpp @@ -0,0 +1,11 @@ +/******************************************************************************* + * This file is part of the "Enduro2D" + * For conditions of distribution and use, see copyright notice in LICENSE.md + * Copyright (C) 2018 Matvey Cherevko + ******************************************************************************/ + +#define CATCH_CONFIG_MAIN +#include "_high.hpp" + +TEST_CASE("high") { +} diff --git a/untests/sources/untests_high/_high.hpp b/untests/sources/untests_high/_high.hpp new file mode 100644 index 00000000..2ac591f1 --- /dev/null +++ b/untests/sources/untests_high/_high.hpp @@ -0,0 +1,9 @@ +/******************************************************************************* + * This file is part of the "Enduro2D" + * For conditions of distribution and use, see copyright notice in LICENSE.md + * Copyright (C) 2018 Matvey Cherevko + ******************************************************************************/ + +#pragma once + +#include "../common.hpp" diff --git a/untests/sources/untests_high/library.cpp b/untests/sources/untests_high/library.cpp new file mode 100644 index 00000000..2df1ecaf --- /dev/null +++ b/untests/sources/untests_high/library.cpp @@ -0,0 +1,11 @@ +/******************************************************************************* + * This file is part of the "Enduro2D" + * For conditions of distribution and use, see copyright notice in LICENSE.md + * Copyright (C) 2018 Matvey Cherevko + ******************************************************************************/ + +#include "_high.hpp" +using namespace e2d; + +TEST_CASE("library"){ +}