summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Doxyfile6
-rw-r--r--MailMap2
-rw-r--r--README.md8
-rw-r--r--dev/examples/cgi/cgi.cc4
-rw-r--r--dev/examples/equiv/equiv.cc6
-rw-r--r--dev/examples/fix/fix.cc6
-rw-r--r--dev/examples/opt/opt.cc4
-rw-r--r--dev/examples/tracked_ptr/tracked_ptr.cc8
-rw-r--r--dev/lib/core/includes.hpp4
-rw-r--r--dev/lib/except/error.hpp12
-rw-r--r--dev/lib/fix/parser.hpp14
-rw-r--r--dev/lib/io/print.hpp16
-rw-r--r--dev/lib/logic/equiv.hpp8
-rw-r--r--dev/lib/logic/math.hpp6
-rw-r--r--dev/lib/logic/opt.hpp12
-rw-r--r--dev/lib/memory/tracked_ptr.hpp8
-rw-r--r--dev/lib/net/modem.hpp16
-rw-r--r--dev/lib/net/url.hpp10
-rw-r--r--dev/lib/tests/gtest.hpp4
-rw-r--r--dev/lib/tests/hpptest.hpp12
-rw-r--r--dev/lib/utility/cgi_writer.hpp26
-rw-r--r--dev/lib/utility/chunk_string.hpp16
-rw-r--r--dev/lib/utility/crc32.hpp12
-rw-r--r--dev/lib/utility/embfs.hpp14
-rw-r--r--dev/tests/chunk_string/chunk_test.cc6
-rw-r--r--dev/tests/fix_basic/fix_test.cc10
-rw-r--r--dev/tests/network_basic/net_test.cc8
-rw-r--r--dev/tests/tracked_ptr_basic/tracked_ptr_test.cc12
-rw-r--r--dev/tests/tracked_ptr_leak/tracked_ptr_test.cc14
-rw-r--r--meta/tex/embfs.tex6
-rwxr-xr-xtools/hpptest.py2
31 files changed, 146 insertions, 146 deletions
diff --git a/Doxyfile b/Doxyfile
index 9534c89..efda577 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -42,7 +42,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = "SNU Open C++ Library"
+PROJECT_NAME = "Open C++ Library"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
@@ -74,7 +74,7 @@ PROJECT_ICON =
# entered, it will be relative to the location where Doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY = /Volumes/Projects/src/snu-lib/docs
+OUTPUT_DIRECTORY = ./ocl/docs
# If the CREATE_SUBDIRS tag is set to YES then Doxygen will create up to 4096
# sub-directories (in 2 levels) under the output directory of each output format
@@ -991,7 +991,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = /Volumes/Projects/src/snu-lib
+INPUT = /Volumes/Projects/src/ocl
# This tag can be used to specify the character encoding of the source files
# that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses
diff --git a/MailMap b/MailMap
index 426870d..e927bf1 100644
--- a/MailMap
+++ b/MailMap
@@ -1 +1 @@
-@amlel-el-mahrouss - founder@snu.systems - Library Author and Chief Architect
+@amlel-el-mahrouss - amlal@nekernel.org - Library Author and Chief Architect
diff --git a/README.md b/README.md
index c7bf8c4..b7790c3 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# SNU Open C++ Library
+# Open C++ Library
[![License: GPL-2.0](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
@@ -21,12 +21,12 @@ A C++ library with additional modules for your C++ SDLC.
int main(int argc, char** argv)
{
- auto opt = snu::opt(snu::eval_eq(50, 50)).expect("snu::eval_eq, does not match!");
- opt = snu::opt(snu::eval_eq(50, 40));
+ auto opt = ocl::opt(ocl::eval_eq(50, 50)).expect("ocl::eval_eq, does not match!");
+ opt = ocl::opt(ocl::eval_eq(50, 40));
opt.expect("this time it doesn't.");
return EXIT_SUCCESS;
}
```
-##### (c) 2025 SNU Systems, Corp.
+##### (c) 2025 Amlal El Mahrouss, licensed under the MIT license.
diff --git a/dev/examples/cgi/cgi.cc b/dev/examples/cgi/cgi.cc
index 7d8353a..e594c4b 100644
--- a/dev/examples/cgi/cgi.cc
+++ b/dev/examples/cgi/cgi.cc
@@ -6,7 +6,7 @@
#include <lib/utility/cgi_writer.hpp>
-static snu::basic_chunk_string<char> text_sample = R"(
+static ocl::basic_chunk_string<char> text_sample = R"(
<!DOCTYPE html>
<html>
<head>
@@ -68,7 +68,7 @@ static snu::basic_chunk_string<char> text_sample = R"(
/* @brief this stub loads a 'index.html' or returns an error message if not found. */
int main(int argc, char** argv)
{
- snu::cgi::basic_writer<> writer;
+ ocl::cgi::basic_writer<> writer;
writer << text_sample;
return 0;
diff --git a/dev/examples/equiv/equiv.cc b/dev/examples/equiv/equiv.cc
index 896637d..12207f4 100644
--- a/dev/examples/equiv/equiv.cc
+++ b/dev/examples/equiv/equiv.cc
@@ -11,9 +11,9 @@
int main(int argc, char** argv)
{
std::cout << std::boolalpha;
- std::cout << snu::equiv::is_same<bool, int>::value << std::endl;
- std::cout << snu::equiv::is_same<bool, bool>::value << std::endl;
- std::cout << snu::equiv::is_same<int, int>::value << std::endl;
+ std::cout << ocl::equiv::is_same<bool, int>::value << std::endl;
+ std::cout << ocl::equiv::is_same<bool, bool>::value << std::endl;
+ std::cout << ocl::equiv::is_same<int, int>::value << std::endl;
return 0;
}
diff --git a/dev/examples/fix/fix.cc b/dev/examples/fix/fix.cc
index 8730cad..e3d669b 100644
--- a/dev/examples/fix/fix.cc
+++ b/dev/examples/fix/fix.cc
@@ -15,14 +15,14 @@ int main(int argc, char** argv)
{
constexpr auto default_fix = "8=FIX.4.2|9=65|35=A|49=SERVER|56=CLIENT|34=177|52=20090107-18:15:16|98=0|108=30|10=062|";
- snu::fix::basic_visitor<char> basic_visitor;
- snu::fix::basic_range_data<char> fix = basic_visitor.visit(default_fix);
+ ocl::fix::basic_visitor<char> basic_visitor;
+ ocl::fix::basic_range_data<char> fix = basic_visitor.visit(default_fix);
std::cout << "magic=" << fix.magic_ << std::endl;
std::cout << "magic_len=" << fix.magic_len_ << std::endl;
std::cout << "is_valid=" << std::boolalpha << fix.is_valid() << std::endl;
- snu::fix::must_pass(fix);
+ ocl::fix::must_pass(fix);
for (auto fields : fix.body_)
{
diff --git a/dev/examples/opt/opt.cc b/dev/examples/opt/opt.cc
index c1c2745..b34f2c7 100644
--- a/dev/examples/opt/opt.cc
+++ b/dev/examples/opt/opt.cc
@@ -26,7 +26,7 @@ static auto do_some(const std::string recv_data, const std::string check_data)
const int hash_to_check = do_hash(check_data); /* here we assume this should match opt_hash */
const int opt_hash = do_hash(recv_data); /* we assume that the hash is correct */
- auto opt = snu::opt(snu::eval_eq(hash_to_check, opt_hash)); /* do the compute */
+ auto opt = ocl::opt(ocl::eval_eq(hash_to_check, opt_hash)); /* do the compute */
return opt;
}
@@ -35,7 +35,7 @@ int main(int argc, char** argv)
{
// ... let's assume we fetch data from network...
- snu::io::println("Testing data...");
+ ocl::io::println("Testing data...");
auto opt = do_some("Ohio", "Ohio");
opt.expect("Checksum failed, Ohio isn't Ohio!");
diff --git a/dev/examples/tracked_ptr/tracked_ptr.cc b/dev/examples/tracked_ptr/tracked_ptr.cc
index 6d37691..5b70afd 100644
--- a/dev/examples/tracked_ptr/tracked_ptr.cc
+++ b/dev/examples/tracked_ptr/tracked_ptr.cc
@@ -9,13 +9,13 @@
static void summon_tracked_ptr()
{
- snu::memory::tracked_ptr<int> ptr = snu::memory::make_tracked(42);
+ ocl::memory::tracked_ptr<int> ptr = ocl::memory::make_tracked(42);
std::cout << ptr.data() << "=" << ptr.manager().allocator().allocated_count_ << std::endl;
}
static void summon_leak_tracked_ptr()
{
- snu::memory::tracked_ptr<int>* ptr = new snu::memory::tracked_ptr<int>(42);
+ ocl::memory::tracked_ptr<int>* ptr = new ocl::memory::tracked_ptr<int>(42);
std::cout << ptr->data() << "=" << ptr->manager().allocator().allocated_count_ << std::endl;
}
@@ -27,7 +27,7 @@ int main(int argc, char** argv)
summon_tracked_ptr();
summon_tracked_ptr();
- snu::memory::tracked_ptr<int> ptr;
+ ocl::memory::tracked_ptr<int> ptr;
std::cout << ptr.data() << "=" << ptr.manager().allocator().allocated_count_ << std::endl;
@@ -46,7 +46,7 @@ int main(int argc, char** argv)
std::cout << "total=" << ptr.manager().allocator().deallocated_count_ << std::endl;
std::cout << "leak-detected=" << std::boolalpha << (ptr.manager().allocator().allocated_count_ > ptr.manager().allocator().deallocated_count_) << std::endl;
- snu::memory::must_pass(ptr);
+ ocl::memory::must_pass(ptr);
return EXIT_SUCCESS;
}
diff --git a/dev/lib/core/includes.hpp b/dev/lib/core/includes.hpp
index 3238342..9feff2a 100644
--- a/dev/lib/core/includes.hpp
+++ b/dev/lib/core/includes.hpp
@@ -1,8 +1,8 @@
/*
* File: core/includes.hpp
* Purpose: Core includes for the SOCL library.
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
#pragma once
diff --git a/dev/lib/except/error.hpp b/dev/lib/except/error.hpp
index 862dc3e..16bf5eb 100644
--- a/dev/lib/except/error.hpp
+++ b/dev/lib/except/error.hpp
@@ -1,20 +1,20 @@
/*
* File: opt.hpp
* Author: Amlal El Mahrouss,
- * Copyright 2023-2025, Amlal El Mahrouss/SNU Systems Corp.
+ * Copyright 2023-2025, Amlal El Mahrouss
*/
-#ifndef _SNU_ERR_HPP
-#define _SNU_ERR_HPP
+#ifndef _OCL_ERR_HPP
+#define _OCL_ERR_HPP
#include <stdexcept>
-namespace snu
+namespace ocl
{
using runtime_error = std::runtime_error;
using fix_error = runtime_error;
using math_error = runtime_error;
using cgi_error = runtime_error;
-} // namespace snu
+} // namespace ocl
-#endif // _SNU_ERR_HPP \ No newline at end of file
+#endif // _OCL_ERR_HPP \ No newline at end of file
diff --git a/dev/lib/fix/parser.hpp b/dev/lib/fix/parser.hpp
index ad6870a..a93b846 100644
--- a/dev/lib/fix/parser.hpp
+++ b/dev/lib/fix/parser.hpp
@@ -1,12 +1,12 @@
/*
* File: fix/parser.hpp
* Purpose: Financial Information Exchange parser in C++
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
-#ifndef _SNU_FIX_PARSER_HPP
-#define _SNU_FIX_PARSER_HPP
+#ifndef _OCL_FIX_PARSER_HPP
+#define _OCL_FIX_PARSER_HPP
#include <cstddef>
#include <cassert>
@@ -18,7 +18,7 @@
#include <unistd.h>
#include <signal.h>
-namespace snu::fix
+namespace ocl::fix
{
template <typename char_type>
class basic_visitor;
@@ -211,6 +211,6 @@ namespace snu::fix
}
using fix_tag_type = std::uint32_t;
-} // namespace snu::fix
+} // namespace ocl::fix
-#endif // ifndef _SNU_FIX_PARSER_HPP
+#endif // ifndef _OCL_FIX_PARSER_HPP
diff --git a/dev/lib/io/print.hpp b/dev/lib/io/print.hpp
index 840b373..4b32ddb 100644
--- a/dev/lib/io/print.hpp
+++ b/dev/lib/io/print.hpp
@@ -1,17 +1,17 @@
/*
* File: print.hpp
- * Purpose: SNU Print library
- * Author: Amlal El Mahrouss. (founder@snu.systems)
- * Copyright 2025, SNU Systems Corp.
+ * Purpose: OCL Print library
+ * Author: Amlal El Mahrouss. (amlal@nekernel.org)
+ * Copyright 2025
*/
-#ifndef _SNU_PRINT_HPP
-#define _SNU_PRINT_HPP
+#ifndef _OCL_PRINT_HPP
+#define _OCL_PRINT_HPP
#include <iostream>
#include <ostream>
-namespace snu::io
+namespace ocl::io
{
template <typename T, typename... Args>
inline void print(T fmt, Args... other) noexcept
@@ -36,6 +36,6 @@ namespace snu::io
{
print(fmt...);
}
-} // namespace snu::io
+} // namespace ocl::io
-#endif // ifndef _SNU_PRINT_HPP
+#endif // ifndef _OCL_PRINT_HPP
diff --git a/dev/lib/logic/equiv.hpp b/dev/lib/logic/equiv.hpp
index 75fd8ee..c2d12dd 100644
--- a/dev/lib/logic/equiv.hpp
+++ b/dev/lib/logic/equiv.hpp
@@ -1,14 +1,14 @@
/*
* File: equiv.hpp
* Purpose: Equivalence runtime c++ header.
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
#pragma once
/// @brief SOCL equivalence namespace.
-namespace snu::equiv
+namespace ocl::equiv
{
template <typename T>
struct basic_hash_trait
@@ -101,4 +101,4 @@ namespace snu::equiv
return left_ / right_ == 1;
}
};
-} // namespace snu::equiv
+} // namespace ocl::equiv
diff --git a/dev/lib/logic/math.hpp b/dev/lib/logic/math.hpp
index 155251b..e796eae 100644
--- a/dev/lib/logic/math.hpp
+++ b/dev/lib/logic/math.hpp
@@ -1,7 +1,7 @@
/*
* File: math.hpp
* Purpose: Mathematics c++ header.
- * Author: Amlal El Mahrouss (founder@snu.systems)
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
* Copyright 2025, Amlal El Mahrouss.
*/
@@ -9,7 +9,7 @@
#include <cmath>
-namespace snu
+namespace ocl
{
template <std::size_t T>
struct is_non_boolean_integer final
@@ -32,4 +32,4 @@ namespace snu
constexpr inline auto not_a_number = NAN;
constexpr inline auto positive_infinity = INFINITY;
constexpr inline auto negative_infinity = -positive_infinity;
-} // namespace snu \ No newline at end of file
+} // namespace ocl \ No newline at end of file
diff --git a/dev/lib/logic/opt.hpp b/dev/lib/logic/opt.hpp
index a8e66b4..442756c 100644
--- a/dev/lib/logic/opt.hpp
+++ b/dev/lib/logic/opt.hpp
@@ -1,16 +1,16 @@
/*
* File: opt.hpp
* Author: Amlal El Mahrouss,
- * Copyright 2023-2025, Amlal El Mahrouss/SNU Systems Corp.
+ * Copyright 2023-2025, Amlal El Mahrouss
*/
-#ifndef _SNU_OPT_HPP
-#define _SNU_OPT_HPP
+#ifndef _OCL_OPT_HPP
+#define _OCL_OPT_HPP
#include <lib/except/error.hpp>
#include <utility>
-namespace snu
+namespace ocl
{
enum class return_type
{
@@ -116,6 +116,6 @@ namespace snu
{
return return_type::err;
}
-} // namespace snu
+} // namespace ocl
-#endif /* ifndef _SNU_OPT_HPP */
+#endif /* ifndef _OCL_OPT_HPP */
diff --git a/dev/lib/memory/tracked_ptr.hpp b/dev/lib/memory/tracked_ptr.hpp
index 7030f40..d2f8450 100644
--- a/dev/lib/memory/tracked_ptr.hpp
+++ b/dev/lib/memory/tracked_ptr.hpp
@@ -1,8 +1,8 @@
/*
* File: memory/tracked_ptr.hpp
* Purpose: Custom smart pointer implementation in C++
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
#pragma once
@@ -16,7 +16,7 @@
#include <unistd.h>
#include <signal.h>
-namespace snu::memory
+namespace ocl::memory
{
template <typename T>
class tracked_allocator;
@@ -232,4 +232,4 @@ namespace snu::memory
::kill(::getpid(), SIGTRAP);
}
}
-} // namespace snu::memory
+} // namespace ocl::memory
diff --git a/dev/lib/net/modem.hpp b/dev/lib/net/modem.hpp
index f6796be..e350f91 100644
--- a/dev/lib/net/modem.hpp
+++ b/dev/lib/net/modem.hpp
@@ -1,12 +1,12 @@
/*
* File: net/modem.hpp
* Purpose: Modem concept in modern C++
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
-#ifndef _SNU_NET_NETWORK_HPP
-#define _SNU_NET_NETWORK_HPP
+#ifndef _OCL_NET_NETWORK_HPP
+#define _OCL_NET_NETWORK_HPP
#include <unistd.h>
#include <arpa/inet.h>
@@ -15,9 +15,9 @@
#include <utility>
#include <cstddef>
-#define SNU_MODEM_INTERFACE : protected snu::net::basic_modem
+#define OCL_MODEM_INTERFACE : protected ocl::net::basic_modem
-namespace snu::net
+namespace ocl::net
{
template <typename char_type>
class basic_modem;
@@ -139,6 +139,6 @@ namespace snu::net
return true;
}
};
-} // namespace snu::net
+} // namespace ocl::net
-#endif // ifndef _SNU_NET_NETWORK_HPP
+#endif // ifndef _OCL_NET_NETWORK_HPP
diff --git a/dev/lib/net/url.hpp b/dev/lib/net/url.hpp
index f6dba95..ff6aebe 100644
--- a/dev/lib/net/url.hpp
+++ b/dev/lib/net/url.hpp
@@ -1,8 +1,8 @@
/*
* File: net/url.hpp
* Purpose: URL container in modern C++
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
#pragma once
@@ -11,9 +11,9 @@
#include <iostream>
#include <sstream>
-/// @author Amlal El Mahrouss (founder@snu.systems)
+/// @author Amlal El Mahrouss (amlal@nekernel.org)
-namespace snu::net
+namespace ocl::net
{
template <typename char_type>
class basic_url;
@@ -61,4 +61,4 @@ namespace snu::net
return ss_.size() > 0;
}
};
-} // namespace snu::net
+} // namespace ocl::net
diff --git a/dev/lib/tests/gtest.hpp b/dev/lib/tests/gtest.hpp
index 14474c0..126ce90 100644
--- a/dev/lib/tests/gtest.hpp
+++ b/dev/lib/tests/gtest.hpp
@@ -1,8 +1,8 @@
/*
* File: tests/gtest.hpp
* Purpose: Google Test wrapper for the SOCL library.
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
#include <gtest/gtest.h>
diff --git a/dev/lib/tests/hpptest.hpp b/dev/lib/tests/hpptest.hpp
index 0d6ed39..085275f 100644
--- a/dev/lib/tests/hpptest.hpp
+++ b/dev/lib/tests/hpptest.hpp
@@ -1,21 +1,21 @@
/*
* File: tests/hpptest.hpp
* Purpose: HPP Test wrapper for the SOCL library.
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
#pragma once
-#ifdef SOCL_HPPTEST
-namespace snu::hpptest
+#ifdef OCL_HPPTEST
+namespace ocl::hpptest
{
typedef bool condition_type;
template <condition_type expr = true>
consteval inline void must_pass()
{
- SOCL_HPPTEST_ASSERT(expr);
+ OCL_HPPTEST_ASSERT(expr);
}
-} // namespace snu::hpptest
+} // namespace ocl::hpptest
#endif
diff --git a/dev/lib/utility/cgi_writer.hpp b/dev/lib/utility/cgi_writer.hpp
index 70b32cf..12de9ec 100644
--- a/dev/lib/utility/cgi_writer.hpp
+++ b/dev/lib/utility/cgi_writer.hpp
@@ -4,15 +4,15 @@
* Copyright 2023-2025, Amlal El Mahrouss.
*/
-#ifndef _SNU_CGI_WRITER_HPP
-#define _SNU_CGI_WRITER_HPP
+#ifndef _OCL_CGI_WRITER_HPP
+#define _OCL_CGI_WRITER_HPP
#include <lib/io/print.hpp>
#include <lib/utility/chunk_string.hpp>
#include <sstream>
#include <format>
-namespace snu
+namespace ocl
{
namespace cgi
{
@@ -21,7 +21,7 @@ namespace snu
class basic_writer
{
private:
- basic_writer& eval_(const snu::basic_chunk_string<char_type>& mime, const snu::basic_chunk_string<char_type>& ss) noexcept
+ basic_writer& eval_(const ocl::basic_chunk_string<char_type>& mime, const ocl::basic_chunk_string<char_type>& ss) noexcept
{
std::basic_stringstream<char_type> ss_out;
@@ -30,7 +30,7 @@ namespace snu
ss_out << std::format("Content-Length: {}\r\n\r\n", ss.str().size());
ss_out << ss.str();
- snu::io::print(ss_out.str());
+ ocl::io::print(ss_out.str());
return *this;
}
@@ -43,37 +43,37 @@ namespace snu
basic_writer(const basic_writer&) = default;
public:
- friend void operator<<(basic_writer& self, const snu::basic_chunk_string<char_type>& ss_in)
+ friend void operator<<(basic_writer& self, const ocl::basic_chunk_string<char_type>& ss_in)
{
self = self.eval_("text/plain", ss_in);
}
- basic_writer& binary(const snu::basic_chunk_string<char_type>& ss_in)
+ basic_writer& binary(const ocl::basic_chunk_string<char_type>& ss_in)
{
return this->eval_("application/octet-stream", ss_in);
}
- basic_writer& html(const snu::basic_chunk_string<char_type>& ss_in)
+ basic_writer& html(const ocl::basic_chunk_string<char_type>& ss_in)
{
return this->eval_("text/html", ss_in);
}
- basic_writer& xml(const snu::basic_chunk_string<char_type>& ss_in)
+ basic_writer& xml(const ocl::basic_chunk_string<char_type>& ss_in)
{
return this->eval_("application/xml", ss_in);
}
- basic_writer& json(const snu::basic_chunk_string<char_type>& ss_in)
+ basic_writer& json(const ocl::basic_chunk_string<char_type>& ss_in)
{
return this->eval_("application/json", ss_in);
}
- basic_writer& js(const snu::basic_chunk_string<char_type>& ss_in)
+ basic_writer& js(const ocl::basic_chunk_string<char_type>& ss_in)
{
return this->eval_("text/javascript", ss_in);
}
};
} // namespace cgi
-} // namespace snu
+} // namespace ocl
-#endif // ifndef _SNU_CGI_WRITER_HPP
+#endif // ifndef _OCL_CGI_WRITER_HPP
diff --git a/dev/lib/utility/chunk_string.hpp b/dev/lib/utility/chunk_string.hpp
index 79e0dd6..79a3881 100644
--- a/dev/lib/utility/chunk_string.hpp
+++ b/dev/lib/utility/chunk_string.hpp
@@ -1,17 +1,17 @@
/*
* File: core/chunk_string.hpp
* Purpose: String implementation for the SOCL C++ library.
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
-#ifndef SOCL_UTILITY_CHUNK_STRING_HPP
-#define SOCL_UTILITY_CHUNK_STRING_HPP
+#ifndef OCL_UTILITY_CHUNK_STRING_HPP
+#define OCL_UTILITY_CHUNK_STRING_HPP
#include <lib/core/includes.hpp>
#include <boost/container/flat_set.hpp>
-namespace snu
+namespace ocl
{
template <typename char_type>
class basic_chunk_string;
@@ -74,7 +74,7 @@ namespace snu
void print() noexcept
{
- snu::io::print(packed_chunks_);
+ ocl::io::print(packed_chunks_);
if (next_chunk_string_)
this->next_chunk_string_->print();
@@ -86,5 +86,5 @@ namespace snu
{
fmt.print();
}
-} // namespace snu
-#endif // ifndef SOCL_UTILITY_CHUNK_STRING_HPP \ No newline at end of file
+} // namespace ocl
+#endif // ifndef OCL_UTILITY_CHUNK_STRING_HPP \ No newline at end of file
diff --git a/dev/lib/utility/crc32.hpp b/dev/lib/utility/crc32.hpp
index f7e5fc9..ea09b94 100644
--- a/dev/lib/utility/crc32.hpp
+++ b/dev/lib/utility/crc32.hpp
@@ -5,17 +5,17 @@
* Copyright 2025, Amlal El Mahrouss.
*/
-#ifndef _SNU_CRC32_HPP
-#define _SNU_CRC32_HPP
+#ifndef _OCL_CRC32_HPP
+#define _OCL_CRC32_HPP
#include <cstdint>
#include <string>
#include <cstddef>
/// @brief Crc32 implementation in C++
-/// @author Amlal EL Mahrouss (founder@snu.systems)
+/// @author Amlal EL Mahrouss (amlal@nekernel.org)
-namespace snu::crc32
+namespace ocl::crc32
{
namespace detail
{
@@ -76,6 +76,6 @@ namespace snu::crc32
{
return detail::crc32(in.c_str(), in.size());
}
-} // namespace snu::crc32
+} // namespace ocl::crc32
-#endif // !_SNU_CRC32_HPP \ No newline at end of file
+#endif // !_OCL_CRC32_HPP \ No newline at end of file
diff --git a/dev/lib/utility/embfs.hpp b/dev/lib/utility/embfs.hpp
index 3acc867..0f20596 100644
--- a/dev/lib/utility/embfs.hpp
+++ b/dev/lib/utility/embfs.hpp
@@ -1,20 +1,20 @@
/*
* File: embfs.hpp
* Purpose: Embedded File System.
- * Author: Amlal El Mahrouss (founder@snu.systems)
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
* Copyright 2025, Amlal El Mahrouss.
*/
-#ifndef _SNU_EMBFS_HPP
-#define _SNU_EMBFS_HPP
+#ifndef _OCL_EMBFS_HPP
+#define _OCL_EMBFS_HPP
#include <cstdint>
#include <cstddef>
/// @brief A filesystem designed for tiny storage medias.
-/// @author Amlal EL Mahrouss (founder@snu.systems)
+/// @author Amlal EL Mahrouss (amlal@nekernel.org)
-namespace snu::embfs
+namespace ocl::embfs
{
namespace traits
{
@@ -75,6 +75,6 @@ namespace snu::embfs
/// @brief Indexed node linear array.
typedef embfs_inode embfs_inode_arr_t[_inode_arr_len];
} // namespace traits
-} // namespace snu::embfs
+} // namespace ocl::embfs
-#endif // ifndef _SNU_EMBFS_HPP \ No newline at end of file
+#endif // ifndef _OCL_EMBFS_HPP \ No newline at end of file
diff --git a/dev/tests/chunk_string/chunk_test.cc b/dev/tests/chunk_string/chunk_test.cc
index 3e1f3db..2929754 100644
--- a/dev/tests/chunk_string/chunk_test.cc
+++ b/dev/tests/chunk_string/chunk_test.cc
@@ -1,8 +1,8 @@
/*
* File: tests/chunk_test.cc
* Purpose: Chunk unit tests in C++
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
#include <lib/io/print.hpp>
@@ -16,7 +16,7 @@ TEST(ChunkTest, BasicChunkUsage)
auto start = std::chrono::high_resolution_clock::now();
- snu::basic_chunk_string<char> optimized;
+ ocl::basic_chunk_string<char> optimized;
for (unsigned i = 0; i < iterations; ++i)
{
diff --git a/dev/tests/fix_basic/fix_test.cc b/dev/tests/fix_basic/fix_test.cc
index bd04d07..bdde392 100644
--- a/dev/tests/fix_basic/fix_test.cc
+++ b/dev/tests/fix_basic/fix_test.cc
@@ -1,8 +1,8 @@
/*
* File: tests/tracked_ptr_test.cc
* Purpose: Custom smart pointer unit tests in C++
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
#include <lib/fix/parser.hpp>
@@ -10,9 +10,9 @@
TEST(FIXTest, BasicFIXUsage)
{
- snu::fix::basic_visitor<char> basic_visitor;
- snu::fix::basic_range_data<char> fix = basic_visitor.visit("8=FIX.4.2|9=65|35=A|49=SERVER|56=CLIENT|34=177|52=20090107-18:15:16|98=0|108=30|10=062|");
+ ocl::fix::basic_visitor<char> basic_visitor;
+ ocl::fix::basic_range_data<char> fix = basic_visitor.visit("8=FIX.4.2|9=65|35=A|49=SERVER|56=CLIENT|34=177|52=20090107-18:15:16|98=0|108=30|10=062|");
- EXPECT_EQ(fix.magic_, snu::fix::detail::begin_fix());
+ EXPECT_EQ(fix.magic_, ocl::fix::detail::begin_fix());
EXPECT_TRUE(fix.is_valid());
} \ No newline at end of file
diff --git a/dev/tests/network_basic/net_test.cc b/dev/tests/network_basic/net_test.cc
index f16fb06..9c90bcd 100644
--- a/dev/tests/network_basic/net_test.cc
+++ b/dev/tests/network_basic/net_test.cc
@@ -1,8 +1,8 @@
/*
* File: tests/net_test.cc
* Purpose: Network unit tests in C++
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
#include <lib/net/modem.hpp>
@@ -12,8 +12,8 @@
TEST(NetworkTest, BasicNetworkUsage)
{
- snu::net::basic_modem<char> modem;
- modem.construct<AF_INET, SOCK_STREAM, 8000>(snu::net::basic_modem<char>::local_address_ip4, true);
+ ocl::net::basic_modem<char> modem;
+ modem.construct<AF_INET, SOCK_STREAM, 8000>(ocl::net::basic_modem<char>::local_address_ip4, true);
EXPECT_TRUE(modem.is_valid());
diff --git a/dev/tests/tracked_ptr_basic/tracked_ptr_test.cc b/dev/tests/tracked_ptr_basic/tracked_ptr_test.cc
index 0e72e77..1e97188 100644
--- a/dev/tests/tracked_ptr_basic/tracked_ptr_test.cc
+++ b/dev/tests/tracked_ptr_basic/tracked_ptr_test.cc
@@ -1,8 +1,8 @@
/*
* File: tests/tracked_ptr_test.cc
* Purpose: Custom smart pointer unit tests in C++
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
#include <lib/memory/tracked_ptr.hpp>
@@ -10,16 +10,16 @@
TEST(TrackedPtrTest, BasicTrackedPtrUsage)
{
- snu::memory::tracked_ptr<int> ptr = snu::memory::make_tracked<int>(42);
+ ocl::memory::tracked_ptr<int> ptr = ocl::memory::make_tracked<int>(42);
ASSERT_TRUE(ptr);
EXPECT_EQ(*ptr, 42);
- snu::memory::tracked_ptr<int> ptr2;
+ ocl::memory::tracked_ptr<int> ptr2;
- snu::memory::swap(ptr, ptr2);
+ ocl::memory::swap(ptr, ptr2);
ptr2.reset();
- EXPECT_EQ(snu::memory::tracked_ptr<int>::manager().allocator().allocated_count_, 1);
+ EXPECT_EQ(ocl::memory::tracked_ptr<int>::manager().allocator().allocated_count_, 1);
} \ No newline at end of file
diff --git a/dev/tests/tracked_ptr_leak/tracked_ptr_test.cc b/dev/tests/tracked_ptr_leak/tracked_ptr_test.cc
index 6818b7c..f349f47 100644
--- a/dev/tests/tracked_ptr_leak/tracked_ptr_test.cc
+++ b/dev/tests/tracked_ptr_leak/tracked_ptr_test.cc
@@ -1,8 +1,8 @@
/*
* File: tests/tracked_ptr_test.cc
* Purpose: Custom smart pointer unit tests in C++
- * Author: Amlal El Mahrouss (founder@snu.systems)
- * Copyright 2025, Amlal El Mahrouss and SNU Systems Corp.
+ * Author: Amlal El Mahrouss (amlal@nekernel.org)
+ * Copyright 2025, Amlal El Mahrouss
*/
#include <lib/memory/tracked_ptr.hpp>
@@ -10,10 +10,10 @@
TEST(TrackedPtrTest, LeakTrackedPtrUsage)
{
- snu::memory::tracked_ptr<int>* ptr = new snu::memory::tracked_ptr<int>(42);
- snu::memory::tracked_ptr<int>* ptr2 = new snu::memory::tracked_ptr<int>(42);
- snu::memory::tracked_ptr<int>* ptr3 = new snu::memory::tracked_ptr<int>(42);
+ ocl::memory::tracked_ptr<int>* ptr = new ocl::memory::tracked_ptr<int>(42);
+ ocl::memory::tracked_ptr<int>* ptr2 = new ocl::memory::tracked_ptr<int>(42);
+ ocl::memory::tracked_ptr<int>* ptr3 = new ocl::memory::tracked_ptr<int>(42);
- EXPECT_EQ(snu::memory::tracked_ptr<int>::manager().allocator().allocated_count_, 3);
- ASSERT_TRUE(snu::memory::tracked_ptr<int>::manager().allocator().deallocated_count_ == 0);
+ EXPECT_EQ(ocl::memory::tracked_ptr<int>::manager().allocator().allocated_count_, 3);
+ ASSERT_TRUE(ocl::memory::tracked_ptr<int>::manager().allocator().deallocated_count_ == 0);
} \ No newline at end of file
diff --git a/meta/tex/embfs.tex b/meta/tex/embfs.tex
index e72d4b4..2d5c60e 100644
--- a/meta/tex/embfs.tex
+++ b/meta/tex/embfs.tex
@@ -25,7 +25,7 @@
\title{Embedded File System (EMBFS) Specification}
\author{Amlal El Mahrouss}
-\date{2025}
+\date{\today}
\begin{document}
@@ -37,7 +37,7 @@ The \textbf{Embedded File System (EMBFS)} is a compact and minimal filesystem de
\section{Namespace}
The EMBFS implementation resides under:
\begin{lstlisting}
-namespace snu::embfs
+namespace ocl::embfs
\end{lstlisting}
\section{Supported Logical Block Addressing (LBA) Modes}
@@ -135,7 +135,7 @@ Represents a fixed-size array of 12 inodes within a given partition.
\begin{itemize}
\item Copyright © 2025 Amlal El Mahrouss
\item All rights reserved.
- \item For questions or licensing requests, contact: \texttt{founder@snu.systems}
+ \item For questions or licensing requests, contact: \texttt{amlal@nekernel.org}
\end{itemize}
\end{document} \ No newline at end of file
diff --git a/tools/hpptest.py b/tools/hpptest.py
index f9fcd1c..744ffde 100755
--- a/tools/hpptest.py
+++ b/tools/hpptest.py
@@ -5,6 +5,6 @@ import sys, os
if __name__ == '__main__':
if len(sys.argv) == 2:
- os.system(f"clang++ -std=c++20 -DSOCL_HPPTEST '-DSOCL_HPPTEST_ASSERT(x)=static_assert(x, #x)' {sys.argv[1]}")
+ os.system(f"clang++ -std=c++20 -DOCL_HPPTEST '-DOCL_HPPTEST_ASSERT(x)=static_assert(x, #x)' {sys.argv[1]}")
print("[TEST] HEADER COMPILATION PASSES")