mbo Namespace Reference

Utility classes and functions by M. Börger. More...


Classes

struct  arg_info
 Function argument type information (default copy by value). More...
struct  arg_info< _Targ *, _Tvar * >
 Function argument type information (for pointers). More...
struct  arg_info< _Targ &, _Tvar & >
 Function argument type information (for references). More...
struct  arg_info< void, void >
 Function argument type void (to suppress warnings). More...
struct  const_arg_info
 Function argument type (for const types). More...
struct  copy_arg_info
 Function argument type (when using copies). More...
struct  copy_arg_info< _Type * >
 Function argument type (copies for *: from const* -> *). More...
struct  copy_arg_info< _Type & >
 Function argument type (copies for &: from const& -> volatile). More...
struct  copy_arg_info< const _Type * >
 Function argument type (copies for const *: from const* -> const*). More...
struct  copy_arg_info< const _Type & >
 Function argument type (copies for const &: from const& -> const&). More...
struct  func_type_info_t
 function adapter info More...
struct  obj_func_t
 object function adapter More...
struct  obj_func_t< const _Ty, _Tret, _Targ >
struct  obj_func_1_t
struct  obj_func_1_t< const _Ty, _Tret, _Targ, _Targ2 >
struct  obj_func_2_t
struct  obj_func_2_t< const _Ty, _Tret, _Targ, _Targ2, _Targ3 >
struct  all_of_t
 all_of function adapter More...
struct  any_of_t
 any_of function adapter More...
struct  pair_first_func_t
 pair.first function adapter More...
struct  pair_second_func_t
 pair.second function adapter More...
struct  map_value_func_t
 function call on map value More...
struct  map_value_func_t< _Tret, _Tkey, _Tval * >
 function call on map value where value type is a pointer More...
struct  const_map_value_func_t
 const function call on map value More...
struct  const_map_value_func_t< _Tret, _Tkey, _Tval * >
 const function call on map value where value type is a pointer More...
struct  value_func_t
 function adapter for reference to member functions More...
struct  value_func_t< _Tret, _Ty * >
 function adapter for pointer to member functions More...
struct  const_value_func_t
 function adapter for const reference to member const functions More...
struct  const_value_func_t< _Tret, _Ty * >
 function adapter for const pointer to member const functions More...
struct  value_func_1_t
 function adapter for reference to member functions taking 1 argument More...
struct  value_func_1_t< _Tret, _Ty *, _Targ1 >
 function adapter for pointer to member functions taking 1 argument More...
struct  const_value_func_1_t
 function adapter for const reference to member const functions taking 1 argument More...
struct  const_value_func_1_t< _Tret, _Ty *, _Targ1 >
 function adapter for const pointer to member const functions taking 1 argument More...
struct  value_func_2_t
 function adapter for reference to member functions taking 2 arguments More...
struct  value_func_2_t< _Tret, _Ty *, _Targ1, _Targ2 >
 function adapter for pointer to member functions taking 2 arguments More...
struct  const_value_func_2_t
 function adapter for const reference to member const functions taking 2 arguments More...
struct  const_value_func_2_t< _Tret, _Ty *, _Targ1, _Targ2 >
 function adapter for const pointer to member const functions taking 2 arguments More...
struct  value_func_3_t
 function adapter for reference to member functions taking 3 arguments More...
struct  value_func_3_t< _Tret, _Ty *, _Targ1, _Targ2, _Targ3 >
 function adapter for pointer to member functions taking 3 arguments More...
struct  const_value_func_3_t
 function adapter for const reference to member const functions taking 3 arguments More...
struct  const_value_func_3_t< _Tret, _Ty *, _Targ1, _Targ2, _Targ3 >
 function adapter for const pointer to member const functions taking 3 arguments More...
struct  value_func_4_t
 function adapter for reference to member functions taking 4 arguments More...
struct  value_func_4_t< _Tret, _Ty *, _Targ1, _Targ2, _Targ3, _Targ4 >
 function adapter for pointer to member functions taking 4 arguments More...
struct  const_value_func_4_t
 function adapter for const reference to member const functions taking 4 arguments More...
struct  const_value_func_4_t< _Tret, _Ty *, _Targ1, _Targ2, _Targ3, _Targ4 >
 function adapter for const pointer to member const functions taking 4 arguments More...
struct  value_func_5_t
 function adapter for reference to member functions taking 5 arguments More...
struct  value_func_5_t< _Tret, _Ty *, _Targ1, _Targ2, _Targ3, _Targ4, _Targ5 >
 function adapter for pointer to member functions taking 5 arguments More...
struct  const_value_func_5_t
 function adapter for const reference to member const functions taking 5 arguments More...
struct  const_value_func_5_t< _Tret, _Ty *, _Targ1, _Targ2, _Targ3, _Targ4, _Targ5 >
 function adapter for const pointer to member const functions taking 5 arguments More...
class  mbo_stack_trace
 Stack Trace storage. More...
class  mbo_exception
 Stack Trace logging exception adapter. More...
class  MboDrawWin
 A draw window independant from main application. More...
class  CIniData
 Storage/Retrieval of Initialisation data. More...
class  LockedVar
 locked variable More...
class  LockedVar< bool >
 locked boolean variable More...
class  MatrixException
 Matrix exception class. More...
class  Matrix
 Matrix class. More...
class  Vector
class  CMemDC
 Memory DC wrapper. More...
struct  RefCntRep
 Reference counted pointer representation. More...
class  NullPointer
 Incomplete null pointer type. More...
struct  AutoFastLock
struct  AutoFastLock< MultiThreadedModel, SingleThreadedModel >
struct  AutoFastLock< SingleThreadedModel, MultiThreadedModel >
struct  AutoFastLock< SingleThreadedModel, SingleThreadedModel >
class  RefCntPtr
 Reference counted pointer. More...
class  RefCntConstPtr
 Reference counted const pointer. More...
struct  less_ic
class  CStrList
 default CStr container More...
class  CStrMap
 map2 using CStr as Key type (case insenstive) More...
class  CStrMapStr
 map2 using CStr as Key type (case insensitive) and as Value type More...
class  ILock
 Lock interface. More...
class  IEvent
 Event implementation. More...
class  ICriticalSection
 Critical Section Interface. More...
class  IMutex
 Mutex Interface. More...
class  CLockFake
 Fake Lock implementation. More...
class  CLockSingle
 Single-Lock implementation. More...
class  CAlreadyEntered
 lock used with CPotentialLock More...
class  CPotentialLock
 Lock that might be entered. More...
class  CLock
class  CEventImpl
 Event implementation. More...
class  CEventFake
 Event emulation. More...
class  CCriticalSectionImpl
 Critical Section Implementation. More...
class  CCriticalSectionFake
 Critical Section Fake. More...
class  CMutexImpl
 Mutex implementation. More...
class  CMutexFake
 Mutex emulation. More...
class  MutexList
 MutexList implementation. More...
class  CLockMulti
 Multi-Lock implementation. More...
class  CUnlock
 Automatic local Lock unlock. More...
class  MboThread
 A basic thread implementation. More...
class  MboIntervalThread
 An interval thread implementation. More...
class  MboEventThread
 An event driven thread implementation. More...
class  MboDelayedEventThread
 An event driven thread implementation. More...
class  MboWinMsgHandler
 Windows message handler thread. More...
class  string_conversion_error
struct  quaternion
 quaternion More...
class  allocator
 Allocator base using uninitalized memory. More...
class  reallocator
 Allocator that supports reallocation. More...
class  mem_reallocator
 Allocator that supports reallocation working on malloc(). More...
class  TDependentValues
 array of dependent values More...
class  TDynamicArray
 dynamic array More...
struct  triplet
 triplet More...
class  TStaticArray
 static sized array of __ValueType More...
class  TStaticArrayEx
 static sized array of __ValueType More...

Namespaces

namespace  MultiThreaded
 A namespace consistent of classes used in/for multithreaded environments.
namespace  SingleThreaded
 A namespace consistent of classes used in/for NON multithreaded environments.

Typedefs

typedef void(* OutputDebugFunc )(const std::string &, void *)
typedef mbo_exception
< std::exception, char * > 
exception
typedef mbo_exception
< std::bad_alloc, char * > 
bad_alloc
typedef mbo_exception
< std::domain_error > 
domain_error
typedef mbo_exception
< std::invalid_argument > 
invalid_argument
typedef mbo_exception
< std::length_error > 
length_error
typedef mbo_exception
< std::logic_error > 
logic_error
typedef mbo_exception
< std::out_of_range > 
out_of_range
typedef mbo_exception
< std::overflow_error > 
overflow_error
typedef mbo_exception
< std::range_error > 
range_error
typedef mbo_exception
< std::runtime_error > 
runtime_error
typedef mbo_exception
< std::underflow_error > 
underflow_error
typedef std::list< std::pair
< MboString, MboString > > 
CIniSectionList
typedef LONG IncDecVal
typedef SingleThreaded::ThreadModel ThreadModel
typedef
ThreadModel::CriticalSection 
CriticalSection
typedef ThreadModel::EventModel EventModel
typedef ThreadModel::MutexModel MutexModel
typedef ThreadModel::LockSingle LockSingle
typedef ThreadModel::LockMulti LockMulti
typedef ThreadModel::Lock Lock
typedef ThreadModel::Unlock Unlock
typedef SingleThreaded::ThreadModel SingleThreadedModel
 Class that defines types to be used in/for thread-safe environments.
typedef MultiThreaded::ThreadModel MultiThreadedModel
 Class that defines types to be used in/for NON thread-safe environments.
typedef char TCHAR
typedef std::basic_string< TCHARtstring
typedef mbo::tstring MboString

Enumerations

enum  DRAW_MODE {
  DRAW_MODE_FILL,
  DRAW_MODE_TRANSPARENT,
  DRAW_MODE_HS_BDIAGONAL,
  DRAW_MODE_HS_CROSS,
  DRAW_MODE_HS_DIAGCROSS,
  DRAW_MODE_HS_FDIAGONAL,
  DRAW_MODE_HS_HORIZONTAL,
  DRAW_MODE_HS_VERTICAL
}

Functions

template<typename _Ty, typename _Tret, typename _Targ>
obj_func_t< _Ty, typename
_Tret, typename _Targ > 
obj_func (_Ty &obj, _Tret(_Ty::*func)(_Targ))
 object function call adapter creator
template<typename _Ty, typename _Tret, typename _Targ>
obj_func_t< const _Ty,
typename _Tret, typename
_Targ > 
obj_func (const _Ty &obj, _Tret(_Ty::*func)(_Targ) const)
 object function call adapter creator
template<typename _Ty, typename _Tret, typename _Targ, typename _Targ2>
obj_func_1_t< _Ty, typename
_Tret, typename _Targ,
typename _Targ2 > 
obj_func (_Ty &obj, _Tret(_Ty::*func)(_Targ, _Targ2), _Targ2 arg2)
 object function call adapter creator for one additional parameter
