summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--LICENSE34
-rw-r--r--README.md15
-rw-r--r--dev/examples/allocator_system/allocator_system.cc2
-rw-r--r--dev/examples/cgi/cgi.cc2
-rw-r--r--dev/examples/equiv/equiv.cc2
-rw-r--r--dev/examples/fix/fix.cc2
-rw-r--r--dev/examples/opt/opt.cc6
-rw-r--r--dev/examples/tracked_ptr/tracked_ptr.cc2
-rw-r--r--dev/lib/core/error_handler.hpp2
-rw-r--r--dev/lib/core/includes.hpp2
-rw-r--r--dev/lib/except/error.hpp2
-rw-r--r--dev/lib/fix/fix.hpp2
-rw-r--r--dev/lib/logic/equiv.hpp2
-rw-r--r--dev/lib/logic/math.hpp2
-rw-r--r--dev/lib/logic/opt.hpp2
-rw-r--r--dev/lib/memory/allocator_system.hpp2
-rw-r--r--dev/lib/memory/tracked_ptr.hpp2
-rw-r--r--dev/lib/net/modem.hpp2
-rw-r--r--dev/lib/net/url.hpp2
-rw-r--r--dev/lib/tests/gtest.hpp2
-rw-r--r--dev/lib/tests/hpptest.hpp2
-rw-r--r--dev/lib/utility/cgi_writer.hpp2
-rw-r--r--dev/lib/utility/crc32.hpp2
-rw-r--r--dev/lib/utility/embfs.hpp2
-rw-r--r--dev/tests/chunk_string/chunk_test.cc2
-rw-r--r--dev/tests/fix_basic/fix_test.cc2
-rw-r--r--dev/tests/network_basic/net_test.cc2
-rw-r--r--dev/tests/tracked_ptr_basic/tracked_ptr_test.cc2
-rw-r--r--dev/tests/tracked_ptr_leak/tracked_ptr_test.cc2
-rwxr-xr-xtools/hpptest.py10
30 files changed, 70 insertions, 47 deletions
diff --git a/LICENSE b/LICENSE
index 7516e18..127a5bc 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,21 +1,23 @@
-MIT License
+Boost Software License - Version 1.0 - August 17th, 2003
-Copyright (c) 2023-2025 Amlal El Mahrouss
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE. \ No newline at end of file
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/README.md b/README.md
index 5ac9d54..fe52987 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,19 @@ A C++ library with additional modules for your C++ SDLC.
- Clang (https://clang.llvm.org/)
- Git (https://git-scm.com/)
+## Structure:
+
+- `core`: Core utilities and fundamental abstractions used across OCL.
+- `except`: Exception classes and error-handling helpers.
+- `fix`: FIX protocol utilities and helpers for Financial Information eXchange integration.
+- `io`: Input/output utilities, stream helpers, and file handling.
+- `log`: Logging facilities, macros, and helpers for diagnostics.
+- `memory`: Memory management utilities, allocators, and smart-pointer helpers.
+- `net`: Networking utilities and lightweight socket helpers.
+- `simd`: SIMD-optimized algorithms and low-level performance helpers.
+- `tests`: Unit and integration tests that validate OCL components.
+- `utility`: General-purpose helper functions and small algorithms.
+
## Examples:
### Logic Module (Option container)
@@ -29,4 +42,4 @@ int main(int argc, char** argv)
}
```
-##### (c) 2025 Amlal El Mahrouss, licensed under the MIT license.
+##### (c) 2025 Amlal El Mahrouss, licensed under the Boost Software License.
diff --git a/dev/examples/allocator_system/allocator_system.cc b/dev/examples/allocator_system/allocator_system.cc
index 6e7bc6d..6bf1de7 100644
--- a/dev/examples/allocator_system/allocator_system.cc
+++ b/dev/examples/allocator_system/allocator_system.cc
@@ -2,7 +2,7 @@
* File: allocator_system.cc
* Purpose: Allocator System container.
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss. Licensed under the BSL 1.0 license
+ * Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License. Licensed under the BSL 1.0 license
*/
#include <lib/memory/allocator_system.hpp>
diff --git a/dev/examples/cgi/cgi.cc b/dev/examples/cgi/cgi.cc
index 692f90c..3e08aad 100644
--- a/dev/examples/cgi/cgi.cc
+++ b/dev/examples/cgi/cgi.cc
@@ -1,7 +1,7 @@
/*
cgi example
written by Amlal El Mahrouss.
- licensed under the MIT license
+ licensed under the Boost Software License
*/
#include <lib/utility/cgi_writer.hpp>
diff --git a/dev/examples/equiv/equiv.cc b/dev/examples/equiv/equiv.cc
index 12207f4..41128a2 100644
--- a/dev/examples/equiv/equiv.cc
+++ b/dev/examples/equiv/equiv.cc
@@ -1,7 +1,7 @@
/*
string checksum example
written by Amlal El Mahrouss.
- licensed under the MIT license
+ licensed under the Boost Software License
*/
#include <lib/logic/equiv.hpp>
diff --git a/dev/examples/fix/fix.cc b/dev/examples/fix/fix.cc
index 4015a67..e09178b 100644
--- a/dev/examples/fix/fix.cc
+++ b/dev/examples/fix/fix.cc
@@ -1,7 +1,7 @@
/*
fix example
written by Amlal El Mahrouss.
- licensed under the MIT license
+ licensed under the Boost Software License
*/
#include <lib/core/error_handler.hpp>
diff --git a/dev/examples/opt/opt.cc b/dev/examples/opt/opt.cc
index b34f2c7..acd59fd 100644
--- a/dev/examples/opt/opt.cc
+++ b/dev/examples/opt/opt.cc
@@ -1,7 +1,7 @@
/*
- string checksum example
- written by Amlal El Mahrouss.
- licensed under the MIT license
+ String checksum example
+ Written by Amlal El Mahrouss.
+ Licensed under the Boost Software License
*/
#include <lib/logic/opt.hpp>
diff --git a/dev/examples/tracked_ptr/tracked_ptr.cc b/dev/examples/tracked_ptr/tracked_ptr.cc
index 6e3f4a2..27d942c 100644
--- a/dev/examples/tracked_ptr/tracked_ptr.cc
+++ b/dev/examples/tracked_ptr/tracked_ptr.cc
@@ -1,7 +1,7 @@
/*
tracked_ptr example
written by Amlal El Mahrouss.
- licensed under the MIT license
+ licensed under the Boost Software License
*/
#include <lib/memory/tracked_ptr.hpp>
diff --git a/dev/lib/core/error_handler.hpp b/dev/lib/core/error_handler.hpp
index 4234721..832f109 100644
--- a/dev/lib/core/error_handler.hpp
+++ b/dev/lib/core/error_handler.hpp
@@ -2,7 +2,7 @@
* File: core/basic_error_handler.hpp
* Purpose: Error handler container.
* Author: Amlal El Mahrouss (amlal@nekernel.org)
-* Copyright 2025, Amlal El Mahrouss.
+* Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License.
*/
#ifndef _OCL_ERROR_HANDLER_HPP
diff --git a/dev/lib/core/includes.hpp b/dev/lib/core/includes.hpp
index 78eccd3..a1c6e86 100644
--- a/dev/lib/core/includes.hpp
+++ b/dev/lib/core/includes.hpp
@@ -2,7 +2,7 @@
* File: core/includes.hpp
* Purpose: Core includes for the OCL library.
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#pragma once
diff --git a/dev/lib/except/error.hpp b/dev/lib/except/error.hpp
index 73e0074..b00a32b 100644
--- a/dev/lib/except/error.hpp
+++ b/dev/lib/except/error.hpp
@@ -1,7 +1,7 @@
/*
* File: opt.hpp
* Author: Amlal El Mahrouss,
- * Copyright 2023-2025, Amlal El Mahrouss
+ * Copyright 2023-2025, Amlal El Mahrouss, Licensed under the Boost Software License
*/
#ifndef _OCL_ERR_HPP
diff --git a/dev/lib/fix/fix.hpp b/dev/lib/fix/fix.hpp
index d8a3e89..6f02fa1 100644
--- a/dev/lib/fix/fix.hpp
+++ b/dev/lib/fix/fix.hpp
@@ -2,7 +2,7 @@
* File: fix/fix.hpp
* Purpose: Financial Information Exchange parser in C++
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#ifndef _OCL_FIX_PARSER_HPP
diff --git a/dev/lib/logic/equiv.hpp b/dev/lib/logic/equiv.hpp
index c743e0b..1d16958 100644
--- a/dev/lib/logic/equiv.hpp
+++ b/dev/lib/logic/equiv.hpp
@@ -2,7 +2,7 @@
* File: equiv.hpp
* Purpose: Equivalence runtime c++ header.
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#pragma once
diff --git a/dev/lib/logic/math.hpp b/dev/lib/logic/math.hpp
index e796eae..ce73aa6 100644
--- a/dev/lib/logic/math.hpp
+++ b/dev/lib/logic/math.hpp
@@ -2,7 +2,7 @@
* File: math.hpp
* Purpose: Mathematics c++ header.
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss.
+ * Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License.
*/
#pragma once
diff --git a/dev/lib/logic/opt.hpp b/dev/lib/logic/opt.hpp
index 1b2211b..19f02df 100644
--- a/dev/lib/logic/opt.hpp
+++ b/dev/lib/logic/opt.hpp
@@ -1,7 +1,7 @@
/*
* File: opt.hpp
* Author: Amlal El Mahrouss,
- * Copyright 2023-2025, Amlal El Mahrouss
+ * Copyright 2023-2025, Amlal El Mahrouss, Licensed under the Boost Software License
*/
#ifndef _OCL_OPT_HPP
diff --git a/dev/lib/memory/allocator_system.hpp b/dev/lib/memory/allocator_system.hpp
index 81cd34f..0fe7af3 100644
--- a/dev/lib/memory/allocator_system.hpp
+++ b/dev/lib/memory/allocator_system.hpp
@@ -2,7 +2,7 @@
* File: core/allocator_system.hpp
* Purpose: Allocator System container.
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss. Licensed under the BSL 1.0 license
+ * Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License. Licensed under the BSL 1.0 license
*/
#ifndef _OCL_ALLOCATOR_SYSTEM_HPP
diff --git a/dev/lib/memory/tracked_ptr.hpp b/dev/lib/memory/tracked_ptr.hpp
index bf557d8..0ea0e32 100644
--- a/dev/lib/memory/tracked_ptr.hpp
+++ b/dev/lib/memory/tracked_ptr.hpp
@@ -2,7 +2,7 @@
* File: memory/tracked_ptr.hpp
* Purpose: Custom smart pointer implementation in C++
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#pragma once
diff --git a/dev/lib/net/modem.hpp b/dev/lib/net/modem.hpp
index 5bcf3fd..a498f2e 100644
--- a/dev/lib/net/modem.hpp
+++ b/dev/lib/net/modem.hpp
@@ -2,7 +2,7 @@
* File: net/modem.hpp
* Purpose: Modem concept in modern C++
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#ifndef _OCL_NET_NETWORK_HPP
diff --git a/dev/lib/net/url.hpp b/dev/lib/net/url.hpp
index e5f6803..4bbc271 100644
--- a/dev/lib/net/url.hpp
+++ b/dev/lib/net/url.hpp
@@ -2,7 +2,7 @@
* File: net/url.hpp
* Purpose: URL container in modern C++
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#pragma once
diff --git a/dev/lib/tests/gtest.hpp b/dev/lib/tests/gtest.hpp
index b2e53c9..ee328b0 100644
--- a/dev/lib/tests/gtest.hpp
+++ b/dev/lib/tests/gtest.hpp
@@ -2,7 +2,7 @@
* File: tests/gtest.hpp
* Purpose: Google Test wrapper for the OCL library.
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#pragma once
diff --git a/dev/lib/tests/hpptest.hpp b/dev/lib/tests/hpptest.hpp
index e32ac85..05f985a 100644
--- a/dev/lib/tests/hpptest.hpp
+++ b/dev/lib/tests/hpptest.hpp
@@ -2,7 +2,7 @@
* File: tests/hpptest.hpp
* Purpose: HPP Test wrapper for the OCL library.
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#pragma once
diff --git a/dev/lib/utility/cgi_writer.hpp b/dev/lib/utility/cgi_writer.hpp
index 6f59fa5..7b95b2e 100644
--- a/dev/lib/utility/cgi_writer.hpp
+++ b/dev/lib/utility/cgi_writer.hpp
@@ -1,7 +1,7 @@
/*
* File: cgi_writer.hpp
* Author: Amlal El Mahrouss,
- * Copyright 2023-2025, Amlal El Mahrouss.
+ * Copyright 2023-2025, Amlal El Mahrouss, Licensed under the Boost Software License.
*/
#ifndef _OCL_CGI_WRITER_HPP
diff --git a/dev/lib/utility/crc32.hpp b/dev/lib/utility/crc32.hpp
index ea09b94..2bcab29 100644
--- a/dev/lib/utility/crc32.hpp
+++ b/dev/lib/utility/crc32.hpp
@@ -2,7 +2,7 @@
* File: crc32.hpp
* Purpose: CRC32 module.
* Author: Amlal El Mahrouss,
- * Copyright 2025, Amlal El Mahrouss.
+ * Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License.
*/
#ifndef _OCL_CRC32_HPP
diff --git a/dev/lib/utility/embfs.hpp b/dev/lib/utility/embfs.hpp
index 6da8874..e2e5d18 100644
--- a/dev/lib/utility/embfs.hpp
+++ b/dev/lib/utility/embfs.hpp
@@ -2,7 +2,7 @@
* File: embfs.hpp
* Purpose: Embedded File System.
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss.
+ * Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License.
*/
#ifndef _OCL_EMBFS_HPP
diff --git a/dev/tests/chunk_string/chunk_test.cc b/dev/tests/chunk_string/chunk_test.cc
index 0cef647..3498fa8 100644
--- a/dev/tests/chunk_string/chunk_test.cc
+++ b/dev/tests/chunk_string/chunk_test.cc
@@ -2,7 +2,7 @@
* File: tests/chunk_test.cc
* Purpose: Chunk unit tests in C++
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#include <lib/io/print.hpp>
diff --git a/dev/tests/fix_basic/fix_test.cc b/dev/tests/fix_basic/fix_test.cc
index 413dd57..058831b 100644
--- a/dev/tests/fix_basic/fix_test.cc
+++ b/dev/tests/fix_basic/fix_test.cc
@@ -2,7 +2,7 @@
* File: tests/tracked_ptr_test.cc
* Purpose: Custom smart pointer unit tests in C++
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#include <lib/fix/fix.hpp>
diff --git a/dev/tests/network_basic/net_test.cc b/dev/tests/network_basic/net_test.cc
index 65da7fd..a40ca5d 100644
--- a/dev/tests/network_basic/net_test.cc
+++ b/dev/tests/network_basic/net_test.cc
@@ -2,7 +2,7 @@
* File: tests/net_test.cc
* Purpose: Network unit tests in C++
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#include <lib/net/modem.hpp>
diff --git a/dev/tests/tracked_ptr_basic/tracked_ptr_test.cc b/dev/tests/tracked_ptr_basic/tracked_ptr_test.cc
index 61d4f7d..aa862fd 100644
--- a/dev/tests/tracked_ptr_basic/tracked_ptr_test.cc
+++ b/dev/tests/tracked_ptr_basic/tracked_ptr_test.cc
@@ -2,7 +2,7 @@
* File: tests/tracked_ptr_test.cc
* Purpose: Custom smart pointer unit tests in C++
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#include <lib/memory/tracked_ptr.hpp>
diff --git a/dev/tests/tracked_ptr_leak/tracked_ptr_test.cc b/dev/tests/tracked_ptr_leak/tracked_ptr_test.cc
index fb21c34..08c17a1 100644
--- a/dev/tests/tracked_ptr_leak/tracked_ptr_test.cc
+++ b/dev/tests/tracked_ptr_leak/tracked_ptr_test.cc
@@ -2,7 +2,7 @@
* File: tests/tracked_ptr_test.cc
* Purpose: Custom smart pointer unit tests in C++
* Author: Amlal El Mahrouss (amlal@nekernel.org)
- * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license.
+ * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#include <lib/memory/tracked_ptr.hpp>
diff --git a/tools/hpptest.py b/tools/hpptest.py
index 218255d..08c5719 100755
--- a/tools/hpptest.py
+++ b/tools/hpptest.py
@@ -1,11 +1,19 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
+# HPPTEST: Header-only C++ library test runner.
+# Written by Amlal El Mahrouss.
+# Licensed under the Boost Software License
+
import sys, os
+COMPILER="clang++"
+INCLUDE_DIR="./dev/"
+CXX_STD="c++20"
+
if __name__ == '__main__':
if len(sys.argv) == 3:
- ret = os.system(f"clang++ -I./dev/ -I{sys.argv[2]} -std=c++20 -DOCL_HPPTEST '-DOCL_HPPTEST_ASSERT(x)=static_assert(x, #x)' {sys.argv[1]}")
+ ret = os.system(f"{COMPILER} -I{INCLUDE_DIR} -I{sys.argv[2]} -std={CXX_STD} -DOCL_HPPTEST '-DOCL_HPPTEST_ASSERT(x)=static_assert(x, #x)' {sys.argv[1]}")
if ret == 0:
print("[HPPTEST] HPPTEST PASSES.")