9#include <unordered_set>
11#ifdef FSMGINE_MULTI_THREADED
49 std::string_view
intern(
const std::string& str);
55 std::string_view
intern(std::string_view sv);
70 std::unordered_set<std::string> interned_strings_;
72#ifdef FSMGINE_MULTI_THREADED
73 mutable std::mutex mutex_;
Provides memory-efficient string storage through string interning.
Definition StringInterner.hpp:39
void clear()
Clears all interned strings (TEST ONLY - DO NOT USE IN PRODUCTION)
std::string_view intern(std::string_view sv)
Interns a string_view and returns a persistent string_view.
static StringInterner & instance()
Gets the singleton instance of StringInterner.
std::string_view intern(const std::string &str)
Interns a string and returns a persistent string_view.
Main namespace for the FSMgine library.
Definition FSM.hpp:23