template<typename _Ty, typename _Tret, typename _Targ, typename _Targ2>
obj_func_1_t< const _Ty,
typename _Tret, typename
_Targ, typename _Targ2 > 
obj_func (const _Ty &obj, _Tret(_Ty::*func)(_Targ, _Targ2) const, _Targ2 arg2)
 object function call adapter creator for one additional parameter
template<typename _Ty, typename _Tret, typename _Targ, typename _Targ2, typename _Targ3>
obj_func_2_t< _Ty, typename
_Tret, typename _Targ,
typename _Targ2, typename
_Targ3 > 
obj_func (_Ty &obj, _Tret(_Ty::*func)(_Targ, _Targ2, _Targ3), typename arg_info< _Targ2 >::argument_t arg2, typename arg_info< _Targ3 >::argument_t arg3)
 object function call adapter creator for one additional parameter
template<typename _Ty, typename _Tret, typename _Targ, typename _Targ2, typename _Targ3>
obj_func_2_t< const _Ty,
typename _Tret, typename
_Targ, typename _Targ2,
typename _Targ3 > 
obj_func (const _Ty &obj, _Tret(_Ty::*func)(_Targ, _Targ2, _Targ3) const, typename arg_info< _Targ2 >::argument_t arg2, typename arg_info< _Targ3 >::argument_t arg3)
 object function call adapter creator for one additional parameter
template<typename _Tfunc>
all_of_t< _Tfunc, typename
_Tfunc::argument_type > 
all_of_func (_Tfunc func)
 all-of function adapter creator
template<typename _Tfunc>
any_of_t< _Tfunc, typename
_Tfunc::argument_type > 
any_of_func (_Tfunc func)
 any-of function adapter creator
template<typename _Tpair, typename _Tfunc>
pair_first_func_t< _Tpair, _Tfunc > pair_first_func (_Tfunc func)
 pair.first function call adapter creator
template<typename _Tpair, typename _Tret, typename _Tfunc>
pair_second_func_t< _Tpair,
_Tret, _Tfunc > 
pair_second_func (_Tfunc func)
 pair.second function call adapter creator
template<typename _Tret, typename _Tkey, typename _Tval>
map_value_func_t< _Tret, _Tkey,
_Tval > 
map_value_func (typename map_value_func_t< _Tret, _Tkey, _Tval >::func_t func)
 map value function call adapter creator
template<typename _Tret, typename _Tkey, typename _Tval>
const_map_value_func_t< _Tret,
_Tkey, _Tval > 
map_value_func (typename const_map_value_func_t< _Tret, _Tkey, _Tval >::func_t func)
 map value function call adapter creator
template<typename _Tret, typename _Ty>
value_func_t< _Tret, _Ty > value_func (_Tret(_Ty::*func)())
 member function call adapter creator
template<typename _Tret, typename _Ty, typename _Targ1>
value_func_1_t< _Tret, _Ty,
_Targ1 > 
value_func (_Tret(_Ty::*func)(_Targ1))
 member function call adapter creator
template<typename _Tret, typename _Ty, typename _Targ1, typename _Targ2>
value_func_2_t< _Tret, _Ty,
_Targ1, _Targ2 > 
value_func (_Tret(_Ty::*func)(_Targ1, _Targ2))
 member function call adapter creator
template<typename _Tret, typename _Ty, typename _Targ1, typename _Targ2, typename _Targ3>
value_func_3_t< _Tret, _Ty,
_Targ1, _Targ2, _Targ3 > 
value_func (_Tret(_Ty::*func)(_Targ1, _Targ2, _Targ3))
 member function call adapter creator
template<typename _Tcontainer, typename _Tfunc>
_Tfunc for_all (_Tcontainer &cont, _Tfunc func)
 execute a function for all members of a container
template<typename _Tcontainer, typename _Tfunc>
bool all_of (_Tcontainer &cont, _Tfunc func)
 execute a bool function and return whether all returned true
template<typename _Tcontainer, typename _Tfunc>
bool any_of (_Tcontainer &cont, _Tfunc func)
 execute a bool function and return whether any returned true
template<typename _Tret, typename _Tmap, typename _Tval>
void for_all_map_val (_Tmap &cont, _Tret(_Tval::*func)())
 execute a function for all values of a map
template<typename _Tret, typename _Tmap, typename _Tval>
void for_all_map_val (const _Tmap &cont, _Tret(_Tval::*func)() const)
 execute a const function for all values of a map
template<typename _Tmap, typename _Tfunc>
_Tfunc for_all_map_first (_Tmap &cont, _Tfunc func)
 execute a function with all values of a map
template<typename _Tmap, typename _Tfunc>
_Tfunc for_all_map_second (_Tmap &cont, _Tfunc func)
 execute a function with all values of a map
template<typename _Tmap, typename _Tfunc>
bool all_of_map_second (_Tmap &cont, _Tfunc func)
 execute a bool function for all values of a map and return whether all returned true
template<typename _Tmap, typename _Tfunc>
bool any_of_map_second (_Tmap &cont, _Tfunc func)
 execute a bool function for all values of a map and return whether any returned true
template<typename _Tret, typename _Tcontainer, typename _Tval>
void for_all_val (_Tcontainer &cont, _Tret(_Tval::*func)())
 execute a function for all values of a container
template<typename _Targ1, typename _Tret, typename _Tcontainer, typename _Tval>
void for_all_val (_Tcontainer &cont, _Tret(_Tval::*func)(_Targ1), typename arg_info< _Targ1 >::argument_t arg1)
 execute a function taking one argument for all values of a container
template<typename _Targ1, typename _Targ2, typename _Tret, typename _Tcontainer, typename _Tval>
void for_all_val (_Tcontainer &cont, _Tret(_Tval::*func)(_Targ1, _Targ2), typename arg_info< _Targ1 >::argument_t arg1, typename arg_info< _Targ2 >::argument_t arg2)
 execute a function taking two arguments for all values of a container
template<typename _Targ1, typename _Targ2, typename _Targ3, typename _Tret, typename _Tcontainer, typename _Tval>
void for_all_val (_Tcontainer &cont, _Tret(_Tval::*func)(_Targ1, _Targ2, _Targ3), typename arg_info< _Targ1 >::argument_t arg1, typename arg_info< _Targ2 >::argument_t arg2, typename arg_info< _Targ3 >::argument_t arg3)
 execute a function taking three arguments for all values of a container
template<typename _Targ1, typename _Targ2, typename _Targ3, typename _Targ4, typename _Tret, typename _Tcontainer, typename _Tval>
void for_all_val (_Tcontainer &cont, _Tret(_Tval::*func)(_Targ1, _Targ2, _Targ3, _Targ4), typename arg_info< _Targ1 >::argument_t arg1, typename arg_info< _Targ2 >::argument_t arg2, typename arg_info< _Targ3 >::argument_t arg3, typename arg_info< _Targ4 >::argument_t arg4)
 execute a function taking three arguments for all values of a container
template<typename _Targ1, typename _Targ2, typename _Targ3, typename _Targ4, typename _Targ5, typename _Tret, typename _Tcontainer, typename _Tval>
void for_all_val (_Tcontainer &cont, _Tret(_Tval::*func)(_Targ1, _Targ2, _Targ3, _Targ4, _Targ5), typename arg_info< _Targ1 >::argument_t arg1, typename arg_info< _Targ2 >::argument_t arg2, typename arg_info< _Targ3 >::argument_t arg3, typename arg_info< _Targ4 >::argument_t arg4, typename arg_info< _Targ5 >::argument_t arg5)
 execute a function taking three arguments for all values of a container
std::string MboGetErrorText (DWORD dwLastError)
std::string vstrprintf (const char *szFormat, va_list vargs)
std::string strprintf (const char *szFormat,...)
void OutputDebugTrace (int nSkip=2)
 Output a debug trace using OutputDebugString().
std::string CreateDebugTrace (int nSkip=2)
 
Returns:
a debug trace

int FilterExceptionAndTraceInfoEx (unsigned int code, const struct _EXCEPTION_POINTERS *ep, const char *szFile, int nLine, const char *szFormat,...)
 Filter function for __try {} __except() {}.
int FilterExceptionAndTraceEx (unsigned int code, const struct _EXCEPTION_POINTERS *ep, const char *szFile, int nLine)
 Filter function for __try {} __except() {}.
