i6engine  1.0
i6e::utils Namespace Reference

Namespaces

 exceptions
 
 profiling
 

Classes

class  AutoUpdater
 
class  Clock
 
class  DoubleBufferQueue
 
class  Future
 class for returning a result before it is ready More...
 
struct  Hints
 
class  Random
 creates random numbers More...
 
class  RangedMap
 
class  RealTimeClock
 
class  Semaphore
 
class  sequence_map
 A map with linear access time and an iterator iterating through the elements in creation time. This map is intended for fast accessing complexity with preserving insertion order

Operation Time Desc.
Insert O(1)
Access O(1)
erase(key) O(n) maybe improvable when storing iterators not pointers
erase(iterator) O(n) O(1) as soon as stdlib++ allows const_iterator in erase (bug)
More...
 
class  sharedPtr
 A shared pointer counting references and adds objects being not referenced any more to an internal list required external call of clear to delete all objects, no automatic deletion to stay threadsafe T = type of the pointer, U = base type of the pointer. More...
 
struct  sharedPtrWrapper
 struct handling threadsafe destruction of the wrapped pointer More...
 
class  Singleton
 Derive from this templated class to make a class a singleton. Refer to the Singleton Design Pattern if it is not clear what a singleton is. Declare the ctor private but destructor public (because of destruction is handled by shared_ptr) T = type of new Singleton class Dependencies = dependencies of this Singleton, will be initialized before this Singleton is initialized and destroyed after this one is destroyed. More...
 
class  Splash
 Opens and displays JPEG (Linux) or BMP (Windows) images as splash screens. More...
 
class  weakPtr
 A weak pointer observing a sharedPtr. More...
 

Enumerations

enum  LogLevel : short {
  LogLevel::LOGDEBUG, LogLevel::LOGINFO, LogLevel::LOGWARN, LogLevel::LOGERROR,
  LogLevel::LOGFATAL, LogLevel::LOGNONE
}
 Defines values to specify severity/importance of log message. More...
 

Functions

std::vector< std::string > split (const std::string &str, const std::string &delim)
 returns a vector of strings separated by the given delimitter e.g. a;b;c with delimitter ; will return a vector containing a, b and c More...
 
template<typename T >
std::enable_if< std::is_floating_point< T >::value, std::string >::type to_string_with_precision (const T a_value, const int n)
 returns a string from a floating point value with given precision More...
 
template<typename T1 , typename T2 , typename U >
sharedPtr< T1, U > dynamic_pointer_cast (const sharedPtr< T2, U > &base)
 casts a sharedPtr of dynamic type T2 to dynamic type T1 More...
 
template<typename T , typename U , typename... Args>
sharedPtr< T, U > make_shared (Args &&...)
 
template<typename T , typename U , typename... Args>
sharedPtr< T, U > make_shared (Args &&...args)
 creates a new sharedPtr with dynamic type T and static type U, Args are constructor arguments More...
 
template<class T , class U >
T * get_pointer (const sharedPtr< T, U > &p)
 gets pointer of a shared pointer necessary for luabind and boost::python More...
 

Variables

static const std::string logEnumNames []
 

Function Documentation

template<typename T1 , typename T2 , typename U >
sharedPtr< T1, U > i6e::utils::dynamic_pointer_cast ( const sharedPtr< T2, U > &  base)

casts a sharedPtr of dynamic type T2 to dynamic type T1

Definition at line 245 of file sharedPtr.h.

template<class T , class U >
T* i6e::utils::get_pointer ( const sharedPtr< T, U > &  p)

gets pointer of a shared pointer necessary for luabind and boost::python

Definition at line 271 of file sharedPtr.h.

template<typename T , typename U , typename... Args>
sharedPtr<T, U> i6e::utils::make_shared ( Args &&  ...)
template<typename T , typename U , typename... Args>
sharedPtr<T, U> i6e::utils::make_shared ( Args &&...  args)

creates a new sharedPtr with dynamic type T and static type U, Args are constructor arguments

Definition at line 258 of file sharedPtr.h.

std::vector<std::string> i6e::utils::split ( const std::string &  str,
const std::string &  delim 
)
inline

returns a vector of strings separated by the given delimitter e.g. a;b;c with delimitter ; will return a vector containing a, b and c

Definition at line 42 of file i6eString.h.

template<typename T >
std::enable_if<std::is_floating_point<T>::value, std::string>::type i6e::utils::to_string_with_precision ( const T  a_value,
const int  n 
)

returns a string from a floating point value with given precision

Definition at line 69 of file i6eString.h.

Variable Documentation

const std::string i6e::utils::logEnumNames[]
static

Definition at line 90 of file Logger.h.