diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-02-19 07:40:41 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-02-19 07:40:41 +0100 |
| commit | aaa2c9eeff7540776e7056b1015e58a61bea97af (patch) | |
| tree | 03af7f813443d4aa6ca0cc3375bf5bee7e4a1586 | |
| parent | 2d00cd7e2c5463a43ae43fcdd6eb3503aa3a7a4a (diff) | |
chore: core: WiP transactions API.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | .gitignore | 4 | ||||
| -rw-r--r-- | doc/requirements/IOAble.md | 23 | ||||
| -rw-r--r-- | include/ocl/commit.hpp | 20 |
3 files changed, 46 insertions, 1 deletions
@@ -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<IOAble>, or std::ostream<IOAble>. + +## 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 <ocl/detail/config.hpp> + +namespace ocl { + + /// @brief Conforms to the IOAble container requirements. + template <class IOAble> + class transaction; + + +} + +#endif |