template<class _E, class _Tr, class _A>
COLORREF StrToColor (const std::basic_string< _E, _Tr, _A > &str, COLORREF colDefault)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > & StrFromColor (std::basic_string< _E, _Tr, _A > &str, COLORREF col)
template<class _Ty, size_t _Cols, size_t _Rows>
istream & operator>> (istream &in, Matrix< _Ty, _Cols, _Rows > &m)
template<class _Ty, size_t _Cols, size_t _Rows>
ostream & operator<< (ostream &out, Matrix< _Ty, _Cols, _Rows > &m)
template<class _Ty, size_t _Cols, size_t _Rows>
bool operator== (const Matrix< _Ty, _Cols, _Rows > &lhs, const Matrix< _Ty, _Cols, _Rows > &rhs)
template<class _E>
_E * StrUpper (_E *str)
template<>
char * StrUpper (char *str)
template<>
unsigned char * StrUpper (unsigned char *str)
template<>
wchar_t * StrUpper (wchar_t *str)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > & StrUpper (std::basic_string< _E, _Tr, _A > &str)
template<class _E>
_E * StrLower (_E *str)
template<>
char * StrLower (char *str)
template<>
unsigned char * StrLower (unsigned char *str)
template<>
wchar_t * StrLower (wchar_t *str)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > & StrLower (std::basic_string< _E, _Tr, _A > &str)
template<class _E>
int StrCompareIC (const _E *lhs, const _E *rhs)
template<>
int StrCompareIC (const char *lhs, const char *rhs)
template<>
int StrCompareIC (const unsigned char *lhs, const unsigned char *rhs)
template<>
int StrCompareIC (const wchar_t *lhs, const wchar_t *rhs)
template<class _E, class _Tr, class _A>
int StrCompareIC (const std::basic_string< _E, _Tr, _A > &lhs, const _E *rhs)
template<class _E, class _Tr, class _A>
int StrCompareIC (const _E *lhs, const std::basic_string< _E, _Tr, _A > &rhs)
template<class _E, class _Tr, class _A>
int StrCompareIC (const std::basic_string< _E, _Tr, _A > &lhs, const std::basic_string< _E, _Tr, _A > &rhs)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > & StrTrimLeft (std::basic_string< _E, _Tr, _A > &str)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > & StrTrimRight (std::basic_string< _E, _Tr, _A > &str)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > & StrTrim (std::basic_string< _E, _Tr, _A > &str)
template<class _E, typename _ValType>
std::basic_string< _E > StrFrom (const _ValType &val)
template<>
std::basic_string< char > StrFrom (const int &val)
template<>
std::basic_string< char > StrFrom (const long &val)
template<>
std::basic_string< char > StrFrom (const bool &val)
template<typename _ValType, class _E, class _Tr, class _A>
_ValType StrTo (const std::basic_string< _E, _Tr, _A > &str)
template<class _E, class _Tr, class _A>
int StrToInt (const std::basic_string< _E, _Tr, _A > &str)
template<class _E, class _Tr, class _A>
long StrToLong (const std::basic_string< _E, _Tr, _A > &str)
template<class _E, class _Tr, class _A>
float StrToFloat (const std::basic_string< _E, _Tr, _A > &str)
template<>
float StrToFloat (const std::basic_string< char > &str)
template<class _E>
std::basic_string< _E > StrFromDouble (double val, int iWidth=-16, int iPrecision=10)
template<class _E>
std::basic_string< _E > StrFromFloat (double val, int iWidth=-10, int iPrecision=6)
template<class _E>
std::basic_string< _E > StrFromBool (bool val)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > StrUCFirst (const std::basic_string< _E, _Tr, _A > &str)
template<class _E, class _Tr, class _A>
bool StrStartsWith (const std::basic_string< _E, _Tr, _A > &str, const std::basic_string< _E, _Tr, _A > &strPrefix, bool bCaseSensitive=true)
template<class _E, class _Tr, class _A>
bool StrEndsWith (const std::basic_string< _E, _Tr, _A > &str, const std::basic_string< _E, _Tr, _A > &strPostfix, bool bCaseSensitive=true)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > LeftString (const std::basic_string< _E, _Tr, _A > &str, typename _A::size_type nLength, const std::basic_string< _E, _Tr, _A > *strMore=NULL, const std::basic_string< _E, _Tr, _A > *strAppend=NULL)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > LeftString (const std::basic_string< _E, _Tr, _A > &str, typename _A::size_type nLength, const std::basic_string< _E, _Tr, _A > &strMore)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > LeftString (const std::basic_string< _E, _Tr, _A > &str, typename _A::size_type nLength, const std::basic_string< _E, _Tr, _A > &strMore, const std::basic_string< _E, _Tr, _A > &strAppend)
template<class _E, class _Tr, class _A>
bool StrSplit (const std::basic_string< _E, _Tr, _A > &strValue, const std::basic_string< _E, _Tr, _A > &strSplit, std::basic_string< _E, _Tr, _A > &strLeft, std::basic_string< _E, _Tr, _A > &strRight, bool bTrim=false)
template<class _E, class _Tr, class _A>
size_t StrOccurences (std::basic_string< _E, _Tr, _A > &str, std::basic_string< _E, _Tr, _A > &strFind)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > & StrReplace (std::basic_string< _E, _Tr, _A > &str, const std::basic_string< _E, _Tr, _A > &strOld, const std::basic_string< _E, _Tr, _A > &strNew)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > & StrReplace (std::basic_string< _E, _Tr, _A > &str, const _E *strOld, const _E *strNew)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > StrEncodeXML (const std::basic_string< _E, _Tr, _A > &_str)
std::string & StrParseEnvVars (std::string &str, char cOpen, char cClose)
MboStringStrApplyReplaceMap (MboString &str, const mbo::CStrMapStr &msstrReplaceMap)
template<class _E>
const std::ctype< _E > & get_facet ()
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr, _A > StrCreate (const char *sz)
mbo::tstring TStrCreate (const char *sz)
std::basic_string< char > WStrToStr (const std::basic_string< wchar_t > &wstr)
std::basic_string< wchar_t > StrToWStr (const std::basic_string< char > &str)
template<typename _ValType>
tstring TStrFrom (const _ValType &val)
template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
bool __cdecl operator== (const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &lhs, const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
bool __cdecl operator!= (const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &lhs, const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
bool __cdecl operator< (const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &lhs, const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
bool __cdecl operator> (const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &lhs, const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
bool __cdecl operator<= (const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &lhs, const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
bool __cdecl operator>= (const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &lhs, const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
quaternion< _Ty1, _Ty2, _Ty3,
_Ty4 > __cdecl 
make_quaternion (_Ty1 val1, _Ty2 val2, _Ty3 val3, _Ty4 val4)
template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
void swap (quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &lhs, quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3>
bool __cdecl operator== (const triplet< _Ty1, _Ty2, _Ty3 > &lhs, const triplet< _Ty1, _Ty2, _Ty3 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3>
bool __cdecl operator!= (const triplet< _Ty1, _Ty2, _Ty3 > &lhs, const triplet< _Ty1, _Ty2, _Ty3 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3>
bool __cdecl operator< (const triplet< _Ty1, _Ty2, _Ty3 > &lhs, const triplet< _Ty1, _Ty2, _Ty3 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3>
bool __cdecl operator> (const triplet< _Ty1, _Ty2, _Ty3 > &lhs, const triplet< _Ty1, _Ty2, _Ty3 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3>
bool __cdecl operator<= (const triplet< _Ty1, _Ty2, _Ty3 > &lhs, const triplet< _Ty1, _Ty2, _Ty3 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3>
bool __cdecl operator>= (const triplet< _Ty1, _Ty2, _Ty3 > &lhs, const triplet< _Ty1, _Ty2, _Ty3 > &rhs)
template<typename _Ty1, typename _Ty2, typename _Ty3>
triplet< _Ty1, _Ty2, _Ty3 > __cdecl make_triplet (_Ty1 val1, _Ty2 val2, _Ty3 val3)
template<typename _Ty1, typename _Ty2, typename _Ty3>
void swap (triplet< _Ty1, _Ty2, _Ty3 > &lhs, triplet< _Ty1, _Ty2, _Ty3 > &rhs)

Variables

return true


Detailed Description

Utility classes and functions by M. Börger.

Note:
This namespace contains software distributed under the following license GNU Lesser General Public License, version 2.1.

Typedef Documentation

typedef mbo_exception<std::bad_alloc,char*> mbo::bad_alloc

Definition at line 189 of file MboDebugTrace.h.

typedef std::list<std::pair<MboString, MboString> > mbo::CIniSectionList

Definition at line 262 of file MboIniData.h.

typedef ThreadModel::CriticalSection mbo::CriticalSection

Critical Section

Definition at line 1451 of file MboSynch.h.

typedef mbo_exception<std::domain_error> mbo::domain_error

Definition at line 190 of file MboDebugTrace.h.

typedef ThreadModel::EventModel mbo::EventModel

Event

Definition at line 1452 of file MboSynch.h.

typedef mbo_exception<std::exception,char*> mbo::exception

Definition at line 188 of file MboDebugTrace.h.

typedef LONG mbo::IncDecVal

incrementation/decrementation type

Definition at line 249 of file MboSynch.h.

typedef mbo_exception<std::invalid_argument> mbo::invalid_argument

Definition at line 191 of file MboDebugTrace.h.

typedef mbo_exception<std::length_error> mbo::length_error

Definition at line 192 of file MboDebugTrace.h.

typedef ThreadModel::Lock mbo::Lock

Automatic local Lock

Definition at line 1456 of file MboSynch.h.

typedef ThreadModel::LockMulti mbo::LockMulti

Multi Lock

Definition at line 1455 of file MboSynch.h.

typedef ThreadModel::LockSingle mbo::LockSingle

Single Lock

Definition at line 1454 of file MboSynch.h.

typedef mbo_exception<std::logic_error> mbo::logic_error

Definition at line 193 of file MboDebugTrace.h.

typedef mbo::tstring mbo::MboString

Definition at line 67 of file MboTString.h.

typedef MultiThreaded::ThreadModel mbo::MultiThreadedModel

Class that defines types to be used in/for NON thread-safe environments.

Definition at line 1469 of file MboSynch.h.

typedef ThreadModel::MutexModel mbo::MutexModel

Mutex

Definition at line 1453 of file MboSynch.h.

typedef mbo_exception<std::out_of_range> mbo::out_of_range

Definition at line 194 of file MboDebugTrace.h.

typedef void(* mbo::OutputDebugFunc)(const std::string &, void *)

Definition at line 51 of file MboDebugTrace.h.

typedef mbo_exception<std::overflow_error> mbo::overflow_error

Definition at line 195 of file MboDebugTrace.h.

typedef mbo_exception<std::range_error> mbo::range_error

Definition at line 196 of file MboDebugTrace.h.

typedef mbo_exception<std::runtime_error> mbo::runtime_error

Definition at line 197 of file MboDebugTrace.h.

typedef SingleThreaded::ThreadModel mbo::SingleThreadedModel

Class that defines types to be used in/for thread-safe environments.

Definition at line 1465 of file MboSynch.h.

typedef char mbo::TCHAR

Definition at line 59 of file MboTString.h.

typedef SingleThreaded::ThreadModel mbo::ThreadModel

Definition at line 1442 of file MboSynch.h.

typedef std::basic_string<TCHAR> mbo::tstring

Definition at line 62 of file MboTString.h.

typedef mbo_exception<std::underflow_error> mbo::underflow_error

Definition at line 198 of file MboDebugTrace.h.

typedef ThreadModel::Unlock mbo::Unlock

Automatic local Lock unlock

Definition at line 1457 of file MboSynch.h.


Enumeration Type Documentation

enum mbo::DRAW_MODE

draw mode for inner shape (filled, transparent or hatched)

Enumerator:
DRAW_MODE_FILL  fill the shape
DRAW_MODE_TRANSPARENT  transparent (no filling or hatch)
DRAW_MODE_HS_BDIAGONAL  45-degree upward left-to-right hatch
DRAW_MODE_HS_CROSS  Horizontal and vertical crosshatch
DRAW_MODE_HS_DIAGCROSS  45-degree crosshatch
DRAW_MODE_HS_FDIAGONAL  45-degree downward left-to-right hatch
DRAW_MODE_HS_HORIZONTAL  Horizontal hatch
DRAW_MODE_HS_VERTICAL  Vertical hatch

Definition at line 107 of file MboDrawWin.h.


Function Documentation

template<typename _Tcontainer, typename _Tfunc>
bool mbo::all_of ( _Tcontainer &  cont,
_Tfunc  func 
) [inline]

execute a bool function and return whether all returned true

Definition at line 1341 of file for_all.h.

References for_all().

01342 {
01343     return for_all(cont, all_of_t<_Tfunc, _Tcontainer::value_type>(func));
01344 }

Here is the call graph for this function:

mbo::for_all

template<typename _Tfunc>
all_of_t<_Tfunc, typename _Tfunc::argument_type> mbo::all_of_func ( _Tfunc  func  )  [inline]

all-of function adapter creator

Definition at line 356 of file for_all.h.

Referenced by all_of_map_second().

00357 {
00358     return all_of_t<_Tfunc, typename _Tfunc::argument_type>(func);
00359 }

template<typename _Tmap, typename _Tfunc>
bool mbo::all_of_map_second ( _Tmap &  cont,
_Tfunc  func 
) [inline]

execute a bool function for all values of a map and return whether all returned true

Definition at line 1393 of file for_all.h.

References all_of_func(), and for_all().

01394 {
01395     return for_all(cont, all_of_func(pair_second_func<_Tmap::value_type, bool>(func)));
01396 }

Here is the call graph for this function:

mbo::all_of_funcmbo::for_all

template<typename _Tcontainer, typename _Tfunc>
bool mbo::any_of ( _Tcontainer &  cont,
_Tfunc  func 
) [inline]

execute a bool function and return whether any returned true

Definition at line 1349 of file for_all.h.

References for_all().

01350 {
01351     return for_all(cont, any_of_t<_Tcontainer::value_type, _Tfunc>(func));
01352 }

Here is the call graph for this function:

mbo::for_all

template<typename _Tfunc>
any_of_t<_Tfunc, typename _Tfunc::argument_type> mbo::any_of_func ( _Tfunc  func  )  [inline]

any-of function adapter creator

Definition at line 401 of file for_all.h.

Referenced by any_of_map_second().

00402 {
00403     return any_of_t<_Tfunc, typename _Tfunc::argument_type>(func);
00404 }

template<typename _Tmap, typename _Tfunc>
bool mbo::any_of_map_second ( _Tmap &  cont,
_Tfunc  func 
) [inline]

execute a bool function for all values of a map and return whether any returned true

Definition at line 1401 of file for_all.h.

References any_of_func(), and for_all().

01402 {
01403     return for_all(cont, any_of_func(pair_second_func<_Tmap::value_type, bool>(func)));
01404 }

Here is the call graph for this function:

mbo::any_of_funcmbo::for_all

std::string mbo::CreateDebugTrace ( int  nSkip = 2  ) 

Returns:
a debug trace

Parameters:
nSkip number of frames to skip. Since this function calles another function, you need to set this to 2 in order to avoid getting this call in the trace.

int mbo::FilterExceptionAndTraceEx ( unsigned int  code,
const struct _EXCEPTION_POINTERS *  ep,
const char *  szFile,
int  nLine 
)

Filter function for __try {} __except() {}.

Parameters:
code exception code, use GetExceptionCode()
ep exception info, use GetExceptionInformation()
szFile filename where the exception got caught, use __FILE__
nLine line-num where the exception got caught, use __LINE__

int mbo::FilterExceptionAndTraceInfoEx ( unsigned int  code,
const struct _EXCEPTION_POINTERS *  ep,
const char *  szFile,
int  nLine,
const char *  szFormat,
  ... 
)

Filter function for __try {} __except() {}.

Parameters:
code exception code, use GetExceptionCode()
ep exception info, use GetExceptionInformation()
szFile filename where the exception got caught, use __FILE__
nLine line-num where the exception got caught, use __LINE__
szFormat printf-like formatting string for additional info

template<typename _Tcontainer, typename _Tfunc>
_Tfunc mbo::for_all ( _Tcontainer &  cont,
_Tfunc  func 
) [inline]

execute a function for all members of a container

Definition at line 1333 of file for_all.h.

Referenced by all_of(), all_of_map_second(), any_of(), any_of_map_second(), for_all_map_first(), for_all_map_second(), for_all_map_val(), and for_all_val().

01334 {
01335     return std::for_each(cont.begin(), cont.end(), func);
01336 }

template<typename _Tmap, typename _Tfunc>
_Tfunc mbo::for_all_map_first ( _Tmap &  cont,
_Tfunc  func 
) [inline]

execute a function with all values of a map

Definition at line 1375 of file for_all.h.

References for_all().

01376 {
01377     for_all(cont, pair_first_func_t<_Tmap::value_type, void, _Tfunc>(func));
01378     return func;
01379 }

Here is the call graph for this function:

mbo::for_all

template<typename _Tmap, typename _Tfunc>
_Tfunc mbo::for_all_map_second ( _Tmap &  cont,
_Tfunc  func 
) [inline]

execute a function with all values of a map

Definition at line 1384 of file for_all.h.

References for_all().

01385 {
01386     for_all(cont, pair_second_func_t<_Tmap::value_type, void, _Tfunc>(func));
01387     return func;
01388 }

Here is the call graph for this function:

mbo::for_all

template<typename _Tret, typename _Tmap, typename _Tval>
void mbo::for_all_map_val ( const _Tmap &  cont,
_Tret(_Tval::*)() const   func 
) [inline]

execute a const function for all values of a map

Definition at line 1367 of file for_all.h.

References for_all().

01368 {
01369     for_all(cont, const_map_value_func_t<_Tret, _Tmap::key_type, _Tmap::mapped_type>(func));
01370 }

Here is the call graph for this function:

mbo::for_all

template<typename _Tret, typename _Tmap, typename _Tval>
void mbo::for_all_map_val ( _Tmap &  cont,
_Tret(_Tval::*)()  func 
) [inline]

execute a function for all values of a map

Definition at line 1359 of file for_all.h.

References for_all().

01360 {
01361     for_all(cont, map_value_func_t<_Tret, _Tmap::key_type, _Tmap::mapped_type>(func));
01362 }

Here is the call graph for this function:

mbo::for_all

template<typename _Targ1, typename _Targ2, typename _Targ3, typename _Targ4, typename _Targ5, typename _Tret, typename _Tcontainer, typename _Tval>
void mbo::for_all_val ( _Tcontainer &  cont,
_Tret(_Tval::*)(_Targ1, _Targ2, _Targ3, _Targ4, _Targ5)  func,
typename arg_info< _Targ1 >::argument_t  arg1,
typename arg_info< _Targ2 >::argument_t  arg2,
typename arg_info< _Targ3 >::argument_t  arg3,
typename arg_info< _Targ4 >::argument_t  arg4,
typename arg_info< _Targ5 >::argument_t  arg5 
) [inline]

execute a function taking three arguments for all values of a container

execute a const function taking three arguments for all values of a container

Definition at line 1545 of file for_all.h.

References for_all().

01554 {
01555     for_all(cont, value_func_5_t<_Tret, _Tcontainer::value_type, _Targ1, _Targ2, _Targ3, _Targ4, _Targ5>(func, arg1, arg2, arg3, arg4, arg5));
01556 }

Here is the call graph for this function:

mbo::for_all

template<typename _Targ1, typename _Targ2, typename _Targ3, typename _Targ4, typename _Tret, typename _Tcontainer, typename _Tval>
void mbo::for_all_val ( _Tcontainer &  cont,
_Tret(_Tval::*)(_Targ1, _Targ2, _Targ3, _Targ4)  func,
typename arg_info< _Targ1 >::argument_t  arg1,
typename arg_info< _Targ2 >::argument_t  arg2,
typename arg_info< _Targ3 >::argument_t  arg3,
typename arg_info< _Targ4 >::argument_t  arg4 
) [inline]

execute a function taking three arguments for all values of a container

execute a const function taking three arguments for all values of a container

Definition at line 1513 of file for_all.h.

References for_all().

01521 {
01522     for_all(cont, value_func_4_t<_Tret, _Tcontainer::value_type, _Targ1, _Targ2, _Targ3, _Targ4>(func, arg1, arg2, arg3, arg4));
01523 }

Here is the call graph for this function:

mbo::for_all

template<typename _Targ1, typename _Targ2, typename _Targ3, typename _Tret, typename _Tcontainer, typename _Tval>
void mbo::for_all_val ( _Tcontainer &  cont,
_Tret(_Tval::*)(_Targ1, _Targ2, _Targ3)  func,
typename arg_info< _Targ1 >::argument_t  arg1,
typename arg_info< _Targ2 >::argument_t  arg2,
typename arg_info< _Targ3 >::argument_t  arg3 
) [inline]

execute a function taking three arguments for all values of a container

execute a const function taking three arguments for all values of a container

Definition at line 1483 of file for_all.h.

References for_all().

01490 {
01491     for_all(cont, value_func_3_t<_Tret, _Tcontainer::value_type, _Targ1, _Targ2, _Targ3>(func, arg1, arg2, arg3));
01492 }

Here is the call graph for this function:

mbo::for_all

template<typename _Targ1, typename _Targ2, typename _Tret, typename _Tcontainer, typename _Tval>
void mbo::for_all_val ( _Tcontainer &  cont,
_Tret(_Tval::*)(_Targ1, _Targ2)  func,
typename arg_info< _Targ1 >::argument_t  arg1,
typename arg_info< _Targ2 >::argument_t  arg2 
) [inline]

execute a function taking two arguments for all values of a container

execute a const function taking two arguments for all values of a container

Definition at line 1455 of file for_all.h.

References for_all().

01461 {
01462     for_all(cont, value_func_2_t<_Tret, _Tcontainer::value_type, _Targ1, _Targ2>(func, arg1, arg2));
01463 }

Here is the call graph for this function:

mbo::for_all

template<typename _Targ1, typename _Tret, typename _Tcontainer, typename _Tval>
void mbo::for_all_val ( _Tcontainer &  cont,
_Tret(_Tval::*)(_Targ1)  func,
typename arg_info< _Targ1 >::argument_t  arg1 
) [inline]

execute a function taking one argument for all values of a container

execute a const function taking one argument for all values of a container

Definition at line 1429 of file for_all.h.

References for_all().

01434 {
01435     for_all(cont, value_func_1_t<_Tret, _Tcontainer::value_type, _Targ1>(func, arg1));
01436 }

Here is the call graph for this function:

mbo::for_all

template<typename _Tret, typename _Tcontainer, typename _Tval>
void mbo::for_all_val ( _Tcontainer &  cont,
_Tret(_Tval::*)()  func 
) [inline]

execute a function for all values of a container

execute a const function for all values of a container

Definition at line 1411 of file for_all.h.

References for_all().

01412 {
01413     for_all(cont, value_func_t<_Tret, _Tcontainer::value_type>(func));
01414 }

Here is the call graph for this function:

mbo::for_all

template<class _E>
const std::ctype<_E>& mbo::get_facet (  )  [inline]

Definition at line 93 of file MboTString.h.

References __USE_FACET, and MBO_MT_LOCAL_OR_STATIC.

00094 {
00095     MBO_MT_LOCAL_OR_STATIC const std::ctype<_E>& facet = std::use_facet<std::ctype<_E> >(std::locale::empty() __USE_FACET);
00096     return facet;
00097 }

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A> mbo::LeftString ( const std::basic_string< _E, _Tr, _A > &  str,
typename _A::size_type  nLength,
const std::basic_string< _E, _Tr, _A > &  strMore,
const std::basic_string< _E, _Tr, _A > &  strAppend 
) [inline]

Definition at line 561 of file MboStrHelper.h.

00567 {
00568     return LeftString<_E, _Tr, _A>(str, nLength, &strMore, &strAppend);
00569 }

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A> mbo::LeftString ( const std::basic_string< _E, _Tr, _A > &  str,
typename _A::size_type  nLength,
const std::basic_string< _E, _Tr, _A > &  strMore 
) [inline]

Definition at line 551 of file MboStrHelper.h.

00556 {
00557     return LeftString<_E, _Tr, _A>(str, nLength, &strMore, NULL);
00558 }

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A> mbo::LeftString ( const std::basic_string< _E, _Tr, _A > &  str,
typename _A::size_type  nLength,
const std::basic_string< _E, _Tr, _A > *  strMore = NULL,
const std::basic_string< _E, _Tr, _A > *  strAppend = NULL 
) [inline]

Definition at line 512 of file MboStrHelper.h.

00518 {
00519     if (str.length() > nLength && strMore && strMore->length())
00520     {
00521         if (strMore->length() >= nLength)
00522         {
00523             return strMore->substr(0, nLength);
00524         }
00525         else
00526         {
00527             return str.substr(0, nLength - strMore->length()) + *strMore;
00528         }
00529     }
00530     else
00531     {
00532         if (strAppend && strAppend->length())
00533         {
00534             /* direct return is impossible when using Rational tools */
00535             //return (str + *strAppend).substr(0, nLength);
00536             std::basic_string<_E, _Tr, _A>  strConcat = str + *strAppend;
00537             std::basic_string<_E, _Tr, _A>  strResult = strConcat.substr(0, nLength);
00538             return strResult;
00539         }
00540         else
00541         {
00542             /* direct return is impossible when using Rational tools */
00543             //return str.substr(0, nLength);
00544             std::basic_string<_E, _Tr, _A>  strResult = str.substr(0, nLength);
00545             return strResult;
00546         }
00547     }
00548 }

template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
quaternion<_Ty1, _Ty2, _Ty3, _Ty4> __cdecl mbo::make_quaternion ( _Ty1  val1,
_Ty2  val2,
_Ty3  val3,
_Ty4  val4 
) [inline]

Definition at line 124 of file quaternion.h.

00125 {
00126     return (quaternion<_Ty1, _Ty2, _Ty3, _Ty4>(val1, val2, val3, val4));
00127 }

template<typename _Ty1, typename _Ty2, typename _Ty3>
triplet<_Ty1, _Ty2, _Ty3> __cdecl mbo::make_triplet ( _Ty1  val1,
_Ty2  val2,
_Ty3  val3 
) [inline]

Definition at line 122 of file triplet.h.

00123 {
00124     return (triplet<_Ty1, _Ty2, _Ty3>(val1, val2, val3));
00125 }

template<typename _Tret, typename _Tkey, typename _Tval>
const_map_value_func_t<_Tret, _Tkey, _Tval> mbo::map_value_func ( typename const_map_value_func_t< _Tret, _Tkey, _Tval >::func_t  func  )  [inline]

map value function call adapter creator

Definition at line 1260 of file for_all.h.

01261 {
01262     return const_map_value_func_t<_Tret, _Tkey, _Tval>(func);
01263 }

template<typename _Tret, typename _Tkey, typename _Tval>
map_value_func_t<_Tret, _Tkey, _Tval> mbo::map_value_func ( typename map_value_func_t< _Tret, _Tkey, _Tval >::func_t  func  )  [inline]

map value function call adapter creator

Definition at line 1252 of file for_all.h.

01253 {
01254     return map_value_func_t<_Tret, _Tkey, _Tval>(func);
01255 }

std::string mbo::MboGetErrorText ( DWORD  dwLastError  ) 

template<typename _Ty, typename _Tret, typename _Targ, typename _Targ2, typename _Targ3>
obj_func_2_t<const _Ty, typename _Tret, typename _Targ, typename _Targ2, typename _Targ3> mbo::obj_func ( const _Ty &  obj,
_Tret(_Ty::*)(_Targ, _Targ2, _Targ3) const   func,
typename arg_info< _Targ2 >::argument_t  arg2,
typename arg_info< _Targ3 >::argument_t  arg3 
) [inline]

object function call adapter creator for one additional parameter

Definition at line 306 of file for_all.h.

00310 {
00311     return obj_func_2_t<const _Ty, _Tret, _Targ, _Targ2, _Targ3>(obj, func, arg2, arg3);
00312 }

template<typename _Ty, typename _Tret, typename _Targ, typename _Targ2, typename _Targ3>
obj_func_2_t<_Ty, typename _Tret, typename _Targ, typename _Targ2, typename _Targ3> mbo::obj_func ( _Ty &  obj,
_Tret(_Ty::*)(_Targ, _Targ2, _Targ3)  func,
typename arg_info< _Targ2 >::argument_t  arg2,
typename arg_info< _Targ3 >::argument_t  arg3 
) [inline]

object function call adapter creator for one additional parameter

Definition at line 294 of file for_all.h.

00298 {
00299     return obj_func_2_t<_Ty, _Tret, _Targ, _Targ2, _Targ3>(obj, func, arg2, arg3);
00300 }

template<typename _Ty, typename _Tret, typename _Targ, typename _Targ2>
obj_func_1_t<const _Ty, typename _Tret, typename _Targ, typename _Targ2> mbo::obj_func ( const _Ty &  obj,
_Tret(_Ty::*)(_Targ, _Targ2) const   func,
_Targ2  arg2 
) [inline]

object function call adapter creator for one additional parameter

Definition at line 285 of file for_all.h.

00286 {
00287     return obj_func_1_t<_Ty, _Tret, _Targ, _Targ2>(obj, func, arg2);
00288 }

template<typename _Ty, typename _Tret, typename _Targ, typename _Targ2>
obj_func_1_t<_Ty, typename _Tret, typename _Targ, typename _Targ2> mbo::obj_func ( _Ty &  obj,
_Tret(_Ty::*)(_Targ, _Targ2)  func,
_Targ2  arg2 
) [inline]

object function call adapter creator for one additional parameter

Definition at line 277 of file for_all.h.

00278 {
00279     return obj_func_1_t<_Ty, _Tret, _Targ, _Targ2>(obj, func, arg2);
00280 }

template<typename _Ty, typename _Tret, typename _Targ>
obj_func_t<const _Ty, typename _Tret, typename _Targ> mbo::obj_func ( const _Ty &  obj,
_Tret(_Ty::*)(_Targ) const   func 
) [inline]

object function call adapter creator

Definition at line 269 of file for_all.h.

00270 {
00271     return obj_func_t<_Ty, _Tret, _Targ>(obj, func);
00272 }

template<typename _Ty, typename _Tret, typename _Targ>
obj_func_t<_Ty, typename _Tret, typename _Targ> mbo::obj_func ( _Ty &  obj,
_Tret(_Ty::*)(_Targ)  func 
) [inline]

object function call adapter creator

Definition at line 261 of file for_all.h.

00262 {
00263     return obj_func_t<_Ty, _Tret, _Targ>(obj, func);
00264 }

template<typename _Ty1, typename _Ty2, typename _Ty3>
bool __cdecl mbo::operator!= ( const triplet< _Ty1, _Ty2, _Ty3 > &  lhs,
const triplet< _Ty1, _Ty2, _Ty3 > &  rhs 
) [inline]

Definition at line 89 of file triplet.h.

00090 {
00091     return (!(lhs == rhs));
00092 }

template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
bool __cdecl mbo::operator!= ( const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  lhs,
const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  rhs 
) [inline]

Definition at line 90 of file quaternion.h.

00091 {
00092     return (!(lhs == rhs));
00093 }

template<typename _Ty1, typename _Ty2, typename _Ty3>
bool __cdecl mbo::operator< ( const triplet< _Ty1, _Ty2, _Ty3 > &  lhs,
const triplet< _Ty1, _Ty2, _Ty3 > &  rhs 
) [inline]

Definition at line 95 of file triplet.h.

00096 {
00097     return lhs::pair < rhs::pair  ||
00098         (!(rhs.first < lhs.first) && lhs.second < rhs.second) ||
00099         (!(rhs.first < lhs.first) && !(rhs.second < lhs.second) && lhs.third < rhs.third)
00100         ;
00101 }

template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
bool __cdecl mbo::operator< ( const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  lhs,
const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  rhs 
) [inline]

Definition at line 96 of file quaternion.h.

00097 {
00098     return lhs::pair < rhs::pair  ||
00099         (!(rhs.first < lhs.first) && lhs.second < rhs.second) ||
00100         (!(rhs.first < lhs.first) && !(rhs.second < lhs.second) && lhs.third < rhs.third) ||
00101         (!(rhs.first < lhs.first) && !(rhs.second < lhs.second) && !(rhs.third < lhs.third) && lhs.forth < rhs.forth)
00102         ;
00103 }

template<class _Ty, size_t _Cols, size_t _Rows>
ostream& mbo::operator<< ( ostream &  out,
Matrix< _Ty, _Cols, _Rows > &  m 
) [inline]

Definition at line 195 of file MboMatrix.h.

References mbo::Matrix< _Ty, _Cols, _Rows >::Val.

00196 {
00197     for (size_t i=0; i < m.Row; i++)
00198     {
00199         for (size_t j=0; j < m.Col; j++)
00200         {
00201             out << m.Val[i][j] << '\t';
00202         }
00203         out << endl;
00204     }
00205     return out;
00206 }

template<typename _Ty1, typename _Ty2, typename _Ty3>
bool __cdecl mbo::operator<= ( const triplet< _Ty1, _Ty2, _Ty3 > &  lhs,
const triplet< _Ty1, _Ty2, _Ty3 > &  rhs 
) [inline]

Definition at line 110 of file triplet.h.

00111 {
00112     return (!(rhs < lhs));
00113 }

template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
bool __cdecl mbo::operator<= ( const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  lhs,
const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  rhs 
) [inline]

Definition at line 112 of file quaternion.h.

00113 {
00114     return (!(rhs < lhs));
00115 }

template<typename _Ty1, typename _Ty2, typename _Ty3>
bool __cdecl mbo::operator== ( const triplet< _Ty1, _Ty2, _Ty3 > &  lhs,
const triplet< _Ty1, _Ty2, _Ty3 > &  rhs 
) [inline]

Definition at line 83 of file triplet.h.

References mbo::triplet< _Ty1, _Ty2, _Ty3 >::third.

00084 {
00085     return (lhs.first == rhs.first && lsh.second == rhs.second && lsh.third == rhs.third);
00086 }

template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
bool __cdecl mbo::operator== ( const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  lhs,
const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  rhs 
) [inline]

Definition at line 84 of file quaternion.h.

References mbo::quaternion< _Ty1, _Ty2, _Ty3, _Ty4 >::forth, and mbo::triplet< _Ty1, _Ty2, _Ty3 >::third.

00085 {
00086     return (lhs.first == rhs.first && lsh.second == rhs.second && lsh.third == rhs.third && lsh.forth == rhs.forth);
00087 }

template<class _Ty, size_t _Cols, size_t _Rows>
bool mbo::operator== ( const Matrix< _Ty, _Cols, _Rows > &  lhs,
const Matrix< _Ty, _Cols, _Rows > &  rhs 
) [inline]

Definition at line 218 of file MboMatrix.h.

References mbo::Matrix< _Ty, _Cols, _Rows >::_Cols.

00219 {
00220     for (size_t i=0; i < _Rows; i++)
00221     {
00222         for (size_t j=0; j < _Cols; i++)
00223         {
00224             if (lhs1.Val[i][j] != rhs2.Val[i][j])
00225                 return false;
00226             }
00227         }
00228     }

template<typename _Ty1, typename _Ty2, typename _Ty3>
bool __cdecl mbo::operator> ( const triplet< _Ty1, _Ty2, _Ty3 > &  lhs,
const triplet< _Ty1, _Ty2, _Ty3 > &  rhs 
) [inline]

Definition at line 104 of file triplet.h.

00105 {
00106     return (rhs < lhs);
00107 }

template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
bool __cdecl mbo::operator> ( const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  lhs,
const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  rhs 
) [inline]

Definition at line 106 of file quaternion.h.

00107 {
00108     return (rhs < lhs);
00109 }

template<typename _Ty1, typename _Ty2, typename _Ty3>
bool __cdecl mbo::operator>= ( const triplet< _Ty1, _Ty2, _Ty3 > &  lhs,
const triplet< _Ty1, _Ty2, _Ty3 > &  rhs 
) [inline]

Definition at line 116 of file triplet.h.

00117 {
00118     return (!(lhs < rhs));
00119 }

template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
bool __cdecl mbo::operator>= ( const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  lhs,
const quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  rhs 
) [inline]

Definition at line 118 of file quaternion.h.

00119 {
00120     return (!(lhs < rhs));
00121 }

template<class _Ty, size_t _Cols, size_t _Rows>
istream& mbo::operator>> ( istream &  in,
Matrix< _Ty, _Cols, _Rows > &  m 
) [inline]

Definition at line 181 of file MboMatrix.h.

References mbo::Matrix< _Ty, _Cols, _Rows >::Val.

00182 {
00183     for (size_t i=0; i < m.Row; i++)
00184     {
00185         for (size_t j=0; j < m.Col; j++)
00186         {
00187             in >> m.Val[i][j];
00188         }
00189     }
00190     return in;
00191 }

void mbo::OutputDebugTrace ( int  nSkip = 2  ) 

Output a debug trace using OutputDebugString().

Parameters:
nSkip number of frames to skip. Since this function calles another function, you need to set this to 2 in order to avoid getting this call in the trace.

template<typename _Tpair, typename _Tfunc>
pair_first_func_t<_Tpair, _Tfunc> mbo::pair_first_func ( _Tfunc  func  )  [inline]

pair.first function call adapter creator

Definition at line 436 of file for_all.h.

00437 {
00438     return pair_first_func_t<_Tpair, _Tfunc>(func);
00439 }

template<typename _Tpair, typename _Tret, typename _Tfunc>
pair_second_func_t<_Tpair, _Tret, _Tfunc> mbo::pair_second_func ( _Tfunc  func  )  [inline]

pair.second function call adapter creator

Definition at line 471 of file for_all.h.

00472 {
00473     return pair_second_func_t<_Tpair, _Tret, _Tfunc>(func);
00474 }

MboString& mbo::StrApplyReplaceMap ( MboString &  str,
const mbo::CStrMapStr msstrReplaceMap 
)

template<class _E, class _Tr, class _A>
int mbo::StrCompareIC ( const std::basic_string< _E, _Tr, _A > &  lhs,
const std::basic_string< _E, _Tr, _A > &  rhs 
) [inline]

Definition at line 207 of file MboStrHelper.h.

References StrCompareIC().

00211 {
00212     return StrCompareIC(lhs.c_str(), rhs.c_str());
00213 }

Here is the call graph for this function:

mbo::StrCompareIC

template<class _E, class _Tr, class _A>
int mbo::StrCompareIC ( const _E *  lhs,
const std::basic_string< _E, _Tr, _A > &  rhs 
) [inline]

Definition at line 201 of file MboStrHelper.h.

References StrCompareIC().

00202 {
00203     return StrCompareIC(lhs, rhs.c_str());
00204 }

Here is the call graph for this function:

mbo::StrCompareIC

template<class _E, class _Tr, class _A>
int mbo::StrCompareIC ( const std::basic_string< _E, _Tr, _A > &  lhs,
const _E *  rhs 
) [inline]

Definition at line 195 of file MboStrHelper.h.

References StrCompareIC().

00196 {
00197     return StrCompareIC(lhs.c_str(), rhs);
00198 }

Here is the call graph for this function:

mbo::StrCompareIC

template<>
int mbo::StrCompareIC ( const wchar_t *  lhs,
const wchar_t *  rhs 
) [inline]

Definition at line 189 of file MboStrHelper.h.

00190 {
00191     return _wcsicmp(lhs, rhs);
00192 }

template<>
int mbo::StrCompareIC ( const unsigned char *  lhs,
const unsigned char *  rhs 
) [inline]

Definition at line 183 of file MboStrHelper.h.

00184 {
00185     return _mbsicmp(lhs, rhs);
00186 }

template<>
int mbo::StrCompareIC ( const char *  lhs,
const char *  rhs 
) [inline]

Definition at line 177 of file MboStrHelper.h.

00178 {
00179     return _stricmp(lhs, rhs);
00180 }

template<class _E>
int mbo::StrCompareIC ( const _E *  lhs,
const _E *  rhs 
) [inline]

Definition at line 150 of file MboStrHelper.h.

References MBO_MT_LOCAL_OR_STATIC.

Referenced by mbo::less_ic< _Ty >::operator()(), and StrCompareIC().

00151 {
00152 #ifdef _STLPORT_VERSION
00153     MBO_MT_LOCAL_OR_STATIC const std::locale loc = std::locale::empty();
00154 #else
00155     MBO_MT_LOCAL_OR_STATIC const std::ctype<_E>& facet = get_facet<_E>();
00156 #endif
00157 
00158     for (; *lhs && *rhs; ++lhs, ++rhs)
00159     {
00160 #ifdef _STLPORT_VERSION
00161         int i = std::tolower(*lhs, loc)
00162               - std::tolower(*rhs, loc);
00163 #else
00164         int i = facet.tolower(*lhs) - facet.tolower(*rhs);
00165 #endif
00166 
00167         if (i)
00168         {
00169             return i;
00170         }
00171     }
00172 
00173     return static_cast<int>(*lhs != 0) - static_cast<int>(*rhs != 0);
00174 }

template<class _E, class _Tr, class _A>
std::basic_string< char > mbo::StrCreate ( const char *  sz  )  [inline]

Definition at line 101 of file MboTString.h.

00102 {
00103     const std::ctype<_E>& facet = get_facet<_E>();
00104 
00105     std::basic_string<_E, _Tr, _A> str;
00106 
00107     while (*sz)
00108     {
00109         str.append(1, facet.widen(*sz++));
00110     }
00111     return str;
00112 }

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A> mbo::StrEncodeXML ( const std::basic_string< _E, _Tr, _A > &  _str  )  [inline]

Definition at line 666 of file MboStrHelper.h.

References StrReplace().

00669 {
00670     std::basic_string<_E, _Tr, _A> str(_str);
00671     mbo::StrReplace(str, "&", "&amp;");
00672     mbo::StrReplace(str, "<", "&lt;");
00673     mbo::StrReplace(str, ">", "&gt;");
00674     mbo::StrReplace(str, "'", "&apos;");
00675     mbo::StrReplace(str, "\"", "&quot;");
00676     return str;
00677 }

Here is the call graph for this function:

mbo::StrReplace

template<class _E, class _Tr, class _A>
bool mbo::StrEndsWith ( const std::basic_string< _E, _Tr, _A > &  str,
const std::basic_string< _E, _Tr, _A > &  strPostfix,
bool  bCaseSensitive = true 
) [inline]

Definition at line 484 of file MboStrHelper.h.

References StrLower().

00489 {
00490     std::basic_string<_E, _Tr, _A>::size_type postlen = strPostfix.length();
00491 
00492     if (postlen <= str.length())
00493     {
00494         if (!bCaseSensitive)
00495         {
00496             return !str.compare(str.length() - postlen, postlen, strPostfix);
00497         }
00498         else
00499         {
00500             std::basic_string<_E, _Tr, _A> strIn(str.substr(str.length() - postlen));
00501             std::basic_string<_E, _Tr, _A> strPr(strPostfix);
00502             return !StrLower(strIn).compare(StrLower(strPr));
00503         }
00504     }
00505     else
00506     {
00507         return !postlen;
00508     }
00509 }

Here is the call graph for this function:

mbo::StrLower

template<>
std::basic_string<char> mbo::StrFrom ( const bool &  val  )  [inline]

Definition at line 285 of file MboStrHelper.h.

00286 {
00287     return val ? std::basic_string<char>("1") : std::basic_string<char>("0");
00288 }

template<>
std::basic_string<char> mbo::StrFrom ( const long &  val  )  [inline]

Definition at line 276 of file MboStrHelper.h.

References snprintf.

00277 {
00278     char buf[32];
00279 
00280     snprintf(buf, sizeof(buf), "%ld", val);
00281     return std::basic_string<char>(buf);
00282 }

template<>
std::basic_string<char> mbo::StrFrom ( const int &  val  )  [inline]

Definition at line 267 of file MboStrHelper.h.

References snprintf.

00268 {
00269     char buf[32];
00270 
00271     snprintf(buf, sizeof(buf), "%d", val);
00272     return std::basic_string<char>(buf);
00273 }

template<class _E, typename _ValType>
std::basic_string<_E> mbo::StrFrom ( const _ValType &  val  )  [inline]

Definition at line 258 of file MboStrHelper.h.

00259 {
00260     std::basic_stringbuf<_E> buf;
00261     std::basic_ostream<_E> out(&buf);
00262     out << val;
00263     return buf.str();
00264 }

template<class _E>
std::basic_string<_E> mbo::StrFromBool ( bool  val  )  [inline]

Definition at line 399 of file MboStrHelper.h.

00400 {
00401     return StrCreate<_E, std::char_traits<_E>, std::allocator<_E> >(val ? "true" : "false");
00402 }

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A >& mbo::StrFromColor ( std::basic_string< _E, _Tr, _A > &  str,
COLORREF  col 
) [inline]

Definition at line 245 of file MboIniData.h.

References max, and min.

00249 {
00250     str = "R="  + StrFrom<_E>(max(0, min(GetRValue(col), 255)))
00251         + ",G=" + StrFrom<_E>(max(0, min(GetGValue(col), 255)))
00252         + ",B=" + StrFrom<_E>(max(0, min(GetBValue(col), 255)));
00253     return str;
00254 }

template<class _E>
std::basic_string<_E> mbo::StrFromDouble ( double  val,
int  iWidth = -16,
int  iPrecision = 10 
) [inline]

Definition at line 329 of file MboStrHelper.h.

References snprintf, and StrTrim().

00334 {
00335     typedef std::basic_string<_E>  string_type;
00336     typedef string_type::size_type size_type;
00337 
00338     const size_type npos = string_type::npos;
00339 
00340     char szTemp[128];
00341 
00342     assert(abs(iWidth) < sizeof(szTemp));
00343     assert(iPrecision >= 0);
00344 
00345     if (iWidth < 0)
00346     {
00347         snprintf(szTemp, sizeof(szTemp)-1, "%0g", val);
00348         std::basic_string<_E> str(szTemp);
00349         StrTrim(str);
00350         size_type pos = str.find('.');
00351         size_type nok = str.find('e') & str.find('E') & (pos>=0 ? str.find('-', pos) : -1) & str.find('+', pos) & str.find(' ', pos);
00352         if (nok == npos && iPrecision)
00353         {
00354             if (pos == npos)
00355             {
00356                 pos = str.length();
00357                 str += '.';
00358             }
00359             int len = static_cast<int>(str.length() - pos - 1); // length of fractional part
00360             // need to add '0's?
00361             while(len < iPrecision)
00362             {
00363                 str += '0';
00364                 len++;
00365             }
00366             // need to drop digits?
00367             if (len > iPrecision)
00368             {
00369                 str.resize(len--);
00370             }
00371             // remove front space if unwanted
00372             len = - static_cast<int>(str.length());
00373             while(str[0] == ' ' && len < iWidth)
00374             {
00375                 str.erase(0, 1);
00376                 len++;
00377             }
00378         }
00379         return str;
00380     }
00381     else
00382     {
00383         snprintf(szTemp, sizeof(szTemp)-1, "%*.*g", iWidth, iPrecision, val);
00384         return std::basic_string<_E>(szTemp);
00385     }
00386 }

Here is the call graph for this function:

mbo::StrTrimmbo::StrTrimLeftmbo::StrTrimRight

template<class _E>
std::basic_string<_E> mbo::StrFromFloat ( double  val,
int  iWidth = -10,
int  iPrecision = 6 
) [inline]

Definition at line 389 of file MboStrHelper.h.

00394 {
00395     return StrFromDouble<_E>(static_cast<double>(val), iWidth, iPrecision);
00396 }

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A>& mbo::StrLower ( std::basic_string< _E, _Tr, _A > &  str  )  [inline]

Definition at line 143 of file MboStrHelper.h.

References StrLower().

00144 {
00145     StrLower(const_cast<_E*>(str.c_str()));
00146     return str;
00147 }

Here is the call graph for this function:

mbo::StrLower

template<>
wchar_t* mbo::StrLower ( wchar_t *  str  )  [inline]

Definition at line 137 of file MboStrHelper.h.

00138 {
00139     return _wcslwr(str);
00140 }

template<>
unsigned char* mbo::StrLower ( unsigned char *  str  )  [inline]

Definition at line 131 of file MboStrHelper.h.

00132 {
00133     return _mbslwr(str);
00134 }

template<>
char* mbo::StrLower ( char *  str  )  [inline]

Definition at line 125 of file MboStrHelper.h.

00126 {
00127     return _strlwr(str);
00128 }

template<class _E>
_E* mbo::StrLower ( _E *  str  )  [inline]

Definition at line 105 of file MboStrHelper.h.

References MBO_MT_LOCAL_OR_STATIC.

Referenced by StrEndsWith(), StrLower(), and StrStartsWith().

00106 {
00107 #ifdef _STLPORT_VERSION
00108     MBO_MT_LOCAL_OR_STATIC const std::locale loc = std::locale::empty();
00109 #else
00110     MBO_MT_LOCAL_OR_STATIC const std::ctype<_E>& facet = get_facet<_E>();
00111 #endif
00112 
00113     for (_E *pos = str; *pos; ++pos)
00114     {
00115 #ifdef _STLPORT_VERSION
00116         *pos = std::tolower(*pos, loc);
00117 #else
00118         *pos = facet.tolower(*pos);
00119 #endif
00120     }
00121     return str;
00122 }

template<class _E, class _Tr, class _A>
size_t mbo::StrOccurences ( std::basic_string< _E, _Tr, _A > &  str,
std::basic_string< _E, _Tr, _A > &  strFind 
) [inline]

Definition at line 620 of file MboStrHelper.h.

00624 {
00625     size_t nOccurences = 0;
00626     std::basic_string<_E, _Tr, _A>::size_type pos = 0;
00627 
00628     while ((pos = str.find(strFind, pos)) != std::basic_string<_E, _Tr, _A>::npos)
00629     {
00630         nOccurences++;
00631         pos++;
00632     }
00633     return nOccurences;
00634 }

std::string& mbo::StrParseEnvVars ( std::string &  str,
char  cOpen,
char  cClose 
) [inline]

Definition at line 679 of file MboStrHelper.h.

00684 {
00685     for(;;)
00686     {
00687         std::string::size_type n1 = str.find(cOpen);
00688         std::string::size_type n2 = (n1 != std::string::npos) ? str.find(cClose, n1) : std::string::npos;
00689 
00690         if (n2 != std::string::npos)
00691         {
00692             std::string env(str.substr(n1 + 1, n2 - n1 - 1));
00693             return str.replace(n1, n2 - n1 + 1, getenv(env.c_str()));
00694         }
00695         else
00696         {
00697             return str;
00698         }
00699     }
00700 }

std::string mbo::strprintf ( const char *  szFormat,
  ... 
)

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A>& mbo::StrReplace ( std::basic_string< _E, _Tr, _A > &  str,
const _E *  strOld,
const _E *  strNew 
) [inline]

Definition at line 656 of file MboStrHelper.h.

References StrReplace().

00661 {
00662     return StrReplace(str, std::basic_string<_E, _Tr, _A>(strOld), std::basic_string<_E, _Tr, _A>(strNew));
00663 }

Here is the call graph for this function:

mbo::StrReplace

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A>& mbo::StrReplace ( std::basic_string< _E, _Tr, _A > &  str,
const std::basic_string< _E, _Tr, _A > &  strOld,
const std::basic_string< _E, _Tr, _A > &  strNew 
) [inline]

Definition at line 637 of file MboStrHelper.h.

Referenced by StrEncodeXML(), and StrReplace().

00642 {
00643     std::basic_string<_E, _Tr, _A>::size_type pos = 0;
00644 
00645     while ((pos = str.find_first_of(strOld, pos)) != std::basic_string<_E, _Tr, _A>::npos)
00646     {
00647         str.erase(pos, strOld.length());
00648         str.insert(pos, strNew);
00649         pos += strNew.length();
00650     }
00651 
00652     return str;
00653 }

template<class _E, class _Tr, class _A>
bool mbo::StrSplit ( const std::basic_string< _E, _Tr, _A > &  strValue,
const std::basic_string< _E, _Tr, _A > &  strSplit,
std::basic_string< _E, _Tr, _A > &  strLeft,
std::basic_string< _E, _Tr, _A > &  strRight,
bool  bTrim = false 
) [inline]

Definition at line 572 of file MboStrHelper.h.

References StrTrim().

00579 {
00580     bool bFoundEq;
00581 
00582     if (strSplit.empty())
00583     {
00584         strLeft  = strValue;
00585         strRight = "";
00586         bFoundEq = false;
00587     }
00588     else
00589     {
00590         std::basic_string<_E, _Tr, _A>::size_type p = strValue.find(strSplit);
00591     
00592         if (p == std::basic_string<_E, _Tr, _A>::npos)
00593         {
00594             strLeft  = strValue;
00595             strRight = "";
00596             bFoundEq = false;
00597         }
00598         else if (!p)
00599         {
00600             strLeft  = "";
00601             strRight = strValue.substr(strSplit.size());
00602             bFoundEq = true;
00603         }
00604         else
00605         {
00606             strRight = strValue.substr(p + strSplit.size());
00607             strLeft  = strValue.substr(0, p);
00608             bFoundEq = true;
00609         }
00610     }
00611     if (bTrim)
00612     {
00613         StrTrim(strLeft);
00614         StrTrim(strRight);
00615     }
00616     return bFoundEq;
00617 }

Here is the call graph for this function:

mbo::StrTrimmbo::StrTrimLeftmbo::StrTrimRight

template<class _E, class _Tr, class _A>
bool mbo::StrStartsWith ( const std::basic_string< _E, _Tr, _A > &  str,
const std::basic_string< _E, _Tr, _A > &  strPrefix,
bool  bCaseSensitive = true 
) [inline]

Definition at line 456 of file MboStrHelper.h.

References StrLower().

00461 {
00462     std::basic_string<_E, _Tr, _A>::size_type preflen = strPrefix.length();
00463 
00464     if (preflen <= str.length())
00465     {
00466         if (!bCaseSensitive)
00467         {
00468             return !str.compare(0, preflen, strPrefix);
00469         }
00470         else
00471         {
00472             std::basic_string<_E, _Tr, _A> strIn(str.substr(0, preflen));
00473             std::basic_string<_E, _Tr, _A> strPr(strPrefix);
00474             return !StrLower(strIn).compare(StrLower(strPr));
00475         }
00476     }
00477     else
00478     {
00479         return !preflen;
00480     }
00481 }

Here is the call graph for this function:

mbo::StrLower

template<typename _ValType, class _E, class _Tr, class _A>
_ValType mbo::StrTo ( const std::basic_string< _E, _Tr, _A > &  str  )  [inline]

Definition at line 291 of file MboStrHelper.h.

00292 {
00293     using std::basic_stringbuf;
00294     using std::basic_istream;
00295     basic_stringbuf<_E> buf(str, std::ios_base::in | std::ios_base::out);
00296     basic_istream<_E> in(&buf);
00297     _ValType val;
00298     in >> val;
00299     return val;
00300 }

template<class _E, class _Tr, class _A>
COLORREF mbo::StrToColor ( const std::basic_string< _E, _Tr, _A > &  str,
COLORREF  colDefault 
) [inline]

Definition at line 232 of file MboIniData.h.

References std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::contains_key().

00236 {
00237     CStrMapStr msstrColor(str);
00238     return RGB( (msstrColor.contains_key("R") ? StrToInt<_E, _Tr, _A>(msstrColor.find("R")->second) : GetRValue(colDefault))
00239               , (msstrColor.contains_key("G") ? StrToInt<_E, _Tr, _A>(msstrColor.find("G")->second) : GetGValue(colDefault))
00240               , (msstrColor.contains_key("B") ? StrToInt<_E, _Tr, _A>(msstrColor.find("B")->second) : GetBValue(colDefault))
00241               );
00242 }

Here is the call graph for this function:

std::map2::contains_key

template<>
float mbo::StrToFloat ( const std::basic_string< char > &  str  )  [inline]

Definition at line 321 of file MboStrHelper.h.

00322 {
00323     float val;
00324     sscanf(str.c_str(), "%f", &val);
00325     return val;
00326 }

template<class _E, class _Tr, class _A>
float mbo::StrToFloat ( const std::basic_string< _E, _Tr, _A > &  str  )  [inline]

Definition at line 315 of file MboStrHelper.h.

00316 {
00317     return StrTo<float, _E, _Tr, _A>(str.c_str());
00318 }

template<class _E, class _Tr, class _A>
int mbo::StrToInt ( const std::basic_string< _E, _Tr, _A > &  str  )  [inline]

Definition at line 303 of file MboStrHelper.h.

00304 {
00305     return StrTo<int, _E, _Tr, _A>(str);
00306 }

template<class _E, class _Tr, class _A>
long mbo::StrToLong ( const std::basic_string< _E, _Tr, _A > &  str  )  [inline]

Definition at line 309 of file MboStrHelper.h.

00310 {
00311     return StrTo<long, _E, _Tr, _A>(str.c_str());
00312 }

std::basic_string<wchar_t> mbo::StrToWStr ( const std::basic_string< char > &  str  ) 

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A>& mbo::StrTrim ( std::basic_string< _E, _Tr, _A > &  str  )  [inline]

Definition at line 252 of file MboStrHelper.h.

References StrTrimLeft(), and StrTrimRight().

Referenced by StrFromDouble(), and StrSplit().

00253 {
00254     return StrTrimLeft(StrTrimRight(str));
00255 }

Here is the call graph for this function:

mbo::StrTrimLeftmbo::StrTrimRight

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A>& mbo::StrTrimLeft ( std::basic_string< _E, _Tr, _A > &  str  )  [inline]

Definition at line 225 of file MboStrHelper.h.

References MBO_MT_LOCAL_OR_STATIC.

Referenced by StrTrim().

00226 {
00227     MBO_MT_LOCAL_OR_STATIC const std::basic_string<_E, _Tr, _A> strTrimChars(StrCreate<_E, _Tr, _A>(" \r\n\t"));
00228 
00229     return str.erase(0, str.find_first_not_of(strTrimChars));
00230 }

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A>& mbo::StrTrimRight ( std::basic_string< _E, _Tr, _A > &  str  )  [inline]

Definition at line 233 of file MboStrHelper.h.

References MBO_MT_LOCAL_OR_STATIC.

Referenced by StrTrim().

00234 {
00235     MBO_MT_LOCAL_OR_STATIC const std::basic_string<_E, _Tr, _A> strTrimChars(StrCreate<_E, _Tr, _A>(" \r\n\t"));
00236 
00237     std::basic_string<_E, _Tr, _A>::size_type pos = str.find_last_not_of(strTrimChars);
00238     
00239     if (pos != std::basic_string<_E, _Tr, _A>::npos)
00240     {
00241         str.resize(pos + 1);
00242         return str;
00243     }
00244     else
00245     {
00246         str.resize(0);
00247         return str;
00248     }
00249 }

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A> mbo::StrUCFirst ( const std::basic_string< _E, _Tr, _A > &  str  )  [inline]

Definition at line 405 of file MboStrHelper.h.

References MBO_MT_LOCAL_OR_STATIC.

00406 {
00407 #ifdef _STLPORT_VERSION
00408     MBO_MT_LOCAL_OR_STATIC const std::locale loc = std::locale::empty();
00409 #else
00410     MBO_MT_LOCAL_OR_STATIC const std::ctype<_E>& facet = get_facet<_E>();
00411 #endif
00412     
00413     typedef std::basic_string<_E, _Tr, _A> _Str;
00414 
00415     _Str res(str);
00416     int  bWasAlnum = false;
00417 
00418     for(_Str::iterator it = res.begin(); it != res.end(); ++it)
00419     {
00420 #ifdef _STLPORT_VERSION
00421         int bIsAlnum = std::isalnum(*it, loc);
00422 #else
00423         int bIsAlnum = facet.is(std::ctype<_E>::alnum, *it); /* [a-zA-Z0-9_] */
00424 #endif
00425 
00426         if (!bWasAlnum && bIsAlnum)
00427         {
00428 #ifdef _STLPORT_VERSION
00429             *it = std::toupper(*it, loc);
00430 #else
00431             *it = facet.toupper(*it);
00432 #endif
00433         } 
00434         else 
00435         {
00436 #ifdef _STLPORT_VERSION
00437             int bIsUpper = std::isupper(*it, loc);;
00438 #else
00439             int bIsUpper = facet.is(std::ctype<_E>::upper, *it);
00440 #endif
00441             if (bIsUpper)
00442             {
00443 #ifdef _STLPORT_VERSION
00444                 *it = std::tolower(*it, loc);
00445 #else
00446                 *it = facet.tolower(*it);
00447 #endif
00448             }
00449         }
00450         bWasAlnum = bIsAlnum;
00451     }
00452     return res;
00453 }

template<class _E, class _Tr, class _A>
std::basic_string<_E, _Tr, _A>& mbo::StrUpper ( std::basic_string< _E, _Tr, _A > &  str  )  [inline]

Definition at line 98 of file MboStrHelper.h.

References StrUpper().

00099 {
00100     StrUpper(const_cast<_E*>(str.c_str()));
00101     return str;
00102 }

Here is the call graph for this function:

mbo::StrUpper

template<>
wchar_t* mbo::StrUpper ( wchar_t *  str  )  [inline]

Definition at line 92 of file MboStrHelper.h.

00093 {
00094     return _wcsupr(str);
00095 }

template<>
unsigned char* mbo::StrUpper ( unsigned char *  str  )  [inline]

Definition at line 86 of file MboStrHelper.h.

00087 {
00088     return _mbsupr(str);
00089 }

template<>
char* mbo::StrUpper ( char *  str  )  [inline]

Definition at line 80 of file MboStrHelper.h.

00081 {
00082     return _strupr(str);
00083 }

template<class _E>
_E* mbo::StrUpper ( _E *  str  )  [inline]

Definition at line 60 of file MboStrHelper.h.

References MBO_MT_LOCAL_OR_STATIC.

Referenced by StrUpper().

00061 {
00062 #ifdef _STLPORT_VERSION
00063     MBO_MT_LOCAL_OR_STATIC const std::locale loc = std::locale::empty();
00064 #else
00065     MBO_MT_LOCAL_OR_STATIC const std::ctype<_E>& facet = get_facet<_E>();
00066 #endif
00067 
00068     for (_E *pos = str; *pos; ++pos)
00069     {
00070 #ifdef _STLPORT_VERSION
00071         *pos = std::toupper(*pos, loc);
00072 #else
00073         *pos = facet.toupper(*pos);
00074 #endif
00075     }
00076     return str;
00077 }

template<typename _Ty1, typename _Ty2, typename _Ty3>
void mbo::swap ( triplet< _Ty1, _Ty2, _Ty3 > &  lhs,
triplet< _Ty1, _Ty2, _Ty3 > &  rhs 
) [inline]

Definition at line 128 of file triplet.h.

References mbo::triplet< _Ty1, _Ty2, _Ty3 >::swap().

Referenced by mbo::triplet< _Ty1, _Ty2, _Ty3 >::swap(), and mbo::quaternion< _Ty1, _Ty2, _Ty3, _Ty4 >::swap().

00129 {
00130     lhs.swap(rhs);
00131 }

Here is the call graph for this function:

mbo::triplet::swap

template<typename _Ty1, typename _Ty2, typename _Ty3, typename _Ty4>
void mbo::swap ( quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  lhs,
quaternion< _Ty1, _Ty2, _Ty3, _Ty4 > &  rhs 
) [inline]

Definition at line 130 of file quaternion.h.

References mbo::quaternion< _Ty1, _Ty2, _Ty3, _Ty4 >::swap().

00131 {
00132     lhs.swap(rhs);
00133 }

Here is the call graph for this function:

mbo::quaternion::swapmbo::swapmbo::triplet::swap

mbo::tstring mbo::TStrCreate ( const char *  sz  ) 

template<typename _ValType>
tstring mbo::TStrFrom ( const _ValType &  val  )  [inline]

Definition at line 138 of file MboTString.h.

00139 {
00140     return StrFrom<tstring::value_type, _ValType>(val);
00141 }

template<typename _Tret, typename _Ty, typename _Targ1, typename _Targ2, typename _Targ3>
const_value_func_3_t< _Tret, _Ty, _Targ1, _Targ2, _Targ3 > mbo::value_func ( _Tret(_Ty::*)(_Targ1, _Targ2, _Targ3)  func  )  [inline]

member function call adapter creator

const member function call adapter creator

Definition at line 1316 of file for_all.h.

01317 {
01318     return value_func_3_t<_Ty, _Tret, _Targ1, _Targ2, _Targ3>(func);
01319 }

template<typename _Tret, typename _Ty, typename _Targ1, typename _Targ2>
const_value_func_2_t< _Tret, _Ty, _Targ1, _Targ2 > mbo::value_func ( _Tret(_Ty::*)(_Targ1, _Targ2)  func  )  [inline]

member function call adapter creator

const member function call adapter creator

Definition at line 1300 of file for_all.h.

01301 {
01302     return value_func_2_t<_Ty, _Tret, _Targ1, _Targ2>(func);
01303 }

template<typename _Tret, typename _Ty, typename _Targ1>
const_value_func_1_t< _Tret, _Ty, _Targ1 > mbo::value_func ( _Tret(_Ty::*)(_Targ1)  func  )  [inline]

member function call adapter creator

const member function call adapter creator

Definition at line 1284 of file for_all.h.

01285 {
01286     return value_func_1_t<_Ty, _Tret, _Targ1>(func);
01287 }

template<typename _Tret, typename _Ty>
const_value_func_t< _Tret, _Ty > mbo::value_func ( _Tret(_Ty::*)()  func  )  [inline]

member function call adapter creator

const member function call adapter creator

Definition at line 1268 of file for_all.h.

01269 {
01270     return value_func_t<_Ty, _Tret>(func);
01271 }

std::string mbo::vstrprintf ( const char *  szFormat,
va_list  vargs 
)

std::basic_string<char> mbo::WStrToStr ( const std::basic_string< wchar_t > &  wstr  ) 


Variable Documentation

return mbo::true

Definition at line 229 of file MboMatrix.h.


  Hosted on code.google.com  
© Marcus Börger
Generated on Fri Jan 18 21:21:10 2008 for MBO-lib by doxygen 1.5.4