Allocator improvements, kernel C++ platform, streaming

This commit is contained in:
Daniel Hammer
2025-03-01 03:31:14 +04:00
parent 6f1c6f1316
commit 17d0bbf1bb
16 changed files with 367 additions and 166 deletions
+42
View File
@@ -0,0 +1,42 @@
/*
* stream.hpp
* Streaming
* Copyright (c) 2025 Daniel Hammer
*/
#pragma once
#include <cstddef>
#include <cstdint>
using namespace std;
// Kernel C++ Platform
namespace kcp {
enum base
{
oct = 8,
dec = 10,
hex = 16
};
class cstringstream {
const char* string;
std::size_t size;
base current_base = base::dec;
public:
cstringstream();
cstringstream& operator<<(char c);
cstringstream& operator<<(char* str);
cstringstream& operator<<(int num);
cstringstream& operator<<(uint32_t val);
cstringstream& operator<<(uint64_t val);
cstringstream& operator<<(base nb);
const char* str();
};
};