Tactics: Western Philosophers Vs. Musicians  0.12
A turn-based tactical game combining rules and gameplay elements inspired by Final Fantasy Tactics and the Mayfair Exponential Game System. Unlike most games of this type, motion is in full, grid-less 3D.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Classes | Typedefs | Functions | Variables
OpenSkyNet::Utils Namespace Reference

Namespaces

 HashBenchmarkTests
 

Classes

class  HashTableUIntKeys
 
class  PrecisionTimer
 
class  Socket
 
class  LockableCS
 
class  SyncEvent
 
class  Thread
 
class  TaggedUnion
 

Typedefs

typedef unsigned int uint
 
typedef unsigned long long uint64
 

Functions

Utils::uint getCompositeKey (const Math::Point< Utils::uint > &bin_)
 
Utils::uint getCompositeKey (const Math::Point< int > &bin_)
 
void GetFileNamesInDir (const std::string &dir_, std::list< std::string > &fileNames_)
 
uint getCompositeKey (uint x_, uint y_, uint z_)
 
uint HashUIntToUInt (const uint &key_)
 
template<class T >
void serialize (T val_, char *&buffer_, OpenSkyNet::Utils::uint &bufferLen_)
 
template<class T >
assemble (char *&buffer_, OpenSkyNet::Utils::uint &bufferLen_)
 
void Tokenize (const std::string &s_, std::vector< std::string > &tokens_, const std::string &delimiters_=" ")
 
void EraseAll (std::string &s_, const std::string &charsToErase_=" ")
 

Variables

const uint INITIAL_TABLE_SIZE = 512
 
const uint MAX_3D_COMPONENT_KEY = 1024
 

Typedef Documentation

typedef unsigned int OpenSkyNet::Utils::uint
typedef unsigned long long OpenSkyNet::Utils::uint64

Function Documentation

template<class T >
T OpenSkyNet::Utils::assemble ( char *&  buffer_,
OpenSkyNet::Utils::uint bufferLen_ 
)

Reads a value from a buffer; offsets buffer and length

void OpenSkyNet::Utils::EraseAll ( std::string &  s_,
const std::string &  charsToErase_ = " " 
)
inline
Utils::uint OpenSkyNet::Utils::getCompositeKey ( const Math::Point< Utils::uint > &  bin_)
inline

Overloading Utils::getCompositeKey() to accept Points.

uint OpenSkyNet::Utils::getCompositeKey ( uint  x_,
uint  y_,
uint  z_ 
)
inline

Concatenate 3 unsigned ints <= MAX_3D_COMPONENT_KEY to fit inside 1 unsigned int.

Utils::uint OpenSkyNet::Utils::getCompositeKey ( const Math::Point< int > &  bin_)
inline

Overloading Utils::getCompositeKey() to accept Points.

void OpenSkyNet::Utils::GetFileNamesInDir ( const std::string &  dir_,
std::list< std::string > &  fileNames_ 
)
inline
uint OpenSkyNet::Utils::HashUIntToUInt ( const uint &  key_)
inline
template<class T >
void OpenSkyNet::Utils::serialize ( val_,
char *&  buffer_,
OpenSkyNet::Utils::uint bufferLen_ 
)

Writes a value to a buffer; offsets buffer and length

void OpenSkyNet::Utils::Tokenize ( const std::string &  s_,
std::vector< std::string > &  tokens_,
const std::string &  delimiters_ = " " 
)
inline

Variable Documentation

const uint OpenSkyNet::Utils::INITIAL_TABLE_SIZE = 512

The initial number of keys hash tables can hold.

const uint OpenSkyNet::Utils::MAX_3D_COMPONENT_KEY = 1024

A key can be made up of x, y, and z components but all components must still be stored in an unsigned int. Therefore, each component has a max of 10 bits (1024 in base 10).