Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SharedPool.h File Reference
#include "config.h"
#include <string>
#include "gnuhash.h"
#include "SharedPool.cpp"

Go to the source code of this file.

Classes

class  SharedPool< T, RefcounterTraits >
 
class  SharedPool< T, RefcounterTraits >::Reference
 
class  StringpoolTraits
 

Macros

#define INITIAL_STRINGPOOL_SIZE   (1<<15)
 

Typedefs

typedef SharedPool
< std::string,
StringpoolTraits
StringPool
 

Functions

std::string operator+ (const std::string &s, const StringPool::Reference &r)
 
std::string operator+ (const StringPool::Reference &r, const std::string &s)
 
template<typename T >
T & operator<< (T &stream, const StringPool::Reference &ref)
 
template<typename T >
bool operator== (const typename SharedPool< T >::Reference &r, const T &s)
 

Variables

static StringPool stringPool
 

Macro Definition Documentation

#define INITIAL_STRINGPOOL_SIZE   (1<<15)

Definition at line 8 of file SharedPool.h.

Typedef Documentation

typedef SharedPool< std::string, StringpoolTraits > StringPool

Definition at line 190 of file SharedPool.h.

Function Documentation

std::string operator+ ( const std::string &  s,
const StringPool::Reference &  r 
)
inline

Definition at line 194 of file SharedPool.h.

195 {
196  return s+r.get();
197 }
std::string operator+ ( const StringPool::Reference &  r,
const std::string &  s 
)
inline

Definition at line 199 of file SharedPool.h.

200 {
201  return r.get()+s;
202 }
template<typename T >
T& operator<< ( T &  stream,
const StringPool::Reference &  ref 
)
inline

Definition at line 205 of file SharedPool.h.

206 {
207  return stream<<ref.get();
208 }
template<typename T >
bool operator== ( const typename SharedPool< T >::Reference &  r,
const T &  s 
)

Definition at line 211 of file SharedPool.h.

References SharedPool< T, RefcounterTraits >::Reference::get().

212 {
213  return r.get() == s;
214 }

Variable Documentation

StringPool stringPool
static

Definition at line 192 of file SharedPool.h.