Pyrogenesis  trunk
Classes | Macros | Typedefs | Functions | Variables
CStrIntern.cpp File Reference
#include "precompiled.h"
#include "CStrIntern.h"
#include "lib/fnv_hash.h"
#include "ps/CLogger.h"
#include "ps/ThreadUtil.h"
#include <unordered_map>
#include "CStrInternStatic.h"
Include dependency graph for CStrIntern.cpp:

Classes

class  CStrInternInternals
 
struct  StringsKeyHash
 
struct  StringsKeyProxy
 
struct  StringsKeyProxyHash
 
struct  StringsKeyProxyEq
 

Macros

#define X(id)   CStrIntern str_##id(#id);
 
#define X2(id, str)   CStrIntern str_##id(str);
 

Typedefs

using StringsKey = std::string
 

Functions

static CStrInternInternalsGetString (const char *str, size_t len)
 

Variables

static std::unordered_map< StringsKey, std::shared_ptr< CStrInternInternals >, StringsKeyHashg_Strings
 

Macro Definition Documentation

◆ X

#define X (   id)    CStrIntern str_##id(#id);

◆ X2

#define X2 (   id,
  str 
)    CStrIntern str_##id(str);

Typedef Documentation

◆ StringsKey

using StringsKey = std::string

Function Documentation

◆ GetString()

static CStrInternInternals* GetString ( const char *  str,
size_t  len 
)
static

Variable Documentation

◆ g_Strings

std::unordered_map<StringsKey, std::shared_ptr<CStrInternInternals>, StringsKeyHash> g_Strings
static