Cbeam
|
#include <cbeam/platform/compiler_compatibility.hpp>
#include <time.h>
#include <cctype>
#include <algorithm>
#include <chrono>
#include <codecvt>
#include <cstdint>
#include <iomanip>
#include <locale>
#include <sstream>
#include <stdexcept>
#include <string>
#include <type_traits>
Go to the source code of this file.
Classes | |
struct | cbeam::convert::has_insertion_operator< T, typename > |
The has_insertion_operator trait provides static meta-information about whether a type T has overloaded the operator<< for insertion into an output stream. More... | |
struct | cbeam::convert::has_insertion_operator< T, std::void_t< decltype(std::declval< std::ostream & >()<< std::declval< T >())> > |
Namespaces | |
namespace | cbeam |
The root namespace for the Cbeam library. This namespace unifies cross-platform utilities for concurrency, memory management, file handling, logging, serialization, and more. Its purpose is to provide a cohesive collection of modern C++ components that address common system-level and application-level tasks, while promoting thread-safety, interprocess communication, and stable resource handling across varied platform APIs. | |
namespace | cbeam::convert |
Contains conversion utilities to transform data between different formats and types. Functions here handle string conversions, encoding manipulations, and the creation of string representations for various C++ types. They help ensure consistent serialization and text output across the library. | |
Functions | |
std::string | cbeam::convert::indent (int indentation) |
Returns a string consisting of indentation tab characters. | |
std::string | cbeam::convert::to_lower (std::string s) |
Converts characters A-Z in the given string to lower case and returns the modified string. | |
std::string | cbeam::convert::escape_string (const std::string &input, const char escape_character, const std::string &characters_to_escape) |
std::string | cbeam::convert::unescape_string (const std::string &input, char escape_character, const std::string &characters_to_unescape) |
template<typename T> | |
T | cbeam::convert::from_string (const std::string &str) |
Converts a given std::string to a specified type. | |
template<> | |
std::wstring | cbeam::convert::from_string< std::wstring > (const std::string &str) |
Converts the given std::string to std::wstring using UTF-8 to UTF-16 encoding. | |
template<typename T> | |
std::enable_if< has_insertion_operator< T >::value, std::string >::type | cbeam::convert::to_string (const T &value) |
Converts the value to a string, using the C-locale (i.e., '.' as a decimal separator). | |
template<typename T> | |
std::string | cbeam::convert::to_string (T *const &val) |
Converts a pointer to a string in hex syntax with a leading "0x". | |
std::string | cbeam::convert::to_string (const std::wstring &str) |
Converts the given std::wstring to std::string using UTF-16 to UTF-8 encoding. | |
template<typename T> | |
std::string | cbeam::convert::to_string (std::chrono::time_point< T > time) |
template<typename T> | |
std::wstring | cbeam::convert::to_wstring (T value) |
Converts any value that can be handled by to_string(...) into a std::wstring. | |