summaryrefslogtreecommitdiffhomepage
path: root/dev/lib
diff options
context:
space:
mode:
Diffstat (limited to 'dev/lib')
-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
16 files changed, 95 insertions, 95 deletions
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