|
Sese Framework
3.0.0
A cross-platform framework
|
Namespaces | |
| namespace | archive |
| namespace | concurrent |
| namespace | db |
| namespace | ini |
| namespace | internal |
| namespace | io |
| namespace | log |
| namespace | net |
| namespace | plugin |
| namespace | res |
| namespace | security |
| namespace | service |
| namespace | system |
| namespace | text |
| namespace | xml |
Classes | |
| class | ArgParser |
| Command line argument parsing class. More... | |
| class | Base64Converter |
| BASE64 converter. More... | |
| class | Bimap |
| Bidirectional map. More... | |
| struct | Bitset32 |
| Endian-independent 32-bit. More... | |
| class | BufferedQueue11 |
| Cache queue (single producer-single consumer) More... | |
| class | BufferedQueueNn |
| Cache queue (multi producer-multi consumer) More... | |
| class | Compressor |
| Compressor class. More... | |
| class | ConfigObject |
| Traditional configuration file class. More... | |
| class | ConfigUtil |
| Traditional configuration file utility. More... | |
| class | CSVReader |
| CSV stream reader. More... | |
| class | CSVWriter |
| CSV stream writer. More... | |
| class | DateTime |
| Date time class. More... | |
| class | Decompressor |
| Decompressor class. More... | |
| class | DefaultPromise |
| class | EncodingConverter |
| String encoding conversion. More... | |
| class | ErrorCode |
| Error code class. More... | |
| class | Exception |
| Exception class. More... | |
| class | FutureAwaiter |
| class | GlobalThreadPool |
| Global thread pools, which use system thread pools on Windows, and slacker singleton thread pools on UNIX platforms. More... | |
| class | GZipFileInputStream |
| GZip file input stream (decompression) More... | |
| class | GZipFileOutputStream |
| GZip file output stream (compression) More... | |
| struct | has_begin |
| struct | has_begin< T, void_t< decltype(std::declval< T >().begin())> > |
| struct | has_end |
| struct | has_end< T, void_t< decltype(std::declval< T >().begin())> > |
| class | Initializer |
| Initializer. More... | |
| class | InitiateTask |
| Initialization task base class. More... | |
| class | IOBuf |
| Chained buffer for IOCP. More... | |
| struct | IOBufNode |
| IOBuf Node. More... | |
| struct | is_iterable |
| struct | is_pair |
| struct | is_pair< std::pair< T1, T2 > > |
| class | Json |
| JSON parser. More... | |
| class | Locker |
| std::mutex wrapper More... | |
| struct | LongLongSplitter |
| Structure for data splitting. More... | |
| class | MD5Util |
| MD5 Algorithm Class. More... | |
| class | MemoryViewer |
| Memory viewer tool. More... | |
| class | MessageDigest |
| Message digest utility class. More... | |
| class | Noncopyable |
| Non-copyable class. More... | |
| class | NotInstantiable |
| Non-instantiable class. More... | |
| class | ObjectPool |
| Object pool. More... | |
| class | PercentConverter |
| Percent sign encoding converter. More... | |
| class | RandomUtil |
| Random utility class. More... | |
| class | Range |
| Range class. More... | |
| class | Result |
| Result Class. More... | |
| class | Result< T, E, std::enable_if_t< std::is_same_v< T, E > &&!std::is_void_v< T > &&!std::is_void_v< E > > > |
| class | Result< T, E, std::enable_if_t<!std::is_same_v< T, E > &&!std::is_void_v< T > &&!std::is_void_v< E > > > |
| class | Result< T, void > |
| class | Result< void, E > |
| class | Result< void, void > |
| class | RingQueue |
| Ring queue. More... | |
| struct | SHA1Context |
| SHA1 context. More... | |
| class | SHA1Util |
| SHA1 algorithm tool. More... | |
| class | SHA256Util |
| SHA256 digest algorithm without hardware instruction acceleration, do not use this utility class if performance is a concern. More... | |
| class | Singleton |
| Raw Pointer Singleton Template Class. More... | |
| class | SingletonPtr |
| Smart Pointer Singleton Template Class. More... | |
| class | SpinLock |
| Spin Lock. More... | |
| class | StopWatch |
| Stopwatch Class. More... | |
| struct | StrCaseMapComparer |
| StrCaseMap Comparator. More... | |
| struct | StrCaseUnorderedMapComparer |
| StrCaseUnorderedMap Comparator. More... | |
| struct | StrCmp |
| Character comparator. More... | |
| struct | StrCmpI |
| Character comparator (case-insensitive) More... | |
| class | SymbolConverter |
| class | Thread |
| Thread class. More... | |
| class | ThreadInitiateTask |
| Initialization task for the built-in thread class. More... | |
| class | ThreadPool |
| Thread pool class. More... | |
| struct | TimeoutEvent |
| Timeout Event. More... | |
| struct | TimeoutEventSlot |
| Timeout Event Slot (Time Wheel Slice) More... | |
| class | Timer |
| Low-Precision Timer Class. More... | |
| class | TimerTask |
| Timer Task. More... | |
| class | TimeSpan |
| Time Interval Class. More... | |
| class | TimestampHandler |
| Timestamp Handler. More... | |
| class | TimeWheel |
| Time Wheel. More... | |
| class | UniReader |
| Cross-platform file reader, primarily adapted for Windows, supports UTF-8. More... | |
| class | UnixException |
| Unix exception wrapper class. More... | |
| class | UseCoroutine |
| class | Uuid |
| Uuid Class. More... | |
| class | UuidBuilder |
| Uuid Builder. More... | |
| class | Value |
| Value Container Class. More... | |
| class | Version |
| Version Class. More... | |
| class | Yaml |
| YAML parser. More... | |
Typedefs | |
| template<class T > | |
| using | BufferedQueueN1 = BufferedQueueNn<T> |
| Cache queue (multi producer-single consumer) | |
| template<class T > | |
| using | BufferedQueue1N = BufferedQueueNn<T> |
| Cache queue (single producer-multi consumer) | |
| template<typename VALUE , typename ALLOCATOR = std::allocator<std::pair<const std::string, VALUE>>> | |
| using | StrCaseMap = std::map<std::string, VALUE, StrCaseMapComparer, ALLOCATOR> |
| Dictionary class that ignores case of string keys. | |
| template<typename VALUE , typename ALLOCATOR = std::allocator<std::pair<const std::string, VALUE>>> | |
| using | StrCaseUnorderedMap = std::unordered_map<std::string, VALUE, StrCaseUnorderedMapComparer, StrCaseUnorderedMapComparer, ALLOCATOR> |
| Dictionary class that ignores case of string keys. | |
| using | socket_t = int32_t |
| Native Socket type. | |
| using | tid_t = uint32_t |
| Thread ID identifier. | |
| using | pid_t = ::pid_t |
| Process ID identifier. | |
| template<typename... > | |
| using | void_t = void |
| using | NativeException = UnixException |
| template<typename T > | |
| using | SharedType = std::shared_ptr<T> |
| template<typename T > | |
| using | UniqueType = std::unique_ptr<T> |
| template<typename T > | |
| using | WeakType = std::weak_ptr<T> |
Enumerations | |
| enum class | CompressionType { RAW = -30 , ZLIB = 0 , GZIP = 16 } |
Functions | |
| const char * | getLevelString (log::Level level) noexcept |
| template<class RETURN_TYPE > | |
| std::shared_future< RETURN_TYPE > | async (const std::function< RETURN_TYPE()> &task) noexcept |
| Launch an anonymous thread to execute a task. | |
| template<class RETURN_TYPE > | |
| auto | async (UseCoroutine, const std::function< RETURN_TYPE()> &task) noexcept |
| Launch an anonymous thread to execute a task. | |
| template<class RETURN_TYPE > | |
| std::shared_future< RETURN_TYPE > | async (ThreadPool &pool, const std::function< RETURN_TYPE()> &task) noexcept |
| Submit a task to an existing thread pool. | |
| template<class RETURN_TYPE > | |
| auto | async (UseCoroutine, ThreadPool &pool, const std::function< RETURN_TYPE()> &task) noexcept |
| Submit a task to an existing thread pool. | |
| template<class RETURN_TYPE > | |
| std::shared_future< RETURN_TYPE > | asyncWithGlobalPool (const std::function< RETURN_TYPE()> &task) noexcept |
| Submit a task to the global thread pool. | |
| template<class RETURN_TYPE > | |
| auto | asyncWithGlobalPool (UseCoroutine, const std::function< RETURN_TYPE()> &task) noexcept |
| Submit a task to the global thread pool. | |
| void | initCore (int argc, const char *const *argv) noexcept |
| Initialize sese-core. | |
| template<typename RETURN_TYPE , typename... ARGS> | |
| SharedType< RETURN_TYPE > | makeShared (ARGS &&...args) |
| template<typename RETURN_TYPE , typename... ARGS> | |
| SharedType< RETURN_TYPE > | makeUnique (ARGS &&...args) |
| template<typename RETURN_TYPE , typename INIT_TYPE > | |
| SharedType< RETURN_TYPE > | makeSharedFromList (std::initializer_list< INIT_TYPE > list) |
| template<typename RETURN_TYPE , typename INIT_TYPE > | |
| UniqueType< RETURN_TYPE > | makeUniqueFromList (std::initializer_list< INIT_TYPE > list) |
| template<typename RETURN_TYPE , typename RAW_TYPE > | |
| SharedType< RETURN_TYPE > | dynamicPointerCast (SharedType< RAW_TYPE > raw_type) |
| template<typename RETURN_TYPE , typename RAW_TYPE > | |
| UniqueType< RETURN_TYPE > | dynamicPointerCast (UniqueType< RAW_TYPE > &raw_type) |
| int64_t | toInteger (const std::string &string, int radix=10) |
| std::string | getClassName (const std::type_info *type) |
| bool | strcmp (char const *lv, char const *rv) noexcept |
| bool | strcmpDoNotCase (char const *lv, char const *rv) noexcept |
| bool | isSpace (char ch) noexcept |
| const char * | getLevelString (Level level) noexcept |
| int32_t | findFirstAt (const char *str, char ch) |
| void | sleep (uint32_t second) |
| template<class REP , class PERIOD > | |
| void | sleep (const std::chrono::duration< REP, PERIOD > &duration) |
| std::string | getErrorString (int64_t error=errno) |
| int32_t | getErrorCode () |
| size_t | streamMove (sese::io::OutputStream *out, sese::io::InputStream *in, size_t size) noexcept |
| template<class T > | |
| size_t | number2StringLength (T num, size_t radix=10) |
| template<class T > | |
| size_t | floating2StringLength (T num, uint16_t placeholder) |
| template<typename TP > | |
| std::time_t | to_time_t (TP tp) |
| template<typename T > | |
| bool | isAdditionOverflow (T a, T b) |
| Additive spill detection. | |
| template<typename T > | |
| bool | isSubtractionOverflow (T a, T b) |
| Subtractive spill detection. | |
Variables | |
| thread_local std::shared_ptr< sese::Thread::RuntimeData > | current_data = nullptr |
| template<typename T > | |
| constexpr bool | is_iterable_v = is_iterable<T>::value |
| using sese::BufferedQueue1N = BufferedQueueNn<T> |
Cache queue (single producer-multi consumer)
| using sese::BufferedQueueN1 = BufferedQueueNn<T> |
Cache queue (multi producer-single consumer)
| using sese::NativeException = UnixException |
| typedef DWORD sese::pid_t = ::pid_t |
Process ID identifier.
| using sese::SharedType = std::shared_ptr<T> |
| typedef SOCKET sese::socket_t = int32_t |
Native Socket type.
| using sese::StrCaseMap = std::map<std::string, VALUE, StrCaseMapComparer, ALLOCATOR> |
Dictionary class that ignores case of string keys.
| VALUE | Dictionary value type |
| ALLOCATOR | Memory allocator |
| using sese::StrCaseUnorderedMap = std::unordered_map<std::string, VALUE, StrCaseUnorderedMapComparer, StrCaseUnorderedMapComparer, ALLOCATOR> |
Dictionary class that ignores case of string keys.
| VALUE | Dictionary value type |
| ALLOCATOR | Memory allocator |
| typedef uint32_t sese::tid_t = uint32_t |
Thread ID identifier.
| using sese::UniqueType = std::unique_ptr<T> |
| using sese::void_t = void |
| using sese::WeakType = std::weak_ptr<T> |
|
strong |
|
noexcept |
|
noexcept |
Submit a task to an existing thread pool.
| RETURN_TYPE | Return type |
| pool | Existing thread pool |
| task | Task |
References sese::ThreadPool::postTask().
|
noexcept |
Launch an anonymous thread to execute a task.
| RETURN_TYPE | Return type |
| task | Task |
References async().
|
noexcept |
Submit a task to an existing thread pool.
| RETURN_TYPE | Return type |
| pool | Existing thread pool |
| task | Task |
References async().
|
noexcept |
Submit a task to the global thread pool.
| RETURN_TYPE | Return type |
| task | Task |
Referenced by asyncWithGlobalPool().
|
noexcept |
Submit a task to the global thread pool.
| RETURN_TYPE | Return type |
| task | Task |
References asyncWithGlobalPool().
|
inline |
Type casting for std::shared_ptr
| RETURN_TYPE | Template parameter expected to return std::shared_ptr |
| RAW_TYPE | Template parameter of the original std::shared_ptr |
| raw_type | std::shared_ptr to convert |
| UniqueType< RETURN_TYPE > sese::dynamicPointerCast | ( | UniqueType< RAW_TYPE > & | raw_type | ) |
Type casting for std::unique_ptr
| RETURN_TYPE | Template parameter expected to return std::unique_ptr |
| RAW_TYPE | Template parameter of the original std::unique_ptr |
| raw_type | std::unique_ptr to convert |
| int32_t sese::findFirstAt | ( | const char * | str, |
| char | ch ) |
Find the first occurrence of a character in a string
| str | The string to search in |
| ch | The character to find |
References at().
| size_t sese::floating2StringLength | ( | T | num, |
| uint16_t | placeholder ) |
Get the byte length required to convert a number to a string
| T | Input floating-point number type |
| num | Number to be converted |
| placeholder | Precision |
References number2StringLength().
Referenced by sese::text::FormatOption_FloatNumberFormat(), and sese::text::Number::toString().
| std::string sese::getClassName | ( | const std::type_info * | type | ) |
Get the name of the class
| type | Class |
| int32_t sese::getErrorCode | ( | ) |
Retrieve error code
Referenced by sese::io::FileStream::createEx(), sese::system::IPCChannel::createEx(), sese::system::Process::createEx(), sese::system::SharedMemory::createEx(), sese::plugin::Module::openEx(), sese::system::IPCChannel::useEx(), and sese::system::SharedMemory::useEx().
| std::string sese::getErrorString | ( | int64_t | error = errno | ) |
Retrieve error message
| error | Error code |
Referenced by sese::io::FileStream::createEx(), sese::system::IPCChannel::createEx(), sese::system::Process::createEx(), sese::system::SharedMemory::createEx(), sese::net::getNetworkErrorString(), sese::plugin::Module::openEx(), sese::system::IPCChannel::useEx(), and sese::system::SharedMemory::useEx().
|
noexcept |
Return corresponding string based on log level
| level | Log level |
|
noexcept |
References sese::log::DEBUG, sese::log::ERR, sese::log::INFO, and sese::log::WARN.
Referenced by sese::log::SimpleFormatter::dump().
|
noexcept |
Initialize sese-core.
| argc | Number of arguments |
| argv | Array of arguments |
References sese::Initializer::addTask().
| bool sese::isAdditionOverflow | ( | T | a, |
| T | b ) |
Additive spill detection.
Referenced by sese::internal::service::http::HttpConnectionEx::handleWindowUpdate().
|
noexcept |
Determine if a character is a whitespace
| ch | Character to be checked |
References SPACE_CHARS.
Referenced by sese::Json::tokenizer(), sese::xml::XmlUtil::tokenizer(), and sese::text::AbstractStringBuffer::trim().
| bool sese::isSubtractionOverflow | ( | T | a, |
| T | b ) |
|
inline |
Instantiate SharedType
| RETURN_TYPE | Template parameter for SharedType |
| ARGS | Constructor parameter types for the template parameter |
| args | Constructor parameters for the template parameter |
| SharedType< RETURN_TYPE > sese::makeSharedFromList | ( | std::initializer_list< INIT_TYPE > | list | ) |
Using std::make_shared with std::initializer_list
| RETURN_TYPE | Template type expected to return std::shared_ptr |
| INIT_TYPE | Template parameter for std::initializer_list |
| list | Initialization list |
|
inline |
Instantiate UniqueType
| RETURN_TYPE | Template parameter for UniqueType |
| ARGS | Constructor parameter types for the template parameter |
| args | Constructor parameters for the template parameter |
| UniqueType< RETURN_TYPE > sese::makeUniqueFromList | ( | std::initializer_list< INIT_TYPE > | list | ) |
Using std::make_unique with std::initializer_list
| RETURN_TYPE | Template parameter expected to return std::unique_ptr |
| INIT_TYPE | Template parameter for std::initializer_list |
| list | Initialization list |
| size_t sese::number2StringLength | ( | T | num, |
| size_t | radix = 10 ) |
Get the byte length required to convert a number to a string
| T | Input integer type |
| num | Number to be converted |
| radix | Base |
Referenced by floating2StringLength(), sese::text::FormatOption_NumberFormatAlgin(), sese::text::Number::toHex(), sese::text::Number::toHex(), sese::text::Number::toOct(), sese::text::Number::toOct(), sese::text::Number::toString(), and sese::net::http::Range::toStringLength().
| void sese::sleep | ( | const std::chrono::duration< REP, PERIOD > & | duration | ) |
Make the current thread sleep for a while, implemented using std::this_thread::sleep_for
| duration | The duration to sleep |
| void sese::sleep | ( | uint32_t | second | ) |
Make the current thread sleep for a while, implemented using NATIVE API
| second | Seconds |
References sleep().
Referenced by sese::net::Socket::connect(), sese::security::SecuritySocket::connect(), sese::Timer::loop(), sese::internal::service::http::HttpServiceImpl::shutdown(), and sleep().
|
noexcept |
Compare two strings for equality
| lv | String 1 |
| rv | String 2 |
Referenced by sese::net::ws::WebsocketAuthenticator::verify().
|
noexcept |
Compare two strings for equality (case-insensitive)
| lv | String 1 |
| rv | String 2 |
References strcmpi.
Referenced by sese::net::http::HttpConverter::convertFromHttp2(), sese::net::http::HttpClient::create(), sese::net::http::HPackUtil::decode(), sese::db::impl::SqlitePreparedStatementImpl::getColumnType(), sese::internal::service::http::HttpServiceImpl::handleRequest(), in(), sese::Yaml::parseBasic(), and sese::net::http::HttpClient::Impl::request().
|
noexcept |
Move stream data
| out | Output stream |
| in | Input stream |
| size | Size to move |
References in().
Referenced by sese::internal::service::http::HttpConnection::readBody(), and sese::internal::service::http::HttpConnection::readHeader().
| std::time_t sese::to_time_t | ( | TP | tp | ) |
Time type conversion
| TP | Type of the object to convert |
| tp | Object to convert |
Referenced by sese::internal::service::http::HttpServiceImpl::handleRequest().
| int64_t sese::toInteger | ( | const std::string & | string, |
| int | radix = 10 ) |
Integer conversion function that ignores errors
| string | String representing the integer |
| radix | Base |
Referenced by sese::internal::service::http::HttpConnectionEx::handleDataFrame(), and sese::internal::service::http::HttpConnection::readHeader().
| thread_local std::shared_ptr<sese::Thread::RuntimeData> sese::current_data = nullptr |
|
constexpr |