diff options
| author | Amlal <amlal@nekernel.org> | 2025-08-11 17:18:08 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-08-11 17:18:08 +0200 |
| commit | 67228fbbe3a1147dee3043d0609c9b903d4d0391 (patch) | |
| tree | bcbbd019a91eabd4dbd409109df963dc8fde4713 /dev | |
| parent | 1d9328259052be88b86b958fdb1b2396307cacdb (diff) | |
wip: url: module implementation in progress
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/lib/net/url.hpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/dev/lib/net/url.hpp b/dev/lib/net/url.hpp index 0506cd3..5dc0d03 100644 --- a/dev/lib/net/url.hpp +++ b/dev/lib/net/url.hpp @@ -9,10 +9,38 @@ #include <string> #include <iostream> +#include <sstream> + +/// @author Amlal El Mahrouss (founder@snu.systems) namespace snu::net { template <typename char_type> class basic_url; -}
\ No newline at end of file + /// @brief Basic URL parser container. + template <typename char_type> + class basic_url final + { + std::basic_stringstream<char_type> ss_{}; + + public: + explicit basic_url() = default; + ~basic_url() = default; + + basic_url& operator=(const basic_url&) = default; + basic_url(const basic_url&) = default; + + basic_url& operator/=(const std::basic_string<char_type>& in) + { + ss_ += in; + return *this; + } + + basic_url& operator/=(const char_type& in) + { + ss_ += in; + return *this; + } + }; +} // namespace snu::net |
