diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-06-27 14:46:26 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-06-27 14:47:00 +0200 |
| commit | 0be66c2f14812f192e139f6d24bddc4f574c059d (patch) | |
| tree | b2f70743da944d84add7c6bd99f63562a8c0e33a /lib | |
| parent | 29a31b73183f97b792d0585dca9a305b083f93d8 (diff) | |
feat: SNU C++ Library (v1.0.0)
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/astdx/cgi.hpp | 6 | ||||
| -rw-r--r-- | lib/astdx/crc32.hpp | 5 | ||||
| -rw-r--r-- | lib/astdx/embdfs.hpp | 4 | ||||
| -rw-r--r-- | lib/astdx/equiv.hpp | 4 | ||||
| -rw-r--r-- | lib/astdx/fix.hpp | 4 | ||||
| -rw-r--r-- | lib/astdx/math.hpp | 6 | ||||
| -rw-r--r-- | lib/astdx/opt.hpp | 8 |
7 files changed, 19 insertions, 18 deletions
diff --git a/lib/astdx/cgi.hpp b/lib/astdx/cgi.hpp index 70f07e1..86fc6f9 100644 --- a/lib/astdx/cgi.hpp +++ b/lib/astdx/cgi.hpp @@ -11,7 +11,7 @@ #include <string> #include <sstream> -namespace astdx +namespace snu { namespace web { @@ -21,7 +21,7 @@ namespace astdx cgi_writer& eval_(const std::string& mime, const std::stringstream& ss) noexcept { std::printf("Content-Type: %s\r\n", mime.c_str()); - std::printf("Server: %s\r\n", "astdx-cpp-library"); + std::printf("Server: %s\r\n", "snu-cpp-library"); std::printf("Content-Length: %ld\r\n\r\n", ss.str().size()); std::printf("%s", ss.str().c_str()); @@ -57,6 +57,6 @@ namespace astdx } }; } // namespace web -} // namespace astdx +} // namespace snu #endif // ifndef _STDX_CGI_HPP
\ No newline at end of file diff --git a/lib/astdx/crc32.hpp b/lib/astdx/crc32.hpp index 371f456..12dfbd1 100644 --- a/lib/astdx/crc32.hpp +++ b/lib/astdx/crc32.hpp @@ -9,11 +9,12 @@ #define _STDX_CRC32_HPP #include <cstdint> +#include <cstddef> /// @brief Crc32 implementation in C++ /// @author Amlal EL Mahrouss (amlal@nekernel.org) -namespace astdx +namespace snu { namespace details { @@ -68,6 +69,6 @@ namespace astdx return ~crc; } } // namespace details -} // namespace astdx +} // namespace snu #endif // !_STDX_CRC32_HPP
\ No newline at end of file diff --git a/lib/astdx/embdfs.hpp b/lib/astdx/embdfs.hpp index 893ca13..179cec2 100644 --- a/lib/astdx/embdfs.hpp +++ b/lib/astdx/embdfs.hpp @@ -14,7 +14,7 @@ /// @brief A Filesystem designed for tiny storage medias. /// @author Amlal EL Mahrouss (amlal@nekernel.org) -namespace astdx::embdfs +namespace snu::embdfs { namespace details { @@ -72,6 +72,6 @@ namespace astdx::embdfs /// @brief Indexed node linear array. typedef embdfs_inode embdfs_inode_arr_t[_inode_arr_len]; } // namespace details -} // namespace astdx::embdfs +} // namespace snu::embdfs #endif // ifndef _STDX_EMBDFS_HPP
\ No newline at end of file diff --git a/lib/astdx/equiv.hpp b/lib/astdx/equiv.hpp index 8e20653..45534df 100644 --- a/lib/astdx/equiv.hpp +++ b/lib/astdx/equiv.hpp @@ -7,7 +7,7 @@ #pragma once -namespace astdx +namespace snu { template <typename T> struct basic_hash_trait @@ -99,4 +99,4 @@ namespace astdx return left_ / right_; } }; -} // namespace astdx
\ No newline at end of file +} // namespace snu
\ No newline at end of file diff --git a/lib/astdx/fix.hpp b/lib/astdx/fix.hpp index b2d8591..d4c95b4 100644 --- a/lib/astdx/fix.hpp +++ b/lib/astdx/fix.hpp @@ -15,7 +15,7 @@ #include <arpa/inet.h> #include <sys/socket.h> -namespace astdx::fix +namespace snu::fix { struct fix_reader; struct fix_writer; @@ -58,6 +58,6 @@ namespace astdx::fix uint64_t time_in_force_; uint32_t checksum_; }; -} // namespace astdx::fix +} // namespace snu::fix #endif // ifndef _STDX_FIX_HPP diff --git a/lib/astdx/math.hpp b/lib/astdx/math.hpp index 8c373a2..c6ae939 100644 --- a/lib/astdx/math.hpp +++ b/lib/astdx/math.hpp @@ -1,6 +1,6 @@ /* * File: math.hpp - * Purpose: mathematics c++ header. + * Purpose: Mathematics c++ header. * Author: Amlal El Mahrouss (amlal@nekernel.org) * Copyright 2025, Amlal El Mahrouss all rights reserved. */ @@ -9,7 +9,7 @@ #include <cmath> -namespace astdx::math +namespace snu::math { template <size_t T> struct is_non_boolean_integer final @@ -32,4 +32,4 @@ namespace astdx::math constexpr inline auto not_a_number = NAN; constexpr inline auto positive_infinity = INFINITY; constexpr inline auto negative_infinity = -positive_infinity; -} // namespace astdx::math
\ No newline at end of file +} // namespace snu::math
\ No newline at end of file diff --git a/lib/astdx/opt.hpp b/lib/astdx/opt.hpp index 12883ce..b43b608 100644 --- a/lib/astdx/opt.hpp +++ b/lib/astdx/opt.hpp @@ -10,7 +10,7 @@ #include <stdexcept> #include <utility> -namespace astdx +namespace snu { enum class ret { @@ -40,9 +40,9 @@ namespace astdx }; template <typename Teller, typename... Lst> - inline astdx::ret eval(Teller tell, Lst&&... arg) + inline snu::ret eval(Teller tell, Lst&&... arg) { - return tell(std::forward<Lst>(arg)...) ? astdx::ret::okay : astdx::ret::err; + return tell(std::forward<Lst>(arg)...) ? snu::ret::okay : snu::ret::err; } namespace traits @@ -105,6 +105,6 @@ namespace astdx return greater_than(std::forward<Lst>(arg)...) ? ret::okay : ret::err; } -} /* namespace astdx */ +} /* namespace snu */ #endif /* ifndef _STDX_OPT_HPP */ |
