29 #if defined( _LIBCPP_VERSION ) || (defined(_MSC_VER) && _MSC_VER >= 1700) || defined(__GNUG__) 30 # include <unordered_set> 31 # define _UNORDERED_MAP 32 #elif defined(_MSC_VER) 40 #define THREAD_SAFETY 1 43 #include <OpenThreads/Mutex> 57 static std::unordered_set<std::string>
StringSet(3000);
58 #elif defined(__GNUG__) 59 static __gnu_cxx::hash_set<std::string>
StringSet(3000);
60 #elif defined(_MSC_VER) 61 static stdext::hash_set<std::string>
StringSet;
149 gStringSetMutex.lock();
153 mString = &(*StringSet.insert(value).first);
154 StringCount = StringSet.size();
157 gStringSetMutex.unlock();
166 mString =
new std::string(value);
RefStr(const std::string &value="")
Constructor.
static OpenThreads::Mutex gStringSetMutex
static size_t StringCount
A string wrapper that will make sure that all of the strings with the same value will point to the sa...
static size_t GetSharedStringCount()
Gets shared string count.
trUtil::RefStr & operator=(const std::string &value)
Assignment operator that takes a string.
const std::string * mString
TR_UTIL_EXPORT std::ostream & operator<<(std::ostream &os, const EnumerationString &e)
Helper method to print EnumerationNumeric to an output stream.
const std::string & Get() const
void Intern(const std::string &value)
RefStr operator+(const std::string &string) const
static std::set< std::string > StringSet
Namespace that holds various utility classes for the engine.