From aaa2c9eeff7540776e7056b1015e58a61bea97af Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 19 Feb 2026 07:40:41 +0100 Subject: chore: core: WiP transactions API. Signed-off-by: Amlal El Mahrouss --- .gitignore | 4 +++- doc/requirements/IOAble.md | 23 +++++++++++++++++++++++ include/ocl/commit.hpp | 20 ++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 doc/requirements/IOAble.md create mode 100644 include/ocl/commit.hpp diff --git a/.gitignore b/.gitignore index 66c93a7..e7d3cb7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # Prerequisites *.d +*~ + # Compiled Object files *.slo *.lo @@ -51,4 +53,4 @@ build/ # CMake build output */build/ -*.pdf \ No newline at end of file +*.pdf diff --git a/doc/requirements/IOAble.md b/doc/requirements/IOAble.md new file mode 100644 index 0000000..81aaa20 --- /dev/null +++ b/doc/requirements/IOAble.md @@ -0,0 +1,23 @@ +# IOAble (Container must be IO oriented) + +## Abstract: + +- Introduced: OCL v1.7 +- Purpose: Gives a container the methods to communicate with injectors such as transaction, or std::ostream. + +## Example: + +```cpp + struct IORound { + long operator>>(float); + float operaotr<<(long); + long operator*(); // latest IO value (copy-constructable). + }; +``` + +## Sources: + +- https://en.cppreference.com/w/cpp/named_req/CopyConstructible.html + + + diff --git a/include/ocl/commit.hpp b/include/ocl/commit.hpp new file mode 100644 index 0000000..5638aff --- /dev/null +++ b/include/ocl/commit.hpp @@ -0,0 +1,20 @@ +// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// Official repository: https://github.com/ocl-org/core + +#ifndef OCL_CORE_COMMIT +#define OCL_CORE_COMMIT + +#include + +namespace ocl { + + /// @brief Conforms to the IOAble container requirements. + template + class transaction; + + +} + +#endif -- cgit v1.2.3