General

Description

General utility functionality that doesn't fit in any other category.

Classes

class  Any
 Class capable of storing any general type, and safely extracting the proper type from the internal data. More...
 
union  Float754
 Floating point number broken down into components for easier access. More...
 
union  Float10
 10-bit floating point number broken down into components for easier access. More...
 
union  Float11
 11-bit floating point number broken down into components for easier access. More...
 
class  Bitwise
 Class for manipulating bit patterns. More...
 
class  DynLib
 Class that holds data about a dynamic library. More...
 
class  DynLibManager
 This manager keeps a track of all the open dynamic-loading libraries, opens them and returns references to already-open libraries. More...
 
class  HEvent
 Event handle. More...
 
class  Event< Signature >
 Events allows you to register method callbacks that get notified when the event is triggered. More...
 
class  Event< RetType(Args...) >
 Events allows you to register method callbacks that get notified when the event is triggered. More...
 
class  Flags< Enum, Storage >
 Wrapper around an enum that allows simple use of bitwise logic operations. More...
 
class  MessageHandler
 Allows you to transparently pass messages between different systems. More...
 
class  MessageId
 Identifier for message used with the global messaging system. More...
 
class  HMessage
 Handle to a subscription for a specific message in the global messaging system. More...
 
class  Module< T >
 Represents one engine module. More...
 
class  INonCopyable
 Interface that prevents copies be made of any type that implements it. More...
 
class  PlatformUtility
 Provides access to various operating system specific utility functions. More...
 
struct  MACAddress
 Represents a MAC (ethernet) address. More...
 
class  ServiceLocator< T >
 A locator system that allows you to quickly find a service of a specific type. More...
 
class  Time
 Manages all time related functionality. More...
 
class  Timer
 Timer class used for querying high precision timers. More...
 

Macros

#define DYNLIB_HANDLE   void*
 
#define DYNLIB_LOAD(a)   dlopen( a, RTLD_LAZY | RTLD_GLOBAL)
 
#define DYNLIB_GETSYM(a, b)   dlsym( a, b )
 
#define DYNLIB_UNLOAD(a)   dlclose( a )
 
#define BS_FLAGS_OPERATORS(Enum)   BS_FLAGS_OPERATORS_EXT(Enum, UINT32)
 Defines global operators for a Flags<Enum, Storage> implementation. More...
 
#define BS_FLAGS_OPERATORS_EXT(Enum, Storage)
 Defines global operators for a Flags<Enum, Storage> implementation. More...
 

Enumerations

enum  FileDialogType {
  OpenFile = 0x0, OpenFolder = 0x1, Save = 0x2, Multiselect = 0x10000,
  TypeMask = 0xFFFF
}
 Possible type of platform file dialogs. More...
 

Functions

template<typename ValueType >
ValueType * any_cast (Any *operand)
 Returns a pointer to the internal data of the specified type. More...
 
template<typename ValueType >
const ValueType * any_cast (const Any *operand)
 Returns a const pointer to the internal data of the specified type. More...
 
template<typename ValueType >
ValueType any_cast (const Any &operand)
 Returns a copy of the internal data of the specified type. More...
 
template<typename ValueType >
ValueType any_cast (Any &operand)
 Returns a copy of the internal data of the specified type. More...
 
template<typename ValueType >
const ValueType & any_cast_ref (const Any &operand)
 Returns a reference to the internal data of the specified type. More...
 
template<typename ValueType >
ValueType & any_cast_ref (Any &operand)
 Returns a reference to the internal data of the specified type. More...
 
template<typename ValueType >
ValueType * any_cast_unsafe (Any *operand)
 Casts a type without performing any kind of checks. More...
 
template<typename ValueType >
const ValueType * any_cast_unsafe (const Any *operand)
 Casts a type without performing any kind of checks. More...
 
BS_UTILITY_EXPORT DynLibManager & gDynLibManager ()
 Easy way of accessing DynLibManager. More...
 
void BS_UTILITY_EXPORT sendMessage (MessageId message)
 Sends a message using the global messaging system. More...
 
BS_UTILITY_EXPORT Time & gTime ()
 Easier way to access the Time module. More...
 
template<class T >
void hash_combine (std::size_t &seed, const T &v)
 Generates a new hash for the provided type using the default standard hasher and combines it with a previous hash. More...
 
String BS_UTILITY_EXPORT md5 (const WString &source)
 Generates an MD5 hash string for the provided source string. More...
 
String BS_UTILITY_EXPORT md5 (const String &source)
 Generates an MD5 hash string for the provided source string. More...
 
template<class T >
void bs_zero_out (T &s)
 Sets contents of a struct to zero. More...
 
template<class T , size_t N>
void bs_zero_out (T(&arr)[N])
 Sets contents of a static array to zero. More...
 
template<class T >
void bs_zero_out (T *arr, size_t count)
 Sets contents of a block of memory to zero. More...
 

Macro Definition Documentation

#define BS_FLAGS_OPERATORS (   Enum)    BS_FLAGS_OPERATORS_EXT(Enum, UINT32)

Defines global operators for a Flags<Enum, Storage> implementation.

#define BS_FLAGS_OPERATORS_EXT (   Enum,
  Storage 
)
Value:
inline Flags<Enum, Storage> operator|(Enum a, Enum b) { Flags<Enum, Storage> r(a); r |= b; return r; } \
inline Flags<Enum, Storage> operator&(Enum a, Enum b) { Flags<Enum, Storage> r(a); r &= b; return r; } \
inline Flags<Enum, Storage> operator~(Enum a) { return ~Flags<Enum, Storage>(a); }

Defines global operators for a Flags<Enum, Storage> implementation.

Enumeration Type Documentation

enum FileDialogType
strong

Possible type of platform file dialogs.

Function Documentation

ValueType* bs::any_cast ( Any operand)

Returns a pointer to the internal data of the specified type.

Note
Will return null if cast fails.
const ValueType* bs::any_cast ( const Any operand)

Returns a const pointer to the internal data of the specified type.

Note
Will return null if cast fails.
ValueType bs::any_cast ( const Any operand)

Returns a copy of the internal data of the specified type.

Note
Throws an exception if cast fails.
ValueType bs::any_cast ( Any operand)

Returns a copy of the internal data of the specified type.

Note
Throws an exception if cast fails.
const ValueType& bs::any_cast_ref ( const Any operand)

Returns a reference to the internal data of the specified type.

Note
Throws an exception if cast fails.
ValueType& bs::any_cast_ref ( Any operand)

Returns a reference to the internal data of the specified type.

Note
Throws an exception if cast fails.
ValueType* bs::any_cast_unsafe ( Any operand)

Casts a type without performing any kind of checks.

const ValueType* bs::any_cast_unsafe ( const Any operand)

Casts a type without performing any kind of checks.

void bs::bs_zero_out ( T &  s)

Sets contents of a struct to zero.

void bs::bs_zero_out ( T(&)  arr[N])

Sets contents of a static array to zero.

void bs::bs_zero_out ( T *  arr,
size_t  count 
)

Sets contents of a block of memory to zero.

BS_UTILITY_EXPORT DynLibManager& bs::gDynLibManager ( )

Easy way of accessing DynLibManager.

BS_UTILITY_EXPORT Time& bs::gTime ( )

Easier way to access the Time module.

void bs::hash_combine ( std::size_t &  seed,
const T &  v 
)

Generates a new hash for the provided type using the default standard hasher and combines it with a previous hash.

String BS_UTILITY_EXPORT bs::md5 ( const WString source)

Generates an MD5 hash string for the provided source string.

String BS_UTILITY_EXPORT bs::md5 ( const String source)

Generates an MD5 hash string for the provided source string.

void BS_UTILITY_EXPORT bs::sendMessage ( MessageId  message)

Sends a message using the global messaging system.

Note
Sim thread only.