mbo: Utility classes and functions by <a href='http://marcus-boerger.de/'>M. B&ouml;rger</a>

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Utility classes and functions by M. Börger

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
This file is distributed under the following license Mbo License.

You can download the actual version of this file here:
http://marcus-boerger.de/cpp/mbo/mbo.tar.bz2
http://marcus-boerger.de/cpp/mbo/mbo.zip

If you do not have doxygen you can also download this documentation as a chm file here:
http://marcus-boerger.de/cpp/mbo/mbo.chm
or view it online here:
marcus-boerger.de/cpp/mbo/html/

Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: File Index

mbo File List

Here is a list of all files with brief descriptions:
deque2.h [code] | Extended deque template
enumset.hpp [code] | Template mbo::enumset: a set template that works with enum types
list2.h [code] | Extended deque template
map2.h [code] | Extended deque template
Mbo.h [code] | Utility classes and functions by M. Börger
MboDrawWin.h [code] Window class:
  • class mbo::MboDrawWin
MboIniData.h [code] | Class CIniData: storage/retrieval of initialisation data
MboLockedVar.h [code] | Locked variables
MboMatrix.h [code]
MboRefCntPtr.h [code] | Class mbo::RefCntPtr: reference counted pointer
MboStrHelper.h [code] | String helper (template) functions
MboStrList.h [code] String list class:
  • class mbo::CStrList
MboStrMap.h [code] Associative array classes:
  • class mbo::CStrMap template [string] -> any type
  • class mbo::CStrMapStr [string] -> string
MboSynch.h [code] | Synchronization objects for multi threaded targets and their corresponding fakes for use in single threaded targets. This can also be used to implement class templates that can be instanciated with or without locking functionality
MboThread.h [code] Thread classes:
  • class mbo::MboThread: basic thread implementation
  • class mbo::MboIntervalThread: an interval thread implementation
MboTString.h [code] String classes, typedefs, conversions and macros:
  • typedef TCHAR: depending on project setting either char or wchar_t (others possible too)
  • class mbo::tstring: TCHAR compatible string class
reallocator.h [code] | Reallocator
TDynamicArray.h [code] | Dynamic array
TStaticArray.h [code] | Static Array Template
vector2.h [code] | Extended deque template
Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: deque2.h File Reference

deque2.h File Reference

Extended deque template. More...

#include "Mbo.h"
#include <algorithm>
#include <deque>

Go to the source code of this file.

Namespaces

namespace | std

Classes

class | std::deque2< _Ty, _Alloc >
expanded deque template class More...

Detailed Description

Extended deque template.

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
You must compile this source with RTTI enabled.

This file is distributed under the following license Mbo License.

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: enumset.hpp File Reference

enumset.hpp File Reference

template mbo::enumset: a set template that works with enum types. More...

#include <stdarg.h>
#include <exception>

Go to the source code of this file.

Defines

#define | _Ty_args_default int
#define | _Ty_list_default size_t

Detailed Description

template mbo::enumset: a set template that works with enum types.

Author:
Marcus Boerger (http://marcus-boerger.de/)

Name: enumset.hpp

The template class mbo::enumset has been tested under:

  • Linux with GCC 2.96 and 3.2
  • Cygwin GCC 3.2
  • WinXP with MSVC.NET

Note:
This file is distributed under the following license enumset License.

You can download the actual version of this file here:
http://marcus-boerger.de/cpp/enumset/enumset.tar.bz2

If you do not have doxygen you can also download this documentation as a chm file here:
http://marcus-boerger.de/cpp/enumset/doc/enumset.chm
or view it online here:
marcus-boerger.de/cpp/enumset/doc/html/

Define Documentation

#define _Ty_args_default int

default type used for parameter transport in '...' function calls

See also:
mbo::enumset

#define _Ty_list_default size_t

default type internally used to represent the set of enum values

See also:
mbo::enumset

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: list2.h File Reference

list2.h File Reference

Extended deque template. More...

#include "Mbo.h"
#include <list>
#include <stdexcept>

Go to the source code of this file.

Namespaces

namespace | std

Classes

class | std::list2< _Ty, _Alloc >
expanded list template class More...

Detailed Description

Extended deque template.

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
You must compile this source with RTTI enabled.

This file is distributed under the following license Mbo License.

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: map2.h File Reference

map2.h File Reference

Extended deque template. More...

#include "Mbo.h"
#include "list2.h"
#include "vector2.h"
#include "deque2.h"
#include <map>
#include <functional>
#include <stdexcept>

Go to the source code of this file.

Namespaces

namespace | std

Classes

class | std::check_fun_t< _Tp, _Arg >
binary function adaptor for check functions used by map2 More...
class | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
expanded map template class More...

Defines

#define | MAP_CONTAINER std::deque2
#define | MBO_MAP2_CONST_ARRAY_ACCESS 1

Functions

template<class _Tp, class _Arg>
check_fun_t< _Tp, _Arg > | check_fun (bool(_Tp::*__f)(const _Arg &) const)

Detailed Description

Extended deque template.

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
You must compile this source with RTTI enabled.

This file is distributed under the following license Mbo License.

Define Documentation

#define MAP_CONTAINER std::deque2

define the default map2 container being deque2

This is used when instnaciating std:map2 with only 2 parameters. And defines the return types for std:map2::keys() and std::map2::values() functions.

#define MBO_MAP2_CONST_ARRAY_ACCESS 1

Function Documentation

template<class _Tp, class _Arg>
check_fun_t<_Tp,_Arg> check_fun ( bool(_Tp::*)(const _Arg &) const __f )

Helper function to build parameters for map2.values(check_fun_t).

See also:
std::check_fun_t
Parameters:
_Tp | type of instances to execute the function
_Arg | type of function arguments
__f | method accessible in _Tp to be used as check function
Returns:
created check function that will return the result of the function

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Mbo.h File Reference

Mbo.h File Reference

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

#include <string>
#include <crtdbg.h>
#include <exception>
#include <stdexcept>
#include "MboTString.h"

Go to the source code of this file.

Namespaces

namespace | mbo

Defines

#define | __THROW2(ex1, ex2) throw(ex1,ex2)
#define | __THROWS(ex) throw(ex)
#define | DebugBreak() _asm { int 3 }
#define | DEPRECATED
#define | MBO_API
#define | mbo_throw_if_not(exception, condition)
#define | MBO_THROWS_EXCEPTIONS 1

Detailed Description

Utility classes and functions by M. Börger.

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
This file is distributed under the following license Mbo License.

You can download the actual version of this file here:
http://marcus-boerger.de/cpp/mbo/mbo.tar.bz2
http://marcus-boerger.de/cpp/mbo/mbo.zip

If you do not have doxygen you can also download this documentation as a chm file here:
http://marcus-boerger.de/cpp/mbo/mbo.chm
or view it online here:
marcus-boerger.de/cpp/mbo/html/

Define Documentation

#define __THROW2 | ( | ex1,
 |  | ex2 | ) | throw(ex1,ex2)

#define __THROWS ( ex ) throw(ex)

#define DebugBreak ( ) _asm { int 3 }

#define DEPRECATED

marks output parameters (return value must be freed if not NULL)

#define MBO_API

#define mbo_throw_if_not | ( | exception,
 |  | condition | )

Value:

if (!(condition)) { \
        char szMessage[256]; \
        _snprintf(szMessage, sizeof(szMessage)-1, "%s(%d): %s", __FILE__, __LINE__, #condition); \
        throw exception(szMessage); \
    }

#define MBO_THROWS_EXCEPTIONS 1

Controls whether TDynamicArray throws exceptions (1, default) or calls exit(1) upon failure.

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboDrawWin.h File Reference

MboDrawWin.h File Reference

window class:
  • class mbo::MboDrawWin
More...

#include "Mbo.h"
#include "MboThread.h"
#include "MboIniData.h"
#include <list>

Go to the source code of this file.

Namespaces

namespace | mbo

Classes

class | mbo::MboDrawWin
A draw window independant from main application. More...

Defines

#define | RGB_BLACK RGB( 0, 0, 0)
#define | RGB_BLUE RGB( 0, 0,128)
#define | RGB_BROWN RGB(128,128, 0)
#define | RGB_CYAN RGB( 0,128,128)
#define | RGB_GRAY RGB(128,128,128)
#define | RGB_GREEN RGB( 0,128, 0)
#define | RGB_HINT RGB(255,255,204)
#define | RGB_LTBLUE RGB( 0, 0,255)
#define | RGB_LTCYAN RGB( 0,255,255)
#define | RGB_LTGRAY RGB(192,192,192)
#define | RGB_LTGREEN RGB( 0,255, 0)
#define | RGB_LTMAGENTA RGB(255, 0,255)
#define | RGB_LTRED RGB(255, 0, 0)
#define | RGB_MAGENTA RGB(128, 0,128)
#define | RGB_RED RGB(128, 0, 0)
#define | RGB_WHITE RGB(255,255,255)
#define | RGB_YELLOW RGB(255,255, 0)

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

RECT | NormalizeRect (RECT rect)

Detailed Description

window class:
  • class mbo::MboDrawWin

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
You must compile this source with RTTI enabled.

This file is distributed under the following license Mbo License.

Define Documentation

#define RGB_BLACK RGB( 0, 0, 0)

#define RGB_BLUE RGB( 0, 0,128)

#define RGB_BROWN RGB(128,128, 0)

#define RGB_CYAN RGB( 0,128,128)

#define RGB_GRAY RGB(128,128,128)

#define RGB_GREEN RGB( 0,128, 0)

#define RGB_HINT RGB(255,255,204)

#define RGB_LTBLUE RGB( 0, 0,255)

#define RGB_LTCYAN RGB( 0,255,255)

#define RGB_LTGRAY RGB(192,192,192)

#define RGB_LTGREEN RGB( 0,255, 0)

#define RGB_LTMAGENTA RGB(255, 0,255)

#define RGB_LTRED RGB(255, 0, 0)

#define RGB_MAGENTA RGB(128, 0,128)

#define RGB_RED RGB(128, 0, 0)

#define RGB_WHITE RGB(255,255,255)

#define RGB_YELLOW RGB(255,255, 0)

Enumeration Type Documentation

enum DRAW_MODE

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

Enumeration values:
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

Function Documentation

RECT NormalizeRect ( RECT rect ) [inline, static]

Normalize window coordinates

Parameters:
rect
Returns:
normalized rect (right > left, bottom > top)

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboIniData.h File Reference

MboIniData.h File Reference

class CIniData: storage/retrieval of initialisation data. More...

#include "Mbo.h"
#include "MboSynch.h"
#include "MboStrList.h"
#include "MboStrMap.h"
#include <vector>
#include <float.h>

Go to the source code of this file.

Namespaces

namespace | mbo

Classes

class | mbo::CIniData
Storage/Retrieval of Initialisation data. More...

Functions

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 _E, class _Tr, class _A>
COLORREF | StrToColor (const std::basic_string< _E, _Tr, _A > &str, COLORREF colDefault)

Detailed Description

class CIniData: storage/retrieval of initialisation data.

Author:
Marcus Boerger (http://marcus-boerger.de/)

  • class mbo::CIniData

Note:
You must compile this source with RTTI enabled.

This file is distributed under the following license Mbo License.

See also:
INI_FILE_MAIN_PAGE for a description of supported Ini Files.
An ini file consits of several groups containing several key=value pairs as follows:

 [group-name-1]
 key-name-1=value-1
 key-name-2=value-2
 [group-name-2]
 key-name-3=value-3
 key-name-4=value-4

Any empty lines are ignored and comments are not possible. However it is common to not have any keyname starting with ";" or "#". So that lines starting with one of these characters are usually ignored.

Keynames may be appended by additional whitespace and whitespace before or after a value is ignored. If a value is enclosed in single or double quotes then the surrounding quotes are dropped and the value inside the quotes is taken as this. This way whitespace at beginning or end of a value is possible.

List of types

  • <string>
  • <filename>
  • <path>
  • <integer>
  • <long>
  • <float>
  • <boolean>
  • <color>
  • <map>

Ini string

A string setting is any value but the left and right most whitespace is ignored and you cannot have ini settings that exceed one line.

  • CIniData::GetString
  • CIniData::ReadString
  • CIniData::GetIniString [static]
  • CIniData::WriteString

Ini filename

A filename is basically the same as string but it is intended for filenames. The difference is that filename settings may contain environment variables. For example %TEMP% will be replaced in the value of the environment variable TEMP. If an environment variable contains other environment variables the resolution is done recursively. If you need a single % in you setting then you must use double %% in you setting.

Ini path

Same as filename but used for directories.

Ini integer

This is used for settings in integer format with type int.

  • CIniData::GetInt
  • CIniData::ReadInt
  • CIniData::GetIniInt [static]
  • CIniData::WriteInt

Ini long

This is used for settings in integer format with type long.

  • CIniData::GetLong
  • CIniData::ReadLong
  • CIniData::GetIniLong [static]
  • CIniData::WriteLong

Ini float

This is used for floating point settings with type float.

  • CIniData::GetFloat
  • CIniData::ReadFloat
  • CIniData::GetIniFloat [static]
  • CIniData::WriteFloat

Ini boolean

A boolean value is either true or false. The following values are recognized as true: "true", "yes", "on", "ja", "1". The next list shows values recognized as false: "false", "no", "off", "nein", "0". Any other value is ignored and instead the default value will be used.

  • CIniData::GetBool
  • CIniData::ReadBool
  • CIniData::GetIniBool [static]
  • CIniData::WriteBool

Ini color

A color value is denoted by the three color components red, green and blue in any order with range 0 to 255 each. These components are all optional where an omitted value will be set to 0. The format is as follows:

 key-name=R=<red>,G=<green>,B=<blue>
  • CIniData::GetColor
  • CIniData::ReadColor
  • CIniData::GetIniColor [static]
  • CIniData::WriteColor

Ini map

Maps are group level elements. That is all elements within a group are taken for elements of the map.

 [<string>]
 <string>=<string>
 <string>=<string>
 ...

  • CIniData::GetMap
  • CIniData::ReadMap
  • CIniData::GetIniMap [static]
  • CIniData::WriteMap

Function Documentation

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 _E, class _Tr, class _A>
COLORREF StrToColor | ( | const std::basic_string< _E, _Tr, _A > & | str,
 |  | COLORREF | colDefault
 | ) |

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboLockedVar.h File Reference

MboLockedVar.h File Reference

Locked variables. More...

#include "Mbo.h"
#include "MboSynch.h"

Go to the source code of this file.

Namespaces

namespace | mbo

Classes

class | mbo::LockedVar< T, _THREAD_MODEL >
locked variable More...
class | mbo::LockedVar< bool, ThreadModel >
locked boolean variable More...

Detailed Description

Locked variables.

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
This file is distributed under the following license Mbo License.
This file defines the following synchronisation mechanismns:
  • LockedVar
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboMatrix.h File Reference

MboMatrix.h File Reference

#include <exception>

Go to the source code of this file.

Namespaces

namespace | mbo

Classes

class | mbo::Matrix< _Ty, _Cols, _Rows >
Matrix class. More...
class | mbo::MatrixException
Matrix exception class. More...
class | mbo::Vector< _Ty, _Cols >

Defines

#define | max(a, b) (((a) > (b)) ? (a) : (b))
#define | min(a, b) (((a) < (b)) ? (a) : (b))

Functions

template<class _Ty, size_t _Cols1Rows2, size_t _Rows1, size_t _Cols2>
Matrix< _Ty, _Cols, _Rows > | operator * (const Matrix< _Ty, _Cols1Rows2, _Rows1 > &lhs, const Matrix< _Ty, _Cols2, _Cols1Rows2 > &rhs)
template<class _Ty, size_t _Cols, size_t _Rows>
Matrix< _Ty, _Cols, _Rows > | operator * (const Matrix< _Ty, _Cols, _Rows > &lhs, const _Ty &c)
template<class _Ty, size_t _Cols, size_t _Rows>
Matrix< _Ty, _Cols, _Rows > | operator! (Matrix< _Ty, _Cols, _Rows > rhs)
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 _Ty, size_t _Cols, size_t _Rows>
Matrix< _Ty, _Cols, _Rows > | operator+ (const Matrix< _Ty, _Cols, _Rows > &lhs, const Matrix< _Ty, _Cols, _Rows > &rhs)
template<class _Ty, size_t _Cols, size_t _Rows>
Matrix< _Ty, _Cols, _Rows > | operator- (const Matrix< _Ty, _Cols, _Rows > &lhs, const Matrix< _Ty, _Cols, _Rows > &rhs)
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 _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>
Matrix< _Ty, _Cols, _Rows > | operator^ (const Matrix< _Ty, _Cols, _Rows > &lhs, const size_t &rhs)
template<class _Ty, size_t _Cols, size_t _Rows>
Matrix< _Ty, _Cols, _Rows > | operator~ (const Matrix< _Ty, _Cols, _Rows > &rhs)

Variables

return | true

Define Documentation

#define max | ( | a,
 |  | b | ) | (((a) > (b)) ? (a) : (b))

#define min | ( | a,
 |  | b | ) | (((a) < (b)) ? (a) : (b))

Function Documentation

template<class _Ty, size_t _Cols1Rows2, size_t _Rows1, size_t _Cols2>
Matrix<_Ty, _Cols, _Rows> operator * | ( | const Matrix< _Ty, _Cols1Rows2, _Rows1 > & | lhs,
 |  | const Matrix< _Ty, _Cols2, _Cols1Rows2 > & | rhs
 | ) |

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows> operator * | ( | const Matrix< _Ty, _Cols, _Rows > & | lhs,
 |  | const _Ty & | c
 | ) |

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows> operator! ( Matrix< _Ty, _Cols, _Rows > rhs )

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 _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows> operator+ | ( | const Matrix< _Ty, _Cols, _Rows > & | lhs,
 |  | const Matrix< _Ty, _Cols, _Rows > & | rhs
 | ) |

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows> operator- | ( | const Matrix< _Ty, _Cols, _Rows > & | lhs,
 |  | const Matrix< _Ty, _Cols, _Rows > & | rhs
 | ) |

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 _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>
Matrix<_Ty, _Cols, _Rows> operator^ | ( | const Matrix< _Ty, _Cols, _Rows > & | lhs,
 |  | const size_t & | rhs
 | ) |

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows> operator~ ( const Matrix< _Ty, _Cols, _Rows > & rhs )

Variable Documentation

return mbo::true

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboRefCntPtr.h File Reference

MboRefCntPtr.h File Reference

class mbo::RefCntPtr: reference counted pointer More...

#include "Mbo.h"
#include "MboSynch.h"

Go to the source code of this file.

Namespaces

namespace | mbo

Classes

class | mbo::NullPointer< _Ty >
Incomplete null pointer type. More...
class | mbo::NullPointer< _Ty >::nullptr_access
exception for null-pointer access violations More...
class | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
Reference counted pointer. More...
struct | mbo::RefCntRep< _Ty, _THREAD_MODEL >
Reference counted pointer representation. More...

Detailed Description

class mbo::RefCntPtr: reference counted pointer

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
This file is distributed under the following license Mbo License.
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboStrHelper.h File Reference

MboStrHelper.h File Reference

String helper (template) functions. More...

#include "Mbo.h"
#include "MboTString.h"
#include <string>
#include <sstream>
#include <assert.h>

Go to the source code of this file.

Namespaces

namespace | mbo

Defines

#define | snprintf _snprintf

Functions

template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr,
_A > 		LeftString (const std::basic_string< _E, _Tr, _A > &str, std::basic_string< _E, _Tr, _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>
std::basic_string< _E, _Tr,
_A > 		LeftString (const std::basic_string< _E, _Tr, _A > &str, std::basic_string< _E, _Tr, _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, std::basic_string< _E, _Tr, _A >::size_type nLength, const std::basic_string< _E, _Tr, _A > *strMore=0, const std::basic_string< _E, _Tr, _A > *strAppend=0)
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<>
std::basic_string< char > | StrFrom (const bool &val)
template<>
std::basic_string< char > | StrFrom (const long &val)
template<>
std::basic_string< char > | StrFrom (const int &val)
template<class _E, typename _ValType>
std::basic_string< _E > | StrFrom (const _ValType &val)
template<class _E>
std::basic_string< _E > | StrFromBool (bool val)
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, class _Tr, class _A>
std::basic_string< _E, _Tr,
_A > & 		StrLower (std::basic_string< _E, _Tr, _A > &str)
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 > & 		StrParseEnvVars (std::basic_string< _E, _Tr, _A > &str)
template<class _E, class _Tr, class _A>
void | 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>
bool | StrStartsWith (const std::basic_string< _E, _Tr, _A > &str, const std::basic_string< _E, _Tr, _A > &strPrefix, bool bCaseSensitive=true)
template<typename _ValType, class _E, class _Tr, class _A>
_ValType | StrTo (const std::basic_string< _E, _Tr, _A > &str)
template<>
float | StrToFloat (const std::basic_string< char > &str)
template<class _E, class _Tr, class _A>
float | StrToFloat (const std::basic_string< _E, _Tr, _A > &str)
template<>
int | StrToInt (const std::basic_string< char > &str)
template<class _E, class _Tr, class _A>
int | StrToInt (const std::basic_string< _E, _Tr, _A > &str)
template<>
long | StrToLong (const std::basic_string< char > &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>
std::basic_string< _E, _Tr,
_A > & 		StrTrim (std::basic_string< _E, _Tr, _A > &str)
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 > 		StrUCFirst (const std::basic_string< _E, _Tr, _A > &str)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr,
_A > & 		StrUpper (std::basic_string< _E, _Tr, _A > &str)

Detailed Description

String helper (template) functions.

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
This file is distributed under the following license Mbo License.

Define Documentation

#define snprintf _snprintf

Function Documentation

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

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

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

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
 | ) | [inline]

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

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

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

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

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

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

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

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

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

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

template<class _E, class _Tr, class _A>
void 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]

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
 | ) | [inline]

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

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

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

template<>
int StrToInt ( const std::basic_string< char > & str ) [inline]

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

template<>
long StrToLong ( const std::basic_string< char > & str ) [inline]

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

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

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

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

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

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

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboStrList.h File Reference

MboStrList.h File Reference

String list class:
  • class mbo::CStrList
. More...

#include "Mbo.h"
#include "map2.h"
#include "list2.h"
#include "vector2.h"
#include "MboStrHelper.h"

Go to the source code of this file.

Namespaces

namespace | mbo

Classes

class | mbo::CStrList
default CStr container More...

Defines

#define | CStrListContainer std::deque2
#define | MboStrList0() mbo::CStrList()
#define | MboStrList1(s1) mbo::CStrList::dyn_create(1, MboString(_CT(s1)))
#define | MboStrList2(s1, s2) mbo::CStrList::dyn_create(2, MboString(_CT(s1)), MboString(_CT(s2)))
#define | MboStrList3(s1, s2, s3) mbo::CStrList::dyn_create(3, MboString(_CT(s1)), MboString(_CT(s2)), MboString(_CT(s3)))
#define | MboStrList4(s1, s2, s3, s4) mbo::CStrList::dyn_create(4, MboString(_CT(s1)), MboString(_CT(s2)), MboString(_CT(s3)), MboString(_CT(s4)))
#define | MboStrList5(s1, s2, s3, s4, s5) mbo::CStrList::dyn_create(5, MboString(_CT(s1)), MboString(_CT(s2)), MboString(_CT(s3)), MboString(_CT(s4)), MboString(_CT(s5)))

Detailed Description

String list class:
  • class mbo::CStrList
.

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
You must compile this source with RTTI enabled.

This file is distributed under the following license Mbo License.

Define Documentation

#define CStrListContainer std::deque2

defines the default string list container

this is used for both CStrList and CStrMapStr and ensures interoperability of these two classes be CStrList::operator= CStrMapStr::values() and CStrMapStr::keys().

#define MboStrList0 ( ) mbo::CStrList()

Create an empty CStrList

#define MboStrList1 ( s1 ) mbo::CStrList::dyn_create(1, MboString(_CT(s1)))

Create a CStrList from 1 element (must convertable into MboString)

#define MboStrList2 | ( | s1,
 |  | s2 | ) | mbo::CStrList::dyn_create(2, MboString(_CT(s1)), MboString(_CT(s2)))

Create a CStrList from 2 element (must convertable into MboString)

#define MboStrList3 | ( | s1,
 |  | s2,
 |  | s3 | ) | mbo::CStrList::dyn_create(3, MboString(_CT(s1)), MboString(_CT(s2)), MboString(_CT(s3)))

Create a CStrList from 3 elements (must convertable into MboString)

#define MboStrList4 | ( | s1,
 |  | s2,
 |  | s3,
 |  | s4 | ) | mbo::CStrList::dyn_create(4, MboString(_CT(s1)), MboString(_CT(s2)), MboString(_CT(s3)), MboString(_CT(s4)))

Create a CStrList from 4 elements (must convertable into MboString)

#define MboStrList5 | ( | s1,
 |  | s2,
 |  | s3,
 |  | s4,
 |  | s5 | ) | mbo::CStrList::dyn_create(5, MboString(_CT(s1)), MboString(_CT(s2)), MboString(_CT(s3)), MboString(_CT(s4)), MboString(_CT(s5)))

Create a CStrList from 5 elements (must convertable into MboString)

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboStrMap.h File Reference

MboStrMap.h File Reference

associative array classes:
  • class mbo::CStrMap template [string] -> any type
  • class mbo::CStrMapStr [string] -> string
More...

#include "Mbo.h"
#include "map2.h"
#include "list2.h"
#include "vector2.h"
#include "MboStrHelper.h"
#include "MboTString.h"
#include "MboStrList.h"

Go to the source code of this file.

Namespaces

namespace | mbo

Classes

class | mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc >
map2 using CStr as Key type (case insenstive) More...
class | mbo::CStrMapStr
map2 using CStr as Key type (case insensitive) and as Value type More...
struct | mbo::less_cstr_ic
case insensitive prediction function based on CStr More...

Functions

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

Detailed Description

associative array classes:
  • class mbo::CStrMap template [string] -> any type
  • class mbo::CStrMapStr [string] -> string

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
You must compile this source with RTTI enabled.

This file is distributed under the following license Mbo License.

Function Documentation

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

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboSynch.h File Reference

MboSynch.h File Reference

Synchronization objects for multi threaded targets and their corresponding fakes for use in single threaded targets. This can also be used to implement class templates that can be instanciated with or without locking functionality. More...

#include "Mbo.h"
#include <assert.h>
#include <vector>

Go to the source code of this file.

Namespaces

namespace | mbo
namespace | mbo::MultiThreaded
namespace | mbo::SingleThreaded

Classes

class | mbo::CCriticalSectionFake
Critical Section Fake. More...
class | mbo::CCriticalSectionImpl
Critical Section Implementation. More...
class | mbo::CEventFake
Event emulation. More...
class | mbo::CEventImpl
Event implementation. More...
class | mbo::CLock
class | mbo::CLockFake
Fake Lock implementation. More...
class | mbo::CLockMulti
Multi-Lock implementation. More...
class | mbo::CLockSingle
Single-Lock implementation. More...
class | mbo::CMutexFake
Mutex emulation. More...
class | mbo::CMutexImpl
Mutex implementation. More...
class | mbo::CUnlock
Automatic local Lock unlock. More...
class | mbo::ICriticalSection
Critical Section Interface. More...
class | mbo::IEvent
Event implementation. More...
class | mbo::ILock
Lock interface. More...
class | mbo::IMutex
Mutex Interface. More...
class | mbo::MutexList
MutexList implementation. More...
class | mbo::SingleThreaded::ThreadModel
Class that defines types to use in/for NON multithreaded environments. More...
class | mbo::MultiThreaded::ThreadModel
Class that defines types to be used in/for thread-safe environments. More...

Defines

#define | MBO_MEMBER_MUTEX_IMPL(name, model)
#define | MBO_MULTI_LOCK_SLEEPTIME 5

Typedefs

typedef ThreadModel::CriticalSection | CriticalSection
typedef ThreadModel::EventModel | EventModel
typedef LONG | IncDecVal
typedef ThreadModel::Lock | Lock
typedef ThreadModel::LockMulti | LockMulti
typedef ThreadModel::LockSingle | LockSingle
typedef MultiThreaded::ThreadModel | MultiThreadedModel
typedef ThreadModel::MutexModel | MutexModel
typedef SingleThreaded::ThreadModel | SingleThreadedModel
typedef SingleThreaded::ThreadModel | ThreadModel
typedef ThreadModel::Unlock | Unlock

Detailed Description

Synchronization objects for multi threaded targets and their corresponding fakes for use in single threaded targets. This can also be used to implement class templates that can be instanciated with or without locking functionality.

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
This file is distributed under the following license Mbo License.
This file defines the following synchronisation mechanismns:
  • Mutex
  • Lock
  • Event
  • Interlocked incrementation/decrementation

For all these things there is an interface, an implemantation and an emulation. The interface is the type you should use in your code unless you want to force either the implementation or the emulation. Assuming you have chosen to use the interface you can use both interchangeable:

                                      |----------------|
                             ---------| implementation |
     |------------|          |        |----------------|
     | interface  |<---------|
     |------------|          |        |----------------|
                             ---------|   emulation    |
                                      |----------------|

All implementations are collected in the class ThreadModel in the namespace MultiThreaded and all emulations are collected in the class ThreadModel in the namespace SingleThreaded. The IDE controlled macro _MT imports one of the two ThreadModel classes and all the sub classes into this namespace. Doing this you can use the following types while the IDE automatically controlls whether or not thread safetiness has to be used:

  • EventModel
  • MutexModel
  • LockSingle
  • LockMulti
  • Lock
  • IncDecVal (Increment(), Decrement(), PeekValue())

Under windows the macro _MT specifies that the target will be multi threaded. This is used to correctly set typedef ThreadModel to default model (single/multi). Additionally import all symbols defined in the corresponding namespace into this namespace.

Mutex example:

  template<class ThreadModel>
  class Base
  {
  private:
     ThreadModel::MutexModel m_mx;
  public:

     virtual void Get()
     {
       m_mx.Enter();
       ....
       m_mx.Leave();
     }

     virtual void Set();
     {
       m_mx.Enter();
       ....
       m_mx.Leave();
     }
  };
  typedef Base<MultiThreadedModel>   ImplMT;
  typedef Base<SingleThreadedModel>  ImplST;

ImplMT really has a Mutex and calls Enter/Leave on that Mutex. In contrast ImplST has only a faked Mutex with same Interface. But better call it emulation instead of fake because this emulation lets do all the thinks you can do with real Mutex.

In the above example we have created two compareable class types that can be used interchangeable.

If you need to use instances of both classes interchangeable in containers you must simply implement a base class interface and make the template a derived class:

  class IBase
  {
    virtual void Get() =0;
    virtual void Set() =0;
  }

  template<class ThreadModel>
  class Base: public IBase
  { ...};

  template<class _Ty>
  class Container....
  { ... };

  class ImplST: public IBase<SingleThreadedModel>
  { ... };

  class ImplMT: public IBase<MultiThreadedModel>
  { ... };

  class BaseContainer: public Container<IBase>
  { ... };

In the above example we defined the template Container to hold any type and derived BaseContainer to hold IBase types. Therefore Base Container may store ImplST as well as ImplMT instances.

When using Synchronization objects one has to implement all necessary try catch blocks to have Leave been called in case of an exception and simple rethrow the exception.

Example from above:

  virtual void Get()
  {
    m_mx.Enter();
    try {
      ....
    }
    catch(...) {
      m_mx.Leave();
      throw;
    }
    m_mx.Leave();
  }

With Locks you simply do:

  virtual void Get()
  {
    ThreadModel::LockSingle lock(&m_mx);
    ....
    // as l_mxl is a local variable its destructor is called whether or
    // not an exception is throwed. And therefore allways Leave will be
    // executed from within the Lock destructor.
  }

Since further more the mutex interface is able to return a lock you should prefer using this. Especially in derived classes if you hide the methods Enter(), Leave() using private inheritance or the private mutex member. Look in case like in the following example:

  class ImplST: private IBase<SingleThreadedModel>
  { ...
  public:
    virtual void Get(); // increase visibility of inherited private method
  };

  class Derived: public ImplST
  {
    // Even though ImplST is derived public we can only access GetLock() here
    // because the mutex is inherited private.

    virtual void Get()
    {
      Lock  lock(GetLock());

      ....
    }
  };

The interfaces mostly useses const function members which requires an implementation with mutable member variables. This is done because

When defining the macro MBO_MAX_MUTEX_TIME to a value greater zero the concrete mutex implementation CMutexImpl loggs all cases where the outmost Enter()/Leave() calls took longer then that amount of time in milliseconds.

To include MboSynch in your project you need the files Mbo.h, MboSynch.h and MboSynch.cpp. If you build a library you must specify MBO_API to either be __declspec(dllexport) for the library itself and __declspec(dllimport) for every library that uses MboSynch as an external library. In the case of libraries you also need to include the correct Windows headers.

Define Documentation

#define MBO_MEMBER_MUTEX_IMPL | ( | name,
 |  | model | )

Value:

protected:\
    model::CriticalSection  m_mx ## name;\
    virtual mbo::CLock  GetLock() const { return mbo::CLock(&m_mx ## name); }
Marco that implements the IMutex interface with the slightly different names. That is every method within IMutex is implemented with its name appended by the given name. Also a protected Mutex with the given name prepended by 'm_mx' will be created.

This macro is extremely usefull when building multiple inheritance and more than one base class has a Mutex or if you want to work with locks.

Example:

  template<class ThreadModel>
  class A
  {
    MBO_MEMBER_MUTEX_IMPL(A,ThreadModel) // -> member m_mxA
  };

  template<class ThreadModel>
  class B
  {
    MBO_MEMBER_MUTEX_IMPL(B,ThreadModel) // -> member m_mxB
  };

Since classes A and B use the macro MBO_MEMBER_MUTEX_IMPL you do have the following functions:

  • void A::TryA(_IN DWORD nMilliseconds = 0) const
  • void A::EnterA() const
  • void A::LeaveA() const
  • mbo::Lock A::GetLgockForA() const
  • void B::TryB(_IN DWORD nMilliseconds = 0) const
  • void B::EnterB() const
  • void B::LeaveB() const
  • mbo::Lock B::GetLgockForB() const

  template<class ThreadModel>
  class C: public A<ThreadModel>, public B<ThreadModel>, pblic IMutex
  {
  public:

    virtual void Action()
    {
      Enter();
      try {
        ...
      }
      catch(...) {
        Leave();
        throw;
      }
      Leave()
    }

  protected:

    virtual void Try()
    {
      return ThreadModel::LockMulti::Try(NULL, 2, &m_mxA, &m_mxB);
    }

    virtual void Leave()
    {
      ThreadModel::LockMulti::Leave(NULL, 2, &m_mxA, &m_mxB);
    }
  };

You do not have to implement Enter() from IMutex for class C because that function uses Try by default.

You can simplify local mutual exclusion by using CLock:

  class D: public C
  {
  public:

    virtual void Action()
    {
      ThreadModel::CLock lock(GetLock());
      ...
    }

    virtual void Action2()
    {
      ThreadModel::CLock lock(ThreadModel::CMultiLock(&m_mxA, &m_mxB);
      ...
    }

  protected:

    virtual CLock GetLock() const
    {
      return ThreadModel::CLockMulti(&m_mxA, &m_mxB);
    }
  };

In the above example it is important that GetLock returns a CLock instance by copy. Because first you cannot return a local address inside a member function and second but more important otherwise Enter/Leave would be incorrectly used on m_mxA and m_mxB.

Further more it is of no importance whether the CLock instance is created by an already Entered ILock or not. Therefore you do not have to call the functions Enter() and Leave() manually yourself.

#define MBO_MULTI_LOCK_SLEEPTIME 5

Typedef Documentation

typedef ThreadModel::CriticalSection mbo::CriticalSection

Critical Section

typedef ThreadModel::EventModel mbo::EventModel

Event

typedef LONG mbo::IncDecVal

incrementation/decrementation type

typedef ThreadModel::Lock mbo::Lock

Automatic local Lock

typedef ThreadModel::LockMulti mbo::LockMulti

Multi Lock

typedef ThreadModel::LockSingle mbo::LockSingle

Single Lock

typedef MultiThreaded::ThreadModel mbo::MultiThreadedModel

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

typedef ThreadModel::MutexModel mbo::MutexModel

Mutex

typedef SingleThreaded::ThreadModel mbo::SingleThreadedModel

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

typedef SingleThreaded::ThreadModel mbo::ThreadModel

typedef ThreadModel::Unlock mbo::Unlock

Automatic local Lock unlock

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboThread.h File Reference

MboThread.h File Reference

thread classes:
  • class mbo::MboThread: basic thread implementation
  • class mbo::MboIntervalThread: an interval thread implementation
More...

#include "Mbo.h"
#include "MboSynch.h"
#include <map>
#include <list>
#include <typeinfo.h>

Go to the source code of this file.

Namespaces

namespace | mbo

Classes

class | mbo::MboDelayedEventThread
An event driven thread implementation. More...
class | mbo::MboEventThread
An event driven thread implementation. More...
class | mbo::MboIntervalThread
An interval thread implementation. More...
class | mbo::MboThread
A basic thread implementation. More...
class | mbo::MboWinMsgHandler
Windows message handler thread. More...

Detailed Description

thread classes:
  • class mbo::MboThread: basic thread implementation
  • class mbo::MboIntervalThread: an interval thread implementation

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
You must compile this source with RTTI enabled.

This file is distributed under the following license Mbo License.

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboTString.h File Reference

MboTString.h File Reference

string classes, typedefs, conversions and macros:
  • typedef TCHAR: depending on project setting either char or wchar_t (others possible too)
  • class mbo::tstring: TCHAR compatible string class
More...

#include "Mbo.h"
#include <locale>
#include <string>
#include <stdexcept>
#include <stdlib.h>
#include <tchar.h>

Go to the source code of this file.

Namespaces

namespace | mbo

Classes

class | mbo::string_conversion_error

Defines

#define | __USE_FACET
#define | _TS(text) mbo::TStrCreate(text)

Typedefs

typedef mbo::tstring | MboString
typedef char | TCHAR
typedef std::basic_string<
TCHAR > 		tstring

Functions

template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr,
_A > 		StrCreate (const char *sz)
std::basic_string< wchar_t > | StrToWStr (const std::basic_string< char > &str)
mbo::tstring | TStrCreate (const char *sz)
template<typename _ValType>
tstring | TStrFrom (const _ValType &val)
std::basic_string< char > | WStrToStr (const std::basic_string< wchar_t > &wstr)

Detailed Description

string classes, typedefs, conversions and macros:
  • typedef TCHAR: depending on project setting either char or wchar_t (others possible too)
  • class mbo::tstring: TCHAR compatible string class

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
This file is distributed under the following license Mbo License.

Define Documentation

#define __USE_FACET

#define _TS ( text ) mbo::TStrCreate(text)

Typedef Documentation

typedef mbo::tstring mbo::MboString

typedef char mbo::TCHAR

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

Function Documentation

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

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

mbo::tstring TStrCreate ( const char * sz )

template<typename _ValType>
tstring TStrFrom ( const _ValType & val )

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

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: reallocator.h File Reference

reallocator.h File Reference

reallocator More...

#include "Mbo.h"
#include "string.h"
#include <new>
#include <memory>

Go to the source code of this file.

Namespaces

namespace | mbo

Classes

class | mbo::allocator< __ValueType, __ReferenceType >
Allocator base using uninitalized memory. More...
struct | mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other >
class | mbo::mem_reallocator< __ValueType >
Allocator that supports reallocation working on malloc(). More...
class | mbo::reallocator< __ValueType >
Allocator that supports reallocation. More...

Detailed Description

reallocator

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
This file is distributed under the following license Mbo License.
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: TDynamicArray.h File Reference

TDynamicArray.h File Reference

dynamic array More...

#include "Mbo.h"
#include "reallocator.h"

Go to the source code of this file.

Namespaces

namespace | mbo

Classes

class | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
dynamic array More...
class | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
constant bidirectional iterator More...
class | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator
bidirectional iterator (non const) More...

Defines

#define | __DEPRECATED
#define | MBO_TDA_STL_ITERATOR 1
#define | mbo_tda_throw_if_not(exception, condition) mbo_throw_if_not(exception, condition)
#define | MBO_TDA_VERIFY 1

Detailed Description

dynamic array

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
This file is distributed under the following license Mbo License.

Define Documentation

#define __DEPRECATED

#define MBO_TDA_STL_ITERATOR 1

Controls whether the TDynamicArray iterators are stl complient. If so they can be used as random access iterators in any <algorithm> function. If this macro is defined to zero and the iterators do not inherit from the standard STL iterators then they still behave like normal iterators but the reverse iterators are not available.

#define mbo_tda_throw_if_not | ( | exception,
 |  | condition | ) | mbo_throw_if_not(exception, condition)

Controls how check violations are handled.

See also:
MBO_THROWS_EXCEPTIONS

MBO_TDA_VERIFY

#define MBO_TDA_VERIFY 1

Controls whether TDynamicArray verifies its operations. If the macro evaluates to a non zero value then MBO_THROW_EXCEPTIONS controls whether violating conditions results in throwing exceptions or abortion.

Warning:
Ignoring check violations leads to memory corruption.
See also:
MBO_THROWS_EXCEPTIONS

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: TStaticArray.h File Reference

TStaticArray.h File Reference

Static Array Template. More...

#include <stdexcept>
#include "Mbo.h"

Go to the source code of this file.

Classes

class | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >
static sized array of __ValueType More...
class | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator
constant bidirectional iterator More...
class | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator
bidirectional iterator (non const) More...

Defines

#define | throw_runtime_error_if_not(condition)

Detailed Description

Static Array Template.

(C) Ford Motor Company 2004 - 2004

Project: Electronic Horizon

Version:
Id
TStaticArray.h,v 1.4 2004/09/03 10:29:55 mboerger Exp
Date:
23.03.2004
Author:
M.Boerger

Define Documentation

#define throw_runtime_error_if_not ( condition )

Value:

if (!(condition)) { \
        throw std::out_of_range(std::string(__FILE__ "(") + mbo::StrFrom<char>(__LINE__ ) +  "): " #condition); \
    }

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: vector2.h File Reference

vector2.h File Reference

Extended deque template. More...

#include "Mbo.h"
#include <algorithm>
#include <vector>

Go to the source code of this file.

Namespaces

namespace | std

Classes

class | std::vector2< _Ty, _Alloc >
expanded vector template class More...

Detailed Description

Extended deque template.

Author:
Marcus Boerger (http://marcus-boerger.de/)

Note:
You must compile this source with RTTI enabled.

This file is distributed under the following license Mbo License.

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Class List

mbo Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
mbo::allocator< __ValueType, __ReferenceType > | Allocator base using uninitalized memory
mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other > |
binary_function |
mbo::CCriticalSectionFake | Critical Section Fake
mbo::CCriticalSectionImpl | Critical Section Implementation
mbo::CEventFake | Event emulation
mbo::CEventImpl | Event implementation
std::check_fun_t< _Tp, _Arg > | Binary function adaptor for check functions used by map2
mbo::CIniData | Storage/Retrieval of Initialisation data
mbo::CLock |
mbo::CLockFake | Fake Lock implementation
mbo::CLockMulti | Multi-Lock implementation
mbo::CLockSingle | Single-Lock implementation
mbo::CMutexFake | Mutex emulation
mbo::CMutexImpl | Mutex implementation
mbo::CStrList | Default CStr container
mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc > | Map2 using CStr as Key type (case insenstive)
mbo::CStrMapStr | Map2 using CStr as Key type (case insensitive) and as Value type
mbo::CUnlock | Automatic local Lock unlock
deque |
std::deque2< _Ty, _Alloc > | Expanded deque template class
exception |
mbo::ICriticalSection | Critical Section Interface
mbo::IEvent | Event implementation
mbo::ILock | Lock interface
mbo::IMutex | Mutex Interface
iterator |
iterator |
iterator |
iterator |
mbo::less_cstr_ic | Case insensitive prediction function based on CStr
list |
std::list2< _Ty, _Alloc > | Expanded list template class
mbo::LockedVar< T, _THREAD_MODEL > | Locked variable
mbo::LockedVar< bool, ThreadModel > | Locked boolean variable
map |
std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | Expanded map template class
mbo::Matrix< _Ty, _Cols, _Rows > | Matrix class
mbo::MatrixException | Matrix exception class
mbo::MboDelayedEventThread | An event driven thread implementation
mbo::MboDrawWin | A draw window independant from main application
mbo::MboEventThread | An event driven thread implementation
mbo::MboIntervalThread | An interval thread implementation
mbo::MboThread | A basic thread implementation
mbo::MboWinMsgHandler | Windows message handler thread
mbo::mem_reallocator< __ValueType > | Allocator that supports reallocation working on malloc()
mbo::MutexList | MutexList implementation
mbo::NullPointer< _Ty > | Incomplete null pointer type
mbo::NullPointer< _Ty >::nullptr_access | Exception for null-pointer access violations
mbo::reallocator< __ValueType > | Allocator that supports reallocation
mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | Reference counted pointer
mbo::RefCntRep< _Ty, _THREAD_MODEL > | Reference counted pointer representation
runtime_error |
runtime_error |
mbo::string_conversion_error |
mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | Dynamic array
mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | constant bidirectional iterator
mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | bidirectional iterator (non const)
mbo::MultiThreaded::ThreadModel | Class that defines types to be used in/for thread-safe environments
mbo::ThreadModel | Automatic selection of correct thread model
mbo::SingleThreaded::ThreadModel | Class that defines types to use in/for NON multithreaded environments
TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | Static sized array of __ValueType
TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | constant bidirectional iterator
TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | bidirectional iterator (non const)
vector |
mbo::Vector< _Ty, _Cols > |
vector |
std::vector2< _Ty, _Alloc > | Expanded vector template class
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::allocator< __ValueType, __ReferenceType > Class Template Reference

mbo::allocator< __ValueType, __ReferenceType > Class Template Reference

Allocator base using uninitalized memory. More...

#include <reallocator.h>

List of all members.

Public Types

typedef const __ValueType * | const_pointer
typedef const __ReferenceType & | const_reference
typedef ptrdiff_t | difference_type
typedef __ValueType * | pointer
typedef __ReferenceType & | reference
typedef size_t | size_type
typedef __ValueType | value_type

Public Member Functions

const_pointer | address (const_reference ref)
pointer | address (reference ref)
pointer | allocate (size_type size, allocator< void, char >::const_pointer hint=0L)
void | construct (pointer ptr, const_reference oth)
void | deallocate (pointer ptr, size_type size)
void | destroy (pointer ptr)
size_type | max_size () const

Detailed Description

template<class __ValueType, class __ReferenceType = __ValueType>
class mbo::allocator< __ValueType, __ReferenceType >

Allocator base using uninitalized memory.

Internally the handled element spaces are treated as char arrays.

Member Typedef Documentation

template<class __ValueType, class __ReferenceType = __ValueType>
typedef const __ValueType* mbo::allocator< __ValueType, __ReferenceType >::const_pointer

type used with const element pointer operations (read only)

template<class __ValueType, class __ReferenceType = __ValueType>
typedef const __ReferenceType& mbo::allocator< __ValueType, __ReferenceType >::const_reference

type used with const element referencing (read only)

template<class __ValueType, class __ReferenceType = __ValueType>
typedef ptrdiff_t mbo::allocator< __ValueType, __ReferenceType >::difference_type

type used to calculate element position distances

template<class __ValueType, class __ReferenceType = __ValueType>
typedef __ValueType* mbo::allocator< __ValueType, __ReferenceType >::pointer

type used with element pointer operations (read/write)

template<class __ValueType, class __ReferenceType = __ValueType>
typedef __ReferenceType& mbo::allocator< __ValueType, __ReferenceType >::reference

type used with element referencing (read/write)

template<class __ValueType, class __ReferenceType = __ValueType>
typedef size_t mbo::allocator< __ValueType, __ReferenceType >::size_type

size type for element counting

template<class __ValueType, class __ReferenceType = __ValueType>
typedef __ValueType mbo::allocator< __ValueType, __ReferenceType >::value_type

type of the elements

Member Function Documentation

template<class __ValueType, class __ReferenceType = __ValueType>
const_pointer mbo::allocator< __ValueType, __ReferenceType >::address ( const_reference ref ) [inline]

Returns:
the const address of the element ref

template<class __ValueType, class __ReferenceType = __ValueType>
pointer mbo::allocator< __ValueType, __ReferenceType >::address ( reference ref ) [inline]

Returns:
the address of the element ref

template<class __ValueType, class __ReferenceType = __ValueType>
pointer mbo::allocator< __ValueType, __ReferenceType >::allocate | ( | size_type | size,
 |  | allocator< void, char >::const_pointer | hint = 0L
 | ) | [inline]

Allocate element space

Parameters:
size | number of elements required
hint | ignored
Returns:
allocated element space
No default constructors are executed.

template<class __ValueType, class __ReferenceType = __ValueType>
void mbo::allocator< __ValueType, __ReferenceType >::construct | ( | pointer | ptr,
 |  | const_reference | oth
 | ) | [inline]

Construct an element as a copy of another one

Parameters:
ptr | pointer to element position in element space
oth | other element to copy from
An inplace copy constructor will be executed.

template<class __ValueType, class __ReferenceType = __ValueType>
void mbo::allocator< __ValueType, __ReferenceType >::deallocate | ( | pointer | ptr,
 |  | size_type | size
 | ) | [inline]

Deallocate an element space.

Parameters:
ptr | element space to deallocate
size | number of elements in element space
No destructors are called.

Reimplemented in mbo::mem_reallocator< __ValueType >.

template<class __ValueType, class __ReferenceType = __ValueType>
void mbo::allocator< __ValueType, __ReferenceType >::destroy ( pointer ptr ) [inline]

Destroy an element by calling its destructor. No memory is freed.

Parameters:
element to destroy

template<class __ValueType, class __ReferenceType = __ValueType>
size_type mbo::allocator< __ValueType, __ReferenceType >::max_size ( ) const [inline]

Returns:
the theoretical maximum number of elements if no other storage was allocated anywhere else.

The documentation for this class was generated from the following file:
  • reallocator.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other > Struct Template Reference

mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other > Struct Template Reference

#include <reallocator.h>

List of all members.

Public Types

typedef allocator< __Other > other

Detailed Description

template<class __ValueType, class __ReferenceType = __ValueType>
template<class __Other>
struct mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other >

Support rebinding to allow indirect reusage of the allocator for other element types.

Member Typedef Documentation

template<class __ValueType, class __ReferenceType = __ValueType>
template<class __Other>
typedef allocator<__Other> mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other >::other

The documentation for this struct was generated from the following file:
  • reallocator.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: binary_function Class Reference

binary_function Class Reference

Inheritance diagram for binary_function:

mbo::less_cstr_ic std::check_fun_t< _Tp, _Arg >
The documentation for this class was generated from the following file:
  • MboStrMap.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CCriticalSectionFake Class Reference

mbo::CCriticalSectionFake Class Reference

Critical Section Fake. More...

#include <MboSynch.h>

Inheritance diagram for mbo::CCriticalSectionFake:

mbo::ICriticalSection List of all members.

Public Member Functions

virtual void | Enter () const
virtual unsigned long | GetLevel () const
virtual CLock | GetLock () const
virtual void | Leave () const

Detailed Description

Critical Section Fake.

Member Function Documentation

virtual void mbo::CCriticalSectionFake::Enter ( ) const [inline, virtual]

Enter the lock (NOP)

Implements mbo::ICriticalSection.

virtual unsigned long mbo::CCriticalSectionFake::GetLevel ( ) const [inline, virtual]

Returns:
Number of times CriticalSection is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

Always returns 1 so that CUnlock can work.

Implements mbo::ICriticalSection.

virtual CLock mbo::CCriticalSectionFake::GetLock ( ) const [inline, virtual]

Get Lock for Critical Section

Returns:
CLockFake

Implements mbo::ICriticalSection.

virtual void mbo::CCriticalSectionFake::Leave ( ) const [inline, virtual]

Leave the lock (NOP)

Implements mbo::ICriticalSection.

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CCriticalSectionImpl Class Reference

mbo::CCriticalSectionImpl Class Reference

Critical Section Implementation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::CCriticalSectionImpl:

mbo::ICriticalSection List of all members.

Public Member Functions

CCriticalSectionImpl ()
virtual void | Enter () const
virtual unsigned long | GetLevel () const
virtual CLock | GetLock () const
virtual void | Leave () const
virtual | ~CCriticalSectionImpl ()

Private Attributes

CRITICAL_SECTION | m_cs

Detailed Description

Critical Section Implementation.

Constructor & Destructor Documentation

mbo::CCriticalSectionImpl::CCriticalSectionImpl ( ) [inline]

Construct a Critical Section

virtual mbo::CCriticalSectionImpl::~CCriticalSectionImpl ( ) [inline, virtual]

destructor

Member Function Documentation

virtual void mbo::CCriticalSectionImpl::Enter ( ) const [inline, virtual]

Enter the lock

Implements mbo::ICriticalSection.

virtual unsigned long mbo::CCriticalSectionImpl::GetLevel ( ) const [inline, virtual]

Returns:
Number of times CriticalSection is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

Implements mbo::ICriticalSection.

virtual CLock mbo::CCriticalSectionImpl::GetLock ( ) const [inline, virtual]

Get Lock for Critical Section

Returns:
CLockSingle

Implements mbo::ICriticalSection.

virtual void mbo::CCriticalSectionImpl::Leave ( ) const [inline, virtual]

Leave the lock

Implements mbo::ICriticalSection.

Member Data Documentation

CRITICAL_SECTION mbo::CCriticalSectionImpl::m_cs [mutable, private]

Internally used System Provided Critical Section

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CEventFake Class Reference

mbo::CEventFake Class Reference

Event emulation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::CEventFake:

mbo::IEvent List of all members.

Public Member Functions

CEventFake (const bool bManualReset, const bool bInitialState=false)
virtual void | Pulse ()
virtual void | Reset ()
virtual void | Set ()
virtual bool | Wait (size_t nTime=INFINITE) const =0
virtual bool | Wait () const

Detailed Description

Event emulation.

Since this is an emulation you will have to consider the following:

  • Pulse() returns directly
  • Wait() returns directly with true

Note:
This class is distributed under the following license Mbo License.

Constructor & Destructor Documentation

mbo::CEventFake::CEventFake | ( | const bool | bManualReset,
 |  | const bool | bInitialState = false
 | ) | [inline, explicit]

Default constructor. (NOP)

Parameters:
bManualReset | mode of the signal
bInitialState | state after create: true => signaled, false => not signaled

Member Function Documentation

virtual void mbo::CEventFake::Pulse ( ) [inline, virtual]

emulate pulse Event (NOP)

Implements mbo::IEvent.

virtual void mbo::CEventFake::Reset ( ) [inline, virtual]

emulate reset Event (NOP)

Implements mbo::IEvent.

virtual void mbo::CEventFake::Set ( ) [inline, virtual]

emulate set Event (NOP)

Implements mbo::IEvent.

virtual bool mbo::IEvent::Wait ( size_t nTime = INFINITE ) const [pure virtual, inherited]

Pulse (wait & reset) the event.

If the signal is in signaled state: passes the function will return. If the signal is in not signaled state: wait until time elaspes. In automatic reset mode: set signal to not signaled on leaving the method.

Parameters:
nTime time to wait in milliseconds.
Returns:
The return value is true if Wait() exits because of signaled state reached. When false is returned the time nTime (in ms) has elapsed before the signaled state has been reached.

Implemented in mbo::CEventImpl.

virtual bool mbo::CEventFake::Wait ( ) const [inline, virtual]

emulate Wait

Returns:
true

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CEventImpl Class Reference

mbo::CEventImpl Class Reference

Event implementation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::CEventImpl:

mbo::IEvent List of all members.

Public Member Functions

CEventImpl (const bool bManualReset=true, const bool bInitialState=false)
virtual void | Pulse ()
virtual void | Reset ()
virtual void | Set ()
virtual bool | Wait (size_t nTime=INFINITE) const

Private Attributes

HANDLE | m_hEvent

Detailed Description

Event implementation.

Note:
This class is distributed under the following license Mbo License.

Constructor & Destructor Documentation

mbo::CEventImpl::CEventImpl | ( | const bool | bManualReset = true,
 |  | const bool | bInitialState = false
 | ) | [explicit]

Default constructor.

When bManualReset is set true the state of the object is left signaled once it gets signaled until Reset() method is called. With automatical reset the event automatically switches from signaled to not signaled if a thread passes the event with Wait().

Parameters:
bManualReset | mode of the signal
bInitialState | state after create: true => go, false => stop

Member Function Documentation

virtual void mbo::CEventImpl::Pulse ( ) [virtual]

Switch the signal to signaled and then

  • If no thread waits: switch back to not signaled.
  • If threads are waiting: In automatic reset mode only one thread can pass the Wait(). After this one thread the signal is switched back to not signaled. In manual reset mode all waiting threads pass Wait(). After all waiting threads have passed Wait(), the signal is switched back to not signaled.

Implements mbo::IEvent.

virtual void mbo::CEventImpl::Reset ( ) [virtual]

Set the signal into the not signaled state.

Implements mbo::IEvent.

virtual void mbo::CEventImpl::Set ( ) [virtual]

Set the signal into the signaled state.

Implements mbo::IEvent.

virtual bool mbo::CEventImpl::Wait ( size_t nTime = INFINITE ) const [virtual]

Pulse (wait & reset) the event.

If the signal is in signaled state: passes the function will return. If the signal is in not signaled state: wait until time elaspes. In automatic reset mode: set signal to not signaled on leaving the method.

Parameters:
nTime time to wait in milliseconds.
Returns:
The return value is true if Wait() exits because of signaled state reached. When false is returned the time nTime (in ms) has elapsed before the signaled state has been reached.

Implements mbo::IEvent.

Member Data Documentation

HANDLE mbo::CEventImpl::m_hEvent [private]

HANDLE used for WIN-API methods

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: std::check_fun_t< _Tp, _Arg > Class Template Reference

std::check_fun_t< _Tp, _Arg > Class Template Reference

binary function adaptor for check functions used by map2 More...

#include <map2.h>

Inheritance diagram for std::check_fun_t< _Tp, _Arg >:

binary_function List of all members.

Public Member Functions

check_fun_t (_fun_type __pf)
bool | operator() (const _Tp &__r, const _Arg &__x) const

Private Types

typedef bool(_Tp::* | _fun_type )(const _Arg &) const

Private Attributes

_fun_type _M_f

Detailed Description

template<class _Tp, class _Arg>
class std::check_fun_t< _Tp, _Arg >

binary function adaptor for check functions used by map2

binary function adaptor that takes a const class reference as caller class and a const class reference as argument. This is used with map2.values(check_fun_t). For that purpose a const_mem_fun1_ref_t would be slower since it needs each checked element to be copied before the check call can be done.

Parameters:
_Tp | type of instances to execute the function
_Arg | type of function arguments

Member Typedef Documentation

template<class _Tp, class _Arg>
typedef bool(_Tp::* std::check_fun_t< _Tp, _Arg >::_fun_type)(const _Arg &) const [private]

tape abbrevation for function type to use

Constructor & Destructor Documentation

template<class _Tp, class _Arg>
std::check_fun_t< _Tp, _Arg >::check_fun_t ( _fun_type __pf ) [inline, explicit]

explicit constructor

Member Function Documentation

template<class _Tp, class _Arg>
bool std::check_fun_t< _Tp, _Arg >::operator() | ( | const _Tp & | __r,
 |  | const _Arg & | __x
 | ) | const [inline]

execute binary function on instances of type _Tp with arguments of type _Arg.

Parameters:
__r | instance to execute the function
__x | argument to function
Returns:
result of binary function

Member Data Documentation

template<class _Tp, class _Arg>
_fun_type std::check_fun_t< _Tp, _Arg >::_M_f [private]

method accessible from _Tp to use as function

The documentation for this class was generated from the following file:
  • map2.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CIniData Class Reference

mbo::CIniData Class Reference

Storage/Retrieval of Initialisation data. More...

#include <MboIniData.h>

List of all members.

Public Member Functions

CIniData (const MboString &strFilename, const MboString &strSectionPrefix="")
virtual bool | ClearSection (const MboString &strSection)
virtual bool | GetBool (const MboString &strSection, const MboString &strKeyname, bool bDefault=false, bool bWriteDefault=false) const
virtual COLORREF | GetColor (const MboString &strSection, const MboString &strKeyname, COLORREF colDefault=RGB(0, 0, 0), bool bWriteDefault=false) const
virtual const MboString & | GetFilename () const
virtual float | GetFloat (const MboString &strSection, const MboString &strKeyname, float fDefault=0.0f, bool bWriteDefault=false, float fMinimum=FLT_MIN, float fMaximum=FLT_MAX) const
virtual int | GetInt (const MboString &strSection, const MboString &strKeyname, int nDefault=0, bool bWriteDefault=false, int nMinimum=INT_MIN, int nMaximum=INT_MAX) const
virtual bool | GetKeyNames (const MboString &strSection, CStrList &vstrKeyNames) const
virtual long | GetLong (const MboString &strSection, const MboString &strKeyname, long lDefault=0L, bool bWriteDefault=false, long lMinimum=LONG_MIN, long lMaximum=LONG_MAX) const
virtual CStrMapStr | GetMap (const MboString &strSection, const CStrMapStr &msstrDefault=CStrMapStr(), bool bWriteDefault=false, bool bWriteEmpty=false) const
bool | GetSectionNames (CStrList &vstrSectionNames) const
bool | GetSectionNames (const MboString &strSectionPrefix, CStrList &vstrSectionNames) const
virtual const MboString & | GetSectionPrefix () const
virtual MboString | GetString (const MboString &strSection, const MboString &strKeyname, const MboString &strDefault="", bool bWriteDefault=false, bool bParseEnvVars=false) const
virtual bool | KeyNameExists (const MboString &strSection, const MboString &strKeyname) const
virtual bool | ReadBool (const MboString &strSection, const MboString &strKeyname, bool &bValue, bool bDefault=false, bool bWriteDefault=false) const
virtual bool | ReadColor (const MboString &strSection, const MboString &strKeyname, COLORREF &colValue, COLORREF colDefault=RGB(0, 0, 0), bool bWriteDefault=false) const
virtual bool | ReadFloat (const MboString &strSection, const MboString &strKeyname, float &fValue, float fDefault=0.0f, bool bWriteDefault=false, float fMinimum=FLT_MIN, float fMaximum=FLT_MAX) const
virtual bool | ReadInt (const MboString &strSection, const MboString &strKeyname, int &nValue, int nDefault=0, bool bWriteDefault=false, int nMinimum=INT_MIN, int nMaximum=INT_MAX) const
virtual bool | ReadLong (const MboString &strSection, const MboString &strKeyname, long &lValue, long lDefault=0, bool bWriteDefault=false, long lMinimum=LONG_MIN, long lMaximum=LONG_MAX) const
virtual bool | ReadMap (const MboString &strSection, CStrMapStr &msstrValue, const CStrMapStr &msstrDefault=CStrMapStr(), bool bWriteDefault=false, bool bWriteEmpty=false) const
virtual bool | ReadString (const MboString &strSection, const MboString &strKeyname, MboString &strValue, const MboString &strDefault="", bool bWriteDefault=false, bool bParseEnvVars=false) const
bool | SectionExists (const MboString &strSection) const
virtual bool | WriteBool (const MboString &strSection, const MboString &strKeyname, bool bValue)
virtual bool | WriteColor (const MboString &strSection, const MboString &strKeyname, COLORREF colValue)
virtual bool | WriteFloat (const MboString &strSection, const MboString &strKeyname, float fValue)
virtual bool | WriteInt (const MboString &strSection, const MboString &strKeyname, int nValue)
virtual bool | WriteLong (const MboString &strSection, const MboString &strKeyname, long lValue)
virtual bool | WriteMap (const MboString &strSection, const CStrMapStr &msstrValue, bool bWriteEmpty=false)
virtual bool | WriteString (const MboString &strSection, const MboString &strKeyname, const MboString &strValue)
virtual | ~CIniData ()

Static Public Member Functions

bool | GetIniBool (const MboString &strFilename, const MboString &strSection, const MboString &strKeyname, bool bDefault=false, bool bWriteDefault=false)
COLORREF | GetIniColor (const MboString &strFilename, const MboString &strSection, const MboString &strKeyname, COLORREF colDefault=RGB(0, 0, 0), bool bWriteDefault=false)
float | GetIniFloat (const MboString &strFilename, const MboString &strSection, const MboString &strKeyname, float fDefault=0.0f, bool bWriteDefault=false, float fMinimum=FLT_MIN, float fMaximum=FLT_MAX)
int | GetIniInt (const MboString &strFilename, const MboString &strSection, const MboString &strKeyname, int nDefault=0, bool bWriteDefault=false, int nMinimum=INT_MIN, int nMaximum=INT_MAX)
long | GetIniLong (const MboString &strFilename, const MboString &strSection, const MboString &strKeyname, long lDefault=0L, bool bWriteDefault=false, long lMinimum=LONG_MIN, long lMaximum=LONG_MAX)
CStrMapStr | GetIniMap (const MboString &strFilename, const MboString &strSection, const CStrMapStr &msstrDefault=CStrMapStr(), bool bWriteDefault=false, bool bWriteEmpty=false)
MboString | GetIniString (const MboString &strFilename, const MboString &strSection, const MboString &strKeyname, const MboString &strDefault="", bool bWriteDefault=false, bool bParseEnvVars=false)

Protected Member Functions

mbo::CLock | IniDataGetLock () const

Private Attributes

mbo::MutexModel m_mxIniData
const MboString | m_strFilename
const MboString | m_strSectionPrefix

Detailed Description

Storage/Retrieval of Initialisation data.

Features:

  • All access methods are thread safe.
  • Only once in creation you specify the filename that holds the initialisation data.
  • An optional Section prefix can be set in creation to prefix all section operations. For example this way one file can be used from multiple modules using each their name as section prefix.

Constructor & Destructor Documentation

mbo::CIniData::CIniData | ( | const MboString & | strFilename,
 |  | const MboString & | strSectionPrefix = ""
 | ) | [explicit]

Construct an interface that uses the ini file strFilename.

If that file does not exist it will be created in the WINDOWS (WINNT) directory. All actions are atomic. With the exeption that some functions first clear sections with an atomic function and then write some data into the new section.

When strSectionPrefix is given each Section that will be read or written will be prepended by that prefix.

Parameters:
strFilename | Name of ini file to open or create.
strSectionPrefix | Section prefix to use for all section names.
Note:
If not explicitly stated the methods use strSectionPrefix to prefix all section names given as input parameters. Also the section prefix is automatically removed from returned section names.

virtual mbo::CIniData::~CIniData ( ) [virtual]

The destructor does not do anything with the file. As all actions are performed directly.

Member Function Documentation

virtual bool mbo::CIniData::ClearSection ( const MboString & strSection ) [virtual]

Clear (delete) specified section.

Removes the section header "[name]" and all "key=value" lines.

Parameters:
strSection Name of section to delete.
Returns:
Whether or not the operation succeeded.

virtual bool mbo::CIniData::GetBool | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | bool | bDefault = false,
 |  | bool | bWriteDefault = false
 | ) | const [virtual]

Same as ReadBool but here the value (read or default) is returned.

Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
bDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
Returns:
Value for key if found or default.

virtual COLORREF mbo::CIniData::GetColor | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | COLORREF | colDefault = RGB(0, 0, 0),
 |  | bool | bWriteDefault = false
 | ) | const [virtual]

Same as ReadColor but here the value (read or default) is returned.

Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
colDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
Returns:
Value for key if found or default.

virtual const MboString& mbo::CIniData::GetFilename ( ) const [virtual]

Read access to the name of the file used internally.

Returns:
filename

virtual float mbo::CIniData::GetFloat | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | float | fDefault = 0.0f,
 |  | bool | bWriteDefault = false,
 |  | float | fMinimum = FLT_MIN,
 |  | float | fMaximum = FLT_MAX
 | ) | const [virtual]

Same as ReadFloat but here the value (read or default) is returned.

Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
fDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
fMinimum | Lower values will be replaced by this minimum.
fMaximum | Higher values will be replaced by this maximum.
Returns:
Value for key if found or default.

bool mbo::CIniData::GetIniBool | ( | const MboString & | strFilename,
 |  | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | bool | bDefault = false,
 |  | bool | bWriteDefault = false
 | ) | [static]

Same as GetBool but static from file without the need to first create a CIniData instance. Use this only if you access one single value.

Parameters:
strFilename | Name of ini file to read.
strSection | Name of section to search.
strKeyname | Name of key to search.
bDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
Returns:
Value for key if found or default.

COLORREF mbo::CIniData::GetIniColor | ( | const MboString & | strFilename,
 |  | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | COLORREF | colDefault = RGB(0, 0, 0),
 |  | bool | bWriteDefault = false
 | ) | [static]

Same as GetColor but static from file without the need to first create a CIniData instance. Use this only if you access one single value.

Parameters:
strFilename | Name of ini file to read.
strSection | Name of section to search.
strKeyname | Name of key to search.
colDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
Returns:
Value for key if found or default.

float mbo::CIniData::GetIniFloat | ( | const MboString & | strFilename,
 |  | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | float | fDefault = 0.0f,
 |  | bool | bWriteDefault = false,
 |  | float | fMinimum = FLT_MIN,
 |  | float | fMaximum = FLT_MAX
 | ) | [static]

Same as GetFloat but static from file without the need to first create a CIniData instance. Use this only if you access one single value.

Parameters:
strFilename | Name of ini file to read.
strSection | Name of section to search.
strKeyname | Name of key to search.
fDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
fMinimum | Lower values will be replaced by this minimum.
fMaximum | Higher values will be replaced by this maximum.
Returns:
Value for key if found or default.

int mbo::CIniData::GetIniInt | ( | const MboString & | strFilename,
 |  | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | int | nDefault = 0,
 |  | bool | bWriteDefault = false,
 |  | int | nMinimum = INT_MIN,
 |  | int | nMaximum = INT_MAX
 | ) | [static]

Same as GetInt but static from file without the need to first create a CIniData instance. Use this only if you access one single value.

Parameters:
strFilename | Name of ini file to read.
strSection | Name of section to search.
strKeyname | Name of key to search.
nDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
nMinimum | Lower values will be replaced by this minimum.
nMaximum | Higher values will be replaced by this maximum.
Returns:
Value for key if found or default.

long mbo::CIniData::GetIniLong | ( | const MboString & | strFilename,
 |  | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | long | lDefault = 0L,
 |  | bool | bWriteDefault = false,
 |  | long | lMinimum = LONG_MIN,
 |  | long | lMaximum = LONG_MAX
 | ) | [static]

Same as GetIni but static from file without the need to first create a CIniData instance. Use this only if you access one single value.

Parameters:
strFilename | Name of ini file to read.
strSection | Name of section to search.
strKeyname | Name of key to search.
lDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
lMinimum | Lower values will be replaced by this minimum.
lMaximum | Higher values will be replaced by this maximum.
Returns:
Value for key if found or default.

CStrMapStr mbo::CIniData::GetIniMap | ( | const MboString & | strFilename,
 |  | const MboString & | strSection,
 |  | const CStrMapStr & | msstrDefault = CStrMapStr(),
 |  | bool | bWriteDefault = false,
 |  | bool | bWriteEmpty = false
 | ) | [static]

Same as GetMap but static from file without the need to first create a CIniData instance. Use this only if you access one single value.

Parameters:
strFilename | Name of ini file to read.
strSection | Name of section to search.
msstrDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if section is not present in the ini file.
bWriteEmpty | If the section is not present in the ini file this parameter determines wether or not empty values result in writing "key=" lines to the ini file.
Returns:
String map read from ini file or default.
Note:
This method uses the copy constructor for the return value. This is slower compared to the ReadMap method which returns the result by reference. Hence it is defined deprecated.

MboString mbo::CIniData::GetIniString | ( | const MboString & | strFilename,
 |  | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | const MboString & | strDefault = "",
 |  | bool | bWriteDefault = false,
 |  | bool | bParseEnvVars = false
 | ) | [static]

Same as GetString but static from file without the need to first create a CIniData instance. Use this only if you access one single value.

Parameters:
strFilename | Name of ini file to read.
strSection | Name of section to search.
strKeyname | Name of key to search.
strDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
bParseEnvVars | Whether or not environment variables should be parsed. If so "%name%" will be replaced by the value of the environment variable "name".
Returns:
Value for key if found or default.

virtual int mbo::CIniData::GetInt | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | int | nDefault = 0,
 |  | bool | bWriteDefault = false,
 |  | int | nMinimum = INT_MIN,
 |  | int | nMaximum = INT_MAX
 | ) | const [virtual]

Same as ReadInt but here the value (read or default) is returned.

Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
nDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
nMinimum | Lower values will be replaced by this minimum.
nMaximum | Higher values will be replaced by this maximum.
Returns:
Value for key if found or default.

virtual bool mbo::CIniData::GetKeyNames | ( | const MboString & | strSection,
 |  | CStrList & | vstrKeyNames
 | ) | const [virtual]

Retrieves all keynames in section strSection.

Parameters:
strSection Name of section to search.
Return values:
vstrKeyNames Keynames contained in specified section.
Returns:
Whether or not at least one key was found.

virtual long mbo::CIniData::GetLong | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | long | lDefault = 0L,
 |  | bool | bWriteDefault = false,
 |  | long | lMinimum = LONG_MIN,
 |  | long | lMaximum = LONG_MAX
 | ) | const [virtual]

Same as ReadLong but here the value (read or default) is returned.

Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
lDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
lMinimum | Lower values will be replaced by this minimum.
lMaximum | Higher values will be replaced by this maximum.
Returns:
Value for key if found or default.

virtual CStrMapStr mbo::CIniData::GetMap | ( | const MboString & | strSection,
 |  | const CStrMapStr & | msstrDefault = CStrMapStr(),
 |  | bool | bWriteDefault = false,
 |  | bool | bWriteEmpty = false
 | ) | const [virtual]

Same as ReadMap but here the value (read or default) is returned.

Parameters:
strSection | Name of section to search.
msstrDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if section is not present in the ini file.
bWriteEmpty | If the section is not present in the ini file this parameter determines wether or not empty values result in writing "key=" lines to the ini file.
Returns:
String map read from ini file or default.
Note:
This method uses the copy constructor for the return value. This is slower compared to the ReadMap method which returns the result by reference. Hence it is defined deprecated.

bool mbo::CIniData::GetSectionNames ( CStrList & vstrSectionNames ) const

Retrieve all sectionnames starting with strSection The returned Names will not contain the global SectionPrefix.

Return values:
vstrSectionNames Retrieves all found (matched) sections. The list will be cleared first.
Returns:
whether or not any (matched) section was found.

bool mbo::CIniData::GetSectionNames | ( | const MboString & | strSectionPrefix,
 |  | CStrList & | vstrSectionNames
 | ) | const

Retrieve all sectionnames starting with strSection The returned Names will not contain the global SectionPrefix but the local strSectionPrefix.

Parameters:
strSectionPrefix Additional section prefix to search for.
Return values:
vstrSectionNames Retrieves all found (matched) sections. The list will be cleared first.
Returns:
whether or not any (matched) section was found.

virtual const MboString& mbo::CIniData::GetSectionPrefix ( ) const [virtual]

Read access to the section prefix applied to all functions.

Returns:
section prefix

virtual MboString mbo::CIniData::GetString | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | const MboString & | strDefault = "",
 |  | bool | bWriteDefault = false,
 |  | bool | bParseEnvVars = false
 | ) | const [virtual]

Same as ReadString but here the value (read or default) is returned.

Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
strDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
bParseEnvVars | Whether or not environment variables should be parsed. If so "%name%" will be replaced by the value of the environment variable "name".
Returns:
Value for key if found or default.

mbo::CLock mbo::CIniData::IniDataGetLock ( ) const [protected]

Get Lock for instance

virtual bool mbo::CIniData::KeyNameExists | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname
 | ) | const [virtual]

Check whether or not a specific KeyName exists in section strSection.

Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
Returns:
Whether or not key exists in given section.

virtual bool mbo::CIniData::ReadBool | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | bool & | bValue,
 |  | bool | bDefault = false,
 |  | bool | bWriteDefault = false
 | ) | const [virtual]

Read a boolean value from strSection with name strKeyname. When there is no such value stored in the file the default value bDefault is used. The function returns whether or not the returned value was read from file. When the value was read from file and a conversion error occures the returned value is zero (not default). The parameter bWriteDefault can be set true to ensure the ini directive exists after first read attempt in case it could not be found while reading. In that case this read function is no longer a const function.

Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
Return values:
bValue Value for key if found or default.
Parameters:
bDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
Returns:
Whether or not returned value was read from ini file.

virtual bool mbo::CIniData::ReadColor | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | COLORREF & | colValue,
 |  | COLORREF | colDefault = RGB(0, 0, 0),
 |  | bool | bWriteDefault = false
 | ) | const [virtual]

Read a COLORREF value from strSection with name strKeyname. When there is no such value stored in the file the default value colDefault is used. The function returns whether or not the returned value was read from file. When the value was read from file and a conversion error occures for any color component that value is set to zero. The parameter bWriteDefault can be set true to ensure the ini directive exists after first read attempt in case it could not be found while reading. In that case this read function is no longer a const function.

Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
Return values:
colValue Value for key if found or default.
Parameters:
colDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
Returns:
Whether or not returned value was read from ini file.

virtual bool mbo::CIniData::ReadFloat | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | float & | fValue,
 |  | float | fDefault = 0.0f,
 |  | bool | bWriteDefault = false,
 |  | float | fMinimum = FLT_MIN,
 |  | float | fMaximum = FLT_MAX
 | ) | const [virtual]

Read a float value from strSection with name strKeyname. When there is no such value stored in the file the default value fDefault is used. The function returns whether or not the returned value was read from file. When the value was read from file and a conversion error occures the returned value is zero (not default). The parameter bWriteDefault can be set true to ensure the ini directive exists after first read attempt in case it could not be found while reading. In that case this read function is no longer a const function.

Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
Return values:
fValue Value for key if found or default.
Parameters:
fDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
fMinimum | Lower values will be replaced by this minimum.
fMaximum | Higher values will be replaced by this maximum.
Returns:
Whether or not returned value was read from ini file.

virtual bool mbo::CIniData::ReadInt | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | int & | nValue,
 |  | int | nDefault = 0,
 |  | bool | bWriteDefault = false,
 |  | int | nMinimum = INT_MIN,
 |  | int | nMaximum = INT_MAX
 | ) | const [virtual]

Read an integer value from strSection with name strKeyname. When there is no such value stored in the file the default value nDefault is used. The function returns whether or not the returned value was read from file. When the value was read from file and a conversion error occures the returned value is zero (not default). The parameter bWriteDefault can be set true to ensure the ini directive exists after first read attempt in case it could not be found while reading. In that case this read function is no longer a const function.

Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
Return values:
nValue Value for key if found or default.
Parameters:
nDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
nMinimum | Lower values will be replaced by this minimum.
nMaximum | Higher values will be replaced by this maximum.
Returns:
Whether or not returned value was read from ini file.

virtual bool mbo::CIniData::ReadLong | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | long & | lValue,
 |  | long | lDefault = 0,
 |  | bool | bWriteDefault = false,
 |  | long | lMinimum = LONG_MIN,
 |  | long | lMaximum = LONG_MAX
 | ) | const [virtual]

Read a long value from strSection with name strKeyname. When there is no such value stored in the file the default value lDefault is used. The function returns whether or not the returned value was read from file. When the value was read from file and a conversion error occures the returned value is zero (not default). The parameter bWriteDefault can be set true to ensure the ini directive exists after first read attempt in case it could not be found while reading. In that case this read function is no longer a const function.

Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
Return values:
lValue Value for key if found or default.
Parameters:
lDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
lMinimum | Lower values will be replaced by this minimum.
lMaximum | Higher values will be replaced by this maximum.
Returns:
Whether or not returned value was read from ini file.

virtual bool mbo::CIniData::ReadMap | ( | const MboString & | strSection,
 |  | CStrMapStr & | msstrValue,
 |  | const CStrMapStr & | msstrDefault = CStrMapStr(),
 |  | bool | bWriteDefault = false,
 |  | bool | bWriteEmpty = false
 | ) | const [virtual]

Read a string map from strSection. When there is no such section stored in the file the default value msstrDefault is used. The function returns whether or not the map contains elements. The parameter bWriteDefault can be set true to ensure the ini directive exists after first read attempt in case it could not be found while reading. In that case this read function is no longer a const function.

This method requires that both key and values are string types and will return those pairs in a map (key - > value).

Parameters:
strSection Name of section to search.
Return values:
msstrValue Value for key if found or default.
Parameters:
msstrDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if section is not present in the ini file.
bWriteEmpty | If the section is not present in the ini file this parameter determines wether or not empty values result in writing "key=" lines to the ini file.
Returns:
Whether or not returned value was read from ini file.

virtual bool mbo::CIniData::ReadString | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | MboString & | strValue,
 |  | const MboString & | strDefault = "",
 |  | bool | bWriteDefault = false,
 |  | bool | bParseEnvVars = false
 | ) | const [virtual]

Read a string value from strSection with name strKeyname. When there is no such value stored in the file the default value strDefault is used. The function returns whether or not the returned value was read from file.

If bParseEnvVars is true then the result will be paresed for environment variables recursively.

See also:
MboString::ParseEnvVars
Parameters:
strSection | Name of section to search.
strKeyname | Name of key to search.
Return values:
strValue Value for key if found or default.
Parameters:
strDefault | Default value to use if key not present.
bWriteDefault | Whether or not the default should be written to the ini file if key is not present in ini file.
bParseEnvVars | Whether or not environment variables should be parsed. If so "%name%" will be replaced by the value of the environment variable "name".
Returns:
Whether or not returned value was read from ini file.

bool mbo::CIniData::SectionExists ( const MboString & strSection ) const

Check if a specific section exists

Parameters:
strSection Name of section to search
Returns:
whether or not section exists.

virtual bool mbo::CIniData::WriteBool | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | bool | bValue
 | ) | [virtual]

Store a boolean value into a specified section as given key.

Parameters:
strSection | Section to write to (will be created if not present).
strKeyname | Name of Key to update/create.
bValue | Value to write.
Returns:
Whether or not the operation succeeded (value was written).

virtual bool mbo::CIniData::WriteColor | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | COLORREF | colValue
 | ) | [virtual]

Store a COLORREF value into a specified section as given key.

Parameters:
strSection | Section to write to (will be created if not present).
strKeyname | Name of Key to update/create.
colValue | Value to write.
Returns:
Whether or not the operation succeeded (value was written).

virtual bool mbo::CIniData::WriteFloat | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | float | fValue
 | ) | [virtual]

Store a float value into a specified section as given key.

Parameters:
strSection | Section to write to (will be created if not present).
strKeyname | Name of Key to update/create.
fValue | Value to write.
Returns:
Whether or not the operation succeeded (value was written).

virtual bool mbo::CIniData::WriteInt | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | int | nValue
 | ) | [virtual]

Store an int value into a specified section as given key.

Parameters:
strSection | Section to write to (will be created if not present).
strKeyname | Name of Key to update/create.
nValue | Value to write.
Returns:
Whether or not the operation succeeded (value was written).

virtual bool mbo::CIniData::WriteLong | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | long | lValue
 | ) | [virtual]

Store a long value into a specified section as given key.

Parameters:
strSection | Section to write to (will be created if not present).
strKeyname | Name of Key to update/create.
lValue | Value to write.
Returns:
Whether or not the operation succeeded (value was written).

virtual bool mbo::CIniData::WriteMap | ( | const MboString & | strSection,
 |  | const CStrMapStr & | msstrValue,
 |  | bool | bWriteEmpty = false
 | ) | [virtual]

Store string map msstrValue in section strSection. The optional parameter bWriteEmpty can be set true to force writing empty strings into the file.

Parameters:
strSection | Section to write to (will be created if not present).
msstrValue | String map to write as section.
bWriteEmpty | Wether or not empty values result in writing "key=" lines.
Returns:
Whether or not the operation succeeded (value was written).

virtual bool mbo::CIniData::WriteString | ( | const MboString & | strSection,
 |  | const MboString & | strKeyname,
 |  | const MboString & | strValue
 | ) | [virtual]

Store a MboString value into a specified section as given key.

Parameters:
strSection | Section to write to (will be created if not present).
strKeyname | Name of Key to update/create.
strValue | Value to write.
Returns:
Whether or not the operation succeeded (value was written).

Member Data Documentation

mbo::MutexModel mbo::CIniData::m_mxIniData [private]

access synchronisation

const MboString mbo::CIniData::m_strFilename [private]

filename to store/load ini data from

const MboString mbo::CIniData::m_strSectionPrefix [private]

current/actual section prefix to prepen to any section name

The documentation for this class was generated from the following file:
  • MboIniData.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CLock Class Reference

mbo::CLock Class Reference

#include <MboSynch.h>

Inheritance diagram for mbo::CLock:

mbo::ILock List of all members.

Public Member Functions

CLock (const IMutex *pmx1, const IMutex *pmx2=0, const IMutex *pmx3=0, const IMutex *pmx4=0, const IMutex *pmx5=0)
CLock (const CLock &lx)
CLock (const CLockFake &lx)
CLock (const CLockMulti &lx)
CLock (const CLockSingle &lx)
CLock (const ILock *plx)
CLock (const ICriticalSection *pmx)
virtual unsigned long | GetLevel () const
virtual | ~CLock ()

Private Member Functions

virtual void | Enter () const
virtual void | Leave () const

Private Attributes

const ILock * | m_plx
const ICriticalSection * | m_pmx

Friends

class | CUnlock

Constructor & Destructor Documentation

mbo::CLock::CLock ( const ICriticalSection * pmx ) [inline, explicit]

constructor that takes a single Critical Section

mbo::CLock::CLock ( const ILock * plx ) [explicit]

constructor (from any ILock pointer)

Parameters:
plx pointer to Lock to use

mbo::CLock::CLock ( const CLockSingle & lx ) [inline, explicit]

constructor (using a reference to a SingleLock)

Parameters:
lx SingleLock to use

mbo::CLock::CLock ( const CLockMulti & lx ) [explicit]

constructor (using a reference to a MultiLock)

Parameters:
lx MultiLock to use

mbo::CLock::CLock ( const CLockFake & lx ) [explicit]

constructor (using a reference to a CLockFake)

Parameters:
lx MultiLock to use

mbo::CLock::CLock ( const CLock & lx ) [explicit]

constructor is necessary here since we dynamically allocate to m_plx

mbo::CLock::CLock | ( | const IMutex * | pmx1,
 |  | const IMutex * | pmx2 = 0,
 |  | const IMutex * | pmx3 = 0,
 |  | const IMutex * | pmx4 = 0,
 |  | const IMutex * | pmx5 = 0
 | ) | [explicit]

constructor that takes up to 5 IMutex

Parameters:
pmx1 | first mutex
pmx2 | second optional mutex
pmx3 | third optional mutex
pmx4 | forth optional mutex
pmx5 | fith optional mutex

virtual mbo::CLock::~CLock ( ) [virtual]

the destructor ensures Leave() is called

Member Function Documentation

virtual void mbo::CLock::Enter ( ) const [private, virtual]

enter Lock

Implements mbo::ILock.

virtual unsigned long mbo::CLock::GetLevel ( ) const [virtual]

Returns:
Number of times CriticalSection/Mutex is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

This may not be correctly available in which case 1 is returned to signal Enter state.

Implements mbo::ILock.

virtual void mbo::CLock::Leave ( ) const [private, virtual]

leave Lock

Implements mbo::ILock.

Friends And Related Function Documentation

friend class CUnlock [friend]

Member Data Documentation

const ILock* mbo::CLock::m_plx [private]

internally used Lock instance (type depends on constructor)

const ICriticalSection* mbo::CLock::m_pmx [private]

internally used Critical Section / Mutex instance (not freed in destructor)

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CLockFake Class Reference

mbo::CLockFake Class Reference

Fake Lock implementation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::CLockFake:

mbo::ILock List of all members.

Public Member Functions

virtual void | Enter () const
virtual unsigned long | GetLevel () const
virtual void | Leave () const

Detailed Description

Fake Lock implementation.

Note:
This class is distributed under the following license Mbo License.

Member Function Documentation

virtual void mbo::CLockFake::Enter ( ) const [inline, virtual]

NOP

Implements mbo::ILock.

virtual unsigned long mbo::CLockFake::GetLevel ( ) const [inline, virtual]

Returns:
Number of times CriticalSection/Mutex is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

This may not be correctly available in which case 1 is returned to signal Enter state.

Implements mbo::ILock.

virtual void mbo::CLockFake::Leave ( ) const [inline, virtual]

NOP

Implements mbo::ILock.

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CLockMulti Class Reference

mbo::CLockMulti Class Reference

Multi-Lock implementation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::CLockMulti:

mbo::ILock List of all members.

Public Member Functions

virtual void | AddMutex (const IMutex *pmx) const
CLockMulti (const IMutex *pmx1=0, const IMutex *pmx2=0, const IMutex *pmx3=0, const IMutex *pmx4=0, const IMutex *pmx5=0)
CLockMulti::CLockMulti (const CLockMulti &lx)
virtual void | Enter () const
virtual unsigned long | GetLevel () const
virtual const MutexList & | GetList () const
virtual void | Leave () const
virtual size_t | size () const
virtual bool | Try (DWORD nMilliseconds=0) const
virtual | ~CLockMulti ()

Private Attributes

MutexList m_vpme

Detailed Description

Multi-Lock implementation.

This Lock does not call Enter() upon creation or Leave() in destruction. This is must be done in the objects accepted by the constructor.

Note:
This class is distributed under the following license Mbo License.

Constructor & Destructor Documentation

mbo::CLockMulti::CLockMulti | ( | const IMutex * | pmx1 = 0,
 |  | const IMutex * | pmx2 = 0,
 |  | const IMutex * | pmx3 = 0,
 |  | const IMutex * | pmx4 = 0,
 |  | const IMutex * | pmx5 = 0
 | ) | [explicit]

constructor that takes up to 5 IMutex

The IMutex parameters must either be NULL or an instance from any class that implements the IMutex interface.

Parameters:
pmx1 | first optional mutex
pmx2 | second optional mutex
pmx3 | third optional mutex
pmx4 | forth optional mutex
pmx5 | fith optional mutex

virtual mbo::CLockMulti::~CLockMulti ( ) [virtual]

destructor

Member Function Documentation

virtual void mbo::CLockMulti::AddMutex ( const IMutex * pmx ) const [virtual]

Add a single IMutex

Parameters:
pmx Add a mutex to the list

mbo::CLockMulti::CLockMulti::CLockMulti ( const CLockMulti & lx ) [explicit]

Copy constructor

Ensure the lock is entered since the destructor will call Leave().

Parameters:
lx CLockMulti to copy from

virtual void mbo::CLockMulti::Enter ( ) const [virtual]

Enter the Lock

Implements mbo::ILock.

virtual unsigned long mbo::CLockMulti::GetLevel ( ) const [virtual]

Returns:
Number of times CriticalSection/Mutex is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

This may not be correctly available in which case 1 is returned to signal Enter state.

Implements mbo::ILock.

virtual const MutexList& mbo::CLockMulti::GetList ( ) const [virtual]

Reference to internal MutexList (used by CLock)

virtual void mbo::CLockMulti::Leave ( ) const [virtual]

Leave the Lock

Implements mbo::ILock.

virtual size_t mbo::CLockMulti::size ( ) const [virtual]

Number of IMutex elements in Lock

virtual bool mbo::CLockMulti::Try ( DWORD nMilliseconds = 0 ) const [virtual]

Try to enter the Lock.

Parameters:
nMilliseconds time in milliseconds to try to enter
Returns:
Whteher or not the Lock was entered

Member Data Documentation

MutexList mbo::CLockMulti::m_vpme [mutable, private]

List of mutexes controlled by the Lock

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CLockSingle Class Reference

mbo::CLockSingle Class Reference

Single-Lock implementation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::CLockSingle:

mbo::ILock List of all members.

Public Member Functions

CLockSingle (const CLockSingle &lx)
CLockSingle (const ICriticalSection *pmx)
virtual void | Enter () const
virtual unsigned long | GetLevel () const
virtual void | Leave () const
virtual | ~CLockSingle ()

Private Attributes

friend | CLock
const ICriticalSection * | m_pmx

Detailed Description

Single-Lock implementation.

This Lock automatically calls Enter() upon creation and Leave() in destruction.

Note:
This class is distributed under the following license Mbo License.

Constructor & Destructor Documentation

mbo::CLockSingle::CLockSingle ( const ICriticalSection * pmx ) [inline, explicit]

constructor to allow selective call to Enter()

/*! default constructor which directly calls Enter()

Parameters:
pmx Mutex to use for Lock

mbo::CLockSingle::CLockSingle ( const CLockSingle & lx ) [inline, explicit]

copy constructor

Ensure the lock is entered since the destructor will call Leave().

virtual mbo::CLockSingle::~CLockSingle ( ) [inline, virtual]

destructor

Member Function Documentation

virtual void mbo::CLockSingle::Enter ( ) const [inline, virtual]

enter the Lock

Implements mbo::ILock.

virtual unsigned long mbo::CLockSingle::GetLevel ( ) const [inline, virtual]

Returns:
Number of times CriticalSection/Mutex is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

This may not be correctly available in which case 1 is returned to signal Enter state.

Implements mbo::ILock.

virtual void mbo::CLockSingle::Leave ( ) const [inline, virtual]

leave the Lock

Implements mbo::ILock.

Member Data Documentation

friend mbo::CLockSingle::CLock [private]

const ICriticalSection* mbo::CLockSingle::m_pmx [private]

internally used Critical Section / Mutex

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CMutexFake Class Reference

mbo::CMutexFake Class Reference

Mutex emulation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::CMutexFake:

mbo::IMutex mbo::ICriticalSection List of all members.

Public Member Functions

CMutexFake ()
virtual void | Enter () const
virtual unsigned long | GetLevel () const
virtual CLock | GetLock () const
virtual void | Leave () const
virtual bool | Try (DWORD nMilliseconds=0) const

Protected Member Functions

virtual IncDecVal | DecEntered () const
virtual HANDLE | GetHandle () const
virtual IncDecVal | IncEntered () const

Protected Attributes

IncDecVal m_lEntered

Detailed Description

Mutex emulation.

Note:
This class is distributed under the following license Mbo License.

Constructor & Destructor Documentation

mbo::CMutexFake::CMutexFake ( )

constructor

Member Function Documentation

virtual IncDecVal mbo::CMutexFake::DecEntered ( ) const [protected, virtual]

Inform that the Mutex was leaved.

Implements mbo::IMutex.

virtual void mbo::CMutexFake::Enter ( ) const [virtual]

Enter the Mutex (enter critical section)

Reimplemented from mbo::IMutex.

virtual HANDLE mbo::IMutex::GetHandle ( ) const [inline, protected, virtual, inherited]

Returns:
internally used HANDLE

Reimplemented in mbo::CMutexImpl, and mbo::MutexList.

virtual unsigned long mbo::CMutexFake::GetLevel ( ) const [virtual]

Returns:
Number of times CriticalSection is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

Implements mbo::ICriticalSection.

virtual CLock mbo::CMutexFake::GetLock ( ) const [virtual]

Get lock for this mutex

The created lock will be returned as an object. That requires full return by value and invoking copy operators. But that is the only possible solution since we need a local copy that will be destructed locally - the sense of the lock.

Returns:
Lock for this Mutex

Implements mbo::IMutex.

virtual IncDecVal mbo::CMutexFake::IncEntered ( ) const [protected, virtual]

Inform that the Mutex was entered.

Implements mbo::IMutex.

virtual void mbo::CMutexFake::Leave ( ) const [virtual]

Leave the Mutex (leave critical section)

Implements mbo::ICriticalSection.

virtual bool mbo::CMutexFake::Try ( DWORD nMilliseconds = 0 ) const [virtual]

Try to enter the Mutex (enter critical section)

Returns:
When the mutex was entered the return value is true.
Parameters:
nMilliseconds time to try to enter in milliseconds
Returns:
whether or not the mutex was entered

Implements mbo::IMutex.

Member Data Documentation

IncDecVal mbo::CMutexFake::m_lEntered [mutable, protected]

number of times Mutex was entered

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CMutexImpl Class Reference

mbo::CMutexImpl Class Reference

Mutex implementation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::CMutexImpl:

mbo::IMutex mbo::ICriticalSection List of all members.

Public Member Functions

CMutexImpl ()
virtual void | Enter () const
virtual HANDLE | GetHandle () const
virtual unsigned long | GetLevel () const
virtual CLock | GetLock () const
virtual void | Leave () const
virtual bool | Try (DWORD nMilliseconds=0) const
virtual | ~CMutexImpl ()

Protected Member Functions

virtual IncDecVal | DecEntered () const
virtual IncDecVal | IncEntered () const

Protected Attributes

IncDecVal m_lEntered

Private Attributes

HANDLE | m_hMutex

Detailed Description

Mutex implementation.

This is a wrapper for WIN-API functions and thus invokes functions with a HANDLE.

Note:
This class is distributed under the following license Mbo License.

Constructor & Destructor Documentation

mbo::CMutexImpl::CMutexImpl ( )

Default constructor

virtual mbo::CMutexImpl::~CMutexImpl ( ) [virtual]

Destructor frees internal resources.

Member Function Documentation

virtual IncDecVal mbo::CMutexImpl::DecEntered ( ) const [protected, virtual]

Inform that the Mutex was leaved.

Implements mbo::IMutex.

virtual void mbo::CMutexImpl::Enter ( ) const [virtual]

wait for mutex to be owned and increment ownership counter

Reimplemented from mbo::IMutex.

virtual HANDLE mbo::CMutexImpl::GetHandle ( ) const [virtual]

Internal function used to get the internally used HANDLE.

Returns:
internally used HANDLE

Reimplemented from mbo::IMutex.

virtual unsigned long mbo::CMutexImpl::GetLevel ( ) const [virtual]

Returns:
Number of times CriticalSection is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

Implements mbo::ICriticalSection.

virtual CLock mbo::CMutexImpl::GetLock ( ) const [virtual]

Get lock for this mutex

The created lock will be returned as an object. That requires full return by value and invoking copy operators. But that is the only possible solution since we need a local copy that will be destructed locally - the sense of the lock.

Returns:
Lock for this Mutex

Implements mbo::IMutex.

virtual IncDecVal mbo::CMutexImpl::IncEntered ( ) const [protected, virtual]

Inform that the Mutex was entered.

Implements mbo::IMutex.

virtual void mbo::CMutexImpl::Leave ( ) const [virtual]

decrement ownership of mutex and release if ownership counter has value 0.

Implements mbo::ICriticalSection.

virtual bool mbo::CMutexImpl::Try ( DWORD nMilliseconds = 0 ) const [virtual]

Try to enter the mutex and return true if entered false if not.

Returns:
When the mutex was entered the return value is true.
Parameters:
nMilliseconds time to try to enter in milliseconds
Returns:
whether or not the mutex was entered

Implements mbo::IMutex.

Member Data Documentation

HANDLE mbo::CMutexImpl::m_hMutex [private]

HANDLE used for WIN-API methods

IncDecVal mbo::CMutexImpl::m_lEntered [mutable, protected]

number of times Mutex was entered

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CStrList Class Reference

mbo::CStrList Class Reference

default CStr container More...

#include <MboStrList.h>

Inheritance diagram for mbo::CStrList:

std::deque2< MboString > deque List of all members.

Public Types

typedef deque< MboString,
allocator< MboString > > 		_Mybase
typedef deque2< MboString,
allocator< MboString > > 		_Myt

Public Member Functions

virtual bool | add_if_new (const MboString &_Val)
virtual bool | add_if_prefix_match (const MboString &strValue, const MboString &strPrefix, bool bCaseSensitive=false, bool bOnlyNew=false)
bool | contains (const MboString &_Val) const
bool | contains_no (const MboString &_Val) const
CStrList (const MboString &str)
CStrList (const std::deque2< MboString > &other)
CStrList ()
virtual void | limit (size_type _Limit)
operator bool ()
CStrList & | operator= (const std::deque< MboString > &values)
pair< size_type, bool > | position (const MboString &_Val) const
void | sort ()
MboString | ToCStr (const MboString &strSplit=",") const
virtual | ~CStrList ()

Static Public Member Functions

_Myt | dyn_create (_Myt::size_type _Count,...)
int | Explode (const MboString &strInput, const MboString &strSplit, CStrList &vstrResult, bool bClearInput=true, bool bTrim=false)
int | Explode (const char *szInput, const char *szSplit, CStrList &vstrResult, bool bClearInput=true, bool bTrim=false)
int | ExplodeZZString (const char *szList, CStrList &vstrResult, bool bClearInput=true, bool bTrim=false)

Detailed Description

default CStr container

Note:
Optional iostream support is guarded by compiler define SUPPORT_IOSTREAM.

Member Typedef Documentation

typedef deque<MboString , allocator<MboString > > std::deque2< MboString , allocator<MboString > >::_Mybase [inherited]

type abbrevation for parent class/template

typedef deque2<MboString , allocator<MboString > > std::deque2< MboString , allocator<MboString > >::_Myt [inherited]

type abbrevation for this class

Constructor & Destructor Documentation

mbo::CStrList::CStrList ( )

empty default constructor

mbo::CStrList::CStrList ( const std::deque2< MboString > & other )

copy constructor also takes base type

mbo::CStrList::CStrList ( const MboString & str ) [explicit]

construct string list from single value.

virtual mbo::CStrList::~CStrList ( ) [virtual]

virtual destructor

Member Function Documentation

virtual bool std::deque2< MboString , allocator<MboString > >::add_if_new ( const MboString & _Val ) [inline, virtual, inherited]

Add _Val if it is not already contained in the vector Returns wether or not _Val was added

Parameters:
_Val element to add
Returns:
whether _Val was added or already contained

virtual bool mbo::CStrList::add_if_prefix_match | ( | const MboString & | strValue,
 |  | const MboString & | strPrefix,
 |  | bool | bCaseSensitive = false,
 |  | bool | bOnlyNew = false
 | ) | [virtual]

Add a value if it matches a given prefix.

Parameters:
strValue | Value to insert
strPrefix | Prefix to match
bCaseSensitive | Whether or not comaprison is done case sensitive.
bOnlyNew | Add value only if it is new to the list.
Returns:
true if the value is added false otherwise.

bool std::deque2< MboString , allocator<MboString > >::contains ( const MboString & _Val ) const [inline, inherited]

Brute force test to check whether or not a specific value is contained in the vector.

Parameters:
_Val element to check for
Returns:
whether or not _Val is member of the vector

bool std::deque2< MboString , allocator<MboString > >::contains_no ( const MboString & _Val ) const [inline, inherited]

Brute force test to check whether or not a specific value is contained in the vector. The inverted result is returned this can be used for map2 values(check_fun_t) to return a unique list.

Parameters:
_Val element to check for
Returns:
whether or not _Val is new = NOT contained in the vector

_Myt std::deque2< MboString , allocator<MboString > >::dyn_create | ( | _Myt::size_type | _Count,
 |  |  | ...
 | ) | [inline, static, inherited]

Dynamic deque creation.

Parameters:
_Count number of elemnts to put into deque2
... elements to put into the vector each of type _Ty (_Count times)
Returns:
the created container.

int mbo::CStrList::Explode | ( | const MboString & | strInput,
 |  | const MboString & | strSplit,
 |  | CStrList & | vstrResult,
 |  | bool | bClearInput = true,
 |  | bool | bTrim = false
 | ) | [static]

Exlode a string split by another string into a string list.

The input string is split at every occurance of szSplit which will not be included in the any of the resulting string parts stored in the list.

Parameters:
strInput | Input string
strSplit | String used to split the input
Return values:
vstrResult Resulting string list
Parameters:
bClearInput | Whether vstrResult should be cleared or not (defaults to true)
bTrim | Whether to trim the resulting string parts.
Returns:
The number of elements in the resulting string list. If the string list was not empty on call and bClearInput is false then this value contains also the elements that were already in the string list upon calling the method. If this value is 0 then the input string was empty. If this value is 1 then the input string did not contain the split string (or vstrResult was not empty upcon call).
Note:
szSplit should not be empty, if so the the resulting string list will simply contain the input string as one single element.

The function cannot be used to split strings split by double zero characters. For that

See also:
ExplodeZZString().

int mbo::CStrList::Explode | ( | const char * | szInput,
 |  | const char * | szSplit,
 |  | CStrList & | vstrResult,
 |  | bool | bClearInput = true,
 |  | bool | bTrim = false
 | ) | [static]

Exlode a string split by another string into a string list.

The input string is split at every occurance of szSplit which will not be included in the any of the resulting string parts stored in the list.

Parameters:
szInput | Input string
szSplit | String used to split the input
Return values:
vstrResult Resulting string list
Parameters:
bClearInput | Whether vstrResult should be cleared or not (defaults to true)
bTrim | Whether to trim the resulting string parts.
Returns:
The number of elements in the resulting string list. If the string list was not empty on call and bClearInput is false then this value contains also the elements that were already in the string list upon calling the method. If this value is 0 then the input string was empty. If this value is 1 then the input string did not contain the split string (or vstrResult was not empty upcon call).
Note:
szSplit should not be empty, if so the the resulting string list will simply contain the input string as one single element.

The function cannot be used to split strings split by double zero characters. For that

See also:
ExplodeZZString().

int mbo::CStrList::ExplodeZZString | ( | const char * | szList,
 |  | CStrList & | vstrResult,
 |  | bool | bClearInput = true,
 |  | bool | bTrim = false
 | ) | [static]

Convert a list of c strings (zero terminated) that is terminated by an empty string (e.g. two zero characters '\0') into a CStrList.

Parameters:
szList input list terminated by two zero characters.
Return values:
vstrResult will retrieve the result
Parameters:
bClearInput | whether or not the vstrResult has to be cleared before inserting the contents of szList
bTrim | Whether to trim the resulting string parts.
Returns:
The number of elements in the resulting string list. If the string list was not empty on call and bClearInput is false then this value contains also the elements that were already in the string list upon calling the method.

virtual void std::deque2< MboString , allocator<MboString > >::limit ( size_type _Limit ) [inline, virtual, inherited]

Limit does not grow if size() < _Limit as resize() does!

Parameters:
_Limit size limit for vector

std::deque2< MboString , allocator<MboString > >::operator bool ( ) [inline, inherited]

Check whether the vector contains any element

Returns:
element cout > 0

CStrList& mbo::CStrList::operator= ( const std::deque< MboString > & values )

std::deque based assignment

Note:
the list will be emptied before assignment if you don't want this behaviour use std::map2::operator+= which also accepts input from any container with any value type that can be converted to CStr

if you want to assign container with other value types you must use std::map2::operatot<<

Parameters:
values container with elements to assign

pair<size_type,bool> std::deque2< MboString , allocator<MboString > >::position ( const MboString & _Val ) const [inline, inherited]

Brute force evaluation of element index in container. -1 is returned if element is not contained.

Parameters:
_Val element to search for
Returns:
  • position of _Val in vector or -1 if _VAL is not element of vector
  • whether or not _Val is element of vector

void std::deque2< MboString , allocator<MboString > >::sort ( ) [inline, inherited]

Sort the elements in the deque

See also:
std::sort

MboString mbo::CStrList::ToCStr ( const MboString & strSplit = "," ) const

Make flat string from list.

       <value1> "," <value2> ...

Parameters:
strSplit The string used to split the single values
Returns:
returns comma separated list

The documentation for this class was generated from the following file:
  • MboStrList.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc > Class Template Reference

mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc > Class Template Reference

map2 using CStr as Key type (case insenstive) More...

#include <MboStrMap.h>

Inheritance diagram for mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc >:

std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > map List of all members.

Public Types

typedef pair< const MboString,
__Ty > 		_Element
typedef check_fun_t< _Myt,
_Element > 		_Element_check_fun_t
typedef MboString | _Kty
typedef check_fun_t< _Kty_container,
MboString > 		_Kty_check_fun_t
typedef std::deque2< MboString > | _Kty_container
typedef map< MboString, __Ty,
__Pr, __Alloc > 		_Mybase
typedef map2< MboString, __Ty,
_Kty_container, _Ty_container,
__Pr, __Alloc > 		_Myt
typedef __Ty | _Ty
typedef check_fun_t< _Ty_container,
__Ty > 		_Ty_check_fun_t
typedef __CTy | _Ty_container

Public Member Functions

bool | contains_key (const _Kty &key) const
const _Ty & | first_elem (const _Ty &if_empty) const
_Ty & | first_elem (_Ty &if_empty)
const _Kty & | first_key (const _Kty &if_empty) const
pair< iterator, bool > | insert_elem (const _Kty &key, _Ty val)
_Kty_container | keys (_Kty_check_fun_t check) const
_Kty_container | keys () const
const _Ty & | operator[] (const _Kty &key) const throw (std::out_of_range)
_Ty & | operator[] (const _Kty &key)
_Myt | select (_Element_check_fun_t check) const
_Ty_container | values (_Ty_check_fun_t check) const
_Ty_container | values () const
virtual | ~CStrMap ()

Detailed Description

template<class __Ty, class __CTy = std::deque2 <__Ty>, class __Pr = less_cstr_ic, class __Alloc = std::allocator<std::pair<const MboString, __Ty> >>
class mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc >

map2 using CStr as Key type (case insenstive)

It is often necessary to have string indexed arrays. The easiest way to achieve this is to specialise map2 to use CStr as key type. CStrMap does this and only requires one type parameter that will decide which type to use for the values.

map2 specialisation using CStr as key type and less_cstr_ic as prediction to make keys case insensitive as described above in less_cstr_ic.

Note:
Optional iostream support is guarded by compiler define SUPPORT_IOSTREAM.
Parameters:
__Ty | Type of values to assiociate with the CStr keys.
__CTy | Type of value conatiner (defaults to the same container as CStrList).
__Pr | Prediction used for key comparison (default to case insensitive).
__Alloc | Allocator for pairs of (key,value).

Member Typedef Documentation

typedef pair<const MboString , __Ty > std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::_Element [inherited]

type abbrevation for element type

typedef check_fun_t<_Myt,_Element> std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::_Element_check_fun_t [inherited]

type abbrevation for Element check function

typedef MboString std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::_Kty [inherited]

type abbrevation for Key type

typedef check_fun_t<_Kty_container,MboString > std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::_Kty_check_fun_t [inherited]

tape abbrevation for Key check function

typedef std::deque2< MboString > std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::_Kty_container [inherited]

type abbrevation for Key container

typedef map<MboString , __Ty , __Pr , __Alloc > std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::_Mybase [inherited]

type abbrevation for parent class/template

typedef map2<MboString , __Ty , _Kty_container, _Ty_container, __Pr , __Alloc > std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::_Myt [inherited]

type abbreveation for this class

typedef __Ty std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::_Ty [inherited]

type abbrevation for Value type

typedef check_fun_t<_Ty_container,__Ty > std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::_Ty_check_fun_t [inherited]

tape abbrevation for Value check function

typedef __CTy std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::_Ty_container [inherited]

type abbrevation for Value container

Constructor & Destructor Documentation

template<class __Ty, class __CTy = std::deque2 <__Ty>, class __Pr = less_cstr_ic, class __Alloc = std::allocator<std::pair<const MboString, __Ty> >>
virtual mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc >::~CStrMap ( ) [inline, virtual]

virtual destructor

Member Function Documentation

bool std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::contains_key ( const _Kty & key ) const [inline, inherited]

Check whether or not the map contains a specific key.

Parameters:
key Key of element to search for

const _Ty& std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::first_elem ( const _Ty & if_empty ) const [inline, inherited]

Retrieves the first value or a default one if the map is empty (const).

Parameters:
if_empty Value to use when map is empty.
Returns:
Reference (const) to either if_empty in case map is empty or the first value.
Note:
Since local objects are destroyed at block end you are able to to calls like const T x = y.first_elem(T());.

_Ty& std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::first_elem ( _Ty & if_empty ) [inline, inherited]

Retrieves the first value or a default one if the map is empty.

Parameters:
if_empty Value to use when map is empty.
Returns:
Reference to either if_empty in case map is empty or the first value.
Note:
Since local objects are destroyed at block end you are able to to calls like T x = y.first_elem(T());.

const _Kty& std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::first_key ( const _Kty & if_empty ) const [inline, inherited]

Retrieves the first key or a default one if the map is empty.

Parameters:
if_empty Key to use when map is empty.
Returns:
Reference to either if_empty in case map is empty or the first key.
Note:
Since local objects are destroyed at block end you are able to to calls like const T x = y.first_key(T());.

pair<iterator,bool> std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::insert_elem | ( | const _Kty & | key,
 |  | _Ty | val
 | ) | [inline, inherited]

Insert a pair constructed from explicit key and val parameters. This is different from operator[] since it uses insert and does therefor not change an existing pair. There exists a template mem function insert what means that all insert functions are non virtual and therefore we cannot name this function insert.

Parameters:
key | Key of element to insert
val | Value of element to insert
Returns:
  • iterator iterator to element if inserted or to end()
  • bool whether or not the element was inserted

_Kty_container std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::keys ( _Kty_check_fun_t check ) const [inline, inherited]

Returns std::deque, std::list or std::vector of selected keys stored in this map.

This is dependent on the template parameter _Kty_containter that defaults to std::deque2.

With this specialized version you are able to decide which keys of the map should make it in the returned container.

For example this makes it easy to build a list of keys that conform to to a certain condition. such like returning all keys that start with the same string when using strings as keys.

See also:
keys()

std::check_fun

Parameters:
check key selection helper function
Returns:
key container

_Kty_container std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::keys ( ) const [inline, inherited]

Returns std::deque, std::list or std::vector of all keys stored in this map.

This is dependent on the template parameter _Kty_containter that defaults to deque2.

Note:
if you want to assign the function result to an instance of an equivalent class type it may be necessary to specify the correct type for _Kty_container in the template parameter list.
See also:
keys(_IN _Kty_check_fun_t check)

std::check_fun

Returns:
key container

const _Ty& std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::operator[] ( const _Kty & key ) const throw (std::out_of_range) [inline, inherited]

Const access by key

Parameters:
key to search
Returns:
const reference to value
Exceptions:
std::out_of_range if key does not exist

_Ty& std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::operator[] ( const _Kty & key ) [inline, inherited]

_Myt std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::select ( _Element_check_fun_t check ) const [inline, inherited]

Selectively copy key/value pairs to a new map of the same type.

See also:
std::check_fun
Parameters:
check element selection helper function

_Ty_container std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::values ( _Ty_check_fun_t check ) const [inline, inherited]

Returns std::deque, std::list, std::vector of selected elements stored in this map.

This is dependent on the template parameter _Ty_containter that defaults to std::deque2.

With this specialized version you are able to decide which elements of the map should make it in the returned container.

For example this makes building a container of unique elements easy when the container is deque2, list2 or vector2.

      std::map2<int, char*, std::deque2<int>, std::deque2<char*> > v;
      std::deque2<char*> unique = v.values(std::check_fun(std::deque2<char*>::contains_no));

In the above example the check_fun helper adapter is used to turn the function std::deque2::contains_no into the required test function. This way every element of v is passed to unique.contains_no().

See also:
values()

std::check_fun

Parameters:
check element selection helper function
Returns:
element container

_Ty_container std::map2< MboString , __Ty , std::deque2< MboString > , __CTy , __Pr , __Alloc >::values ( ) const [inline, inherited]

Returns std::deque, std::list or std::vector of all elements stored in this map.

This is dependent on the template parameter _Ty_containter that defaults to std::deque2.

Note:
if you want to assign the function result to an instance of an equivalent class type it may be necessary to specify the correct type for _Ty_container in the template parameter list.
See also:
values(_IN _Ty_check_fun_t check)

std::check_fun

Returns:
element container

The documentation for this class was generated from the following file:
  • MboStrMap.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CStrMapStr Class Reference

mbo::CStrMapStr Class Reference

map2 using CStr as Key type (case insensitive) and as Value type More...

#include <MboStrMap.h>

Inheritance diagram for mbo::CStrMapStr:

mbo::CStrMap< MboString > std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > map List of all members.

Public Types

typedef pair< const MboString,
MboString > 		_Element
typedef check_fun_t< _Myt,
_Element > 		_Element_check_fun_t
typedef MboString | _Kty
typedef check_fun_t< _Kty_container,
MboString > 		_Kty_check_fun_t
typedef std::deque2< MboString > | _Kty_container
typedef map< MboString, MboString,
less_cstr_ic, std::allocator<
std::pair< const MboString,
MboString > > > 		_Mybase
typedef map2< MboString, MboString,
_Kty_container, _Ty_container,
less_cstr_ic, std::allocator<
std::pair< const MboString,
MboString > > > 		_Myt
typedef MboString | _Ty
typedef check_fun_t< _Ty_container,
MboString > 		_Ty_check_fun_t
typedef std::deque2< MboString > | _Ty_container

Public Member Functions

bool | contains_key (const _Kty &key) const
CStrMapStr (const MboString &strList)
CStrMapStr ()
const _Ty & | first_elem (const _Ty &if_empty) const
_Ty & | first_elem (_Ty &if_empty)
const _Kty & | first_key (const _Kty &if_empty) const
pair< iterator, bool > | insert_elem (const _Kty &key, _Ty val)
_Kty_container | keys (_Kty_check_fun_t check) const
_Kty_container | keys () const
const _Ty & | operator[] (const _Kty &key) const throw (std::out_of_range)
_Ty & | operator[] (const _Kty &key)
void | Scan (const MboString &strList)
_Myt | select (_Element_check_fun_t check) const
MboString | ToCStr (size_t nMaxKeyLength=0, const MboString &strKeyMore="", const MboString &strSplit=",", const MboString &strSeparate="=", const MboString &strKeyAppend="") const
_Ty_container | values (_Ty_check_fun_t check) const
_Ty_container | values () const
virtual | ~CStrMapStr ()

Detailed Description

map2 using CStr as Key type (case insensitive) and as Value type

This is based on CStrMap<> and therefor uses case insensitive keys. The elements are of corse case sensitive. If you need to change this behaviour you need to create another class from this template which uses another prediction (template parameter CStrMap::__Pr).

Note:
Optional iostream support is guarded by compiler define SUPPORT_IOSTREAM.

Member Typedef Documentation

typedef pair<const MboString , MboString > std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::_Element [inherited]

type abbrevation for element type

typedef check_fun_t<_Myt,_Element> std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::_Element_check_fun_t [inherited]

type abbrevation for Element check function

typedef MboString std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::_Kty [inherited]

type abbrevation for Key type

typedef check_fun_t<_Kty_container,MboString > std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::_Kty_check_fun_t [inherited]

tape abbrevation for Key check function

typedef std::deque2< MboString > std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::_Kty_container [inherited]

type abbrevation for Key container

typedef map<MboString , MboString , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > > std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::_Mybase [inherited]

type abbrevation for parent class/template

typedef map2<MboString , MboString , _Kty_container, _Ty_container, less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > > std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::_Myt [inherited]

type abbreveation for this class

typedef MboString std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::_Ty [inherited]

type abbrevation for Value type

typedef check_fun_t<_Ty_container,MboString > std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::_Ty_check_fun_t [inherited]

tape abbrevation for Value check function

typedef std::deque2< MboString > std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::_Ty_container [inherited]

type abbrevation for Value container

Constructor & Destructor Documentation

virtual mbo::CStrMapStr::~CStrMapStr ( ) [inline, virtual]

virtual destructor

mbo::CStrMapStr::CStrMapStr ( )

default constructor to create an empty map

mbo::CStrMapStr::CStrMapStr ( const MboString & strList )

Creates a CStrMapStr from a comma separated list of entries. See Scan() for details

Parameters:
strList comma separated list

Member Function Documentation

bool std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::contains_key ( const _Kty & key ) const [inline, inherited]

Check whether or not the map contains a specific key.

Parameters:
key Key of element to search for

const _Ty& std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::first_elem ( const _Ty & if_empty ) const [inline, inherited]

Retrieves the first value or a default one if the map is empty (const).

Parameters:
if_empty Value to use when map is empty.
Returns:
Reference (const) to either if_empty in case map is empty or the first value.
Note:
Since local objects are destroyed at block end you are able to to calls like const T x = y.first_elem(T());.

_Ty& std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::first_elem ( _Ty & if_empty ) [inline, inherited]

Retrieves the first value or a default one if the map is empty.

Parameters:
if_empty Value to use when map is empty.
Returns:
Reference to either if_empty in case map is empty or the first value.
Note:
Since local objects are destroyed at block end you are able to to calls like T x = y.first_elem(T());.

const _Kty& std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::first_key ( const _Kty & if_empty ) const [inline, inherited]

Retrieves the first key or a default one if the map is empty.

Parameters:
if_empty Key to use when map is empty.
Returns:
Reference to either if_empty in case map is empty or the first key.
Note:
Since local objects are destroyed at block end you are able to to calls like const T x = y.first_key(T());.

pair<iterator,bool> std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::insert_elem | ( | const _Kty & | key,
 |  | _Ty | val
 | ) | [inline, inherited]

Insert a pair constructed from explicit key and val parameters. This is different from operator[] since it uses insert and does therefor not change an existing pair. There exists a template mem function insert what means that all insert functions are non virtual and therefore we cannot name this function insert.

Parameters:
key | Key of element to insert
val | Value of element to insert
Returns:
  • iterator iterator to element if inserted or to end()
  • bool whether or not the element was inserted

_Kty_container std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::keys ( _Kty_check_fun_t check ) const [inline, inherited]

Returns std::deque, std::list or std::vector of selected keys stored in this map.

This is dependent on the template parameter _Kty_containter that defaults to std::deque2.

With this specialized version you are able to decide which keys of the map should make it in the returned container.

For example this makes it easy to build a list of keys that conform to to a certain condition. such like returning all keys that start with the same string when using strings as keys.

See also:
keys()

std::check_fun

Parameters:
check key selection helper function
Returns:
key container

_Kty_container std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::keys ( ) const [inline, inherited]

Returns std::deque, std::list or std::vector of all keys stored in this map.

This is dependent on the template parameter _Kty_containter that defaults to deque2.

Note:
if you want to assign the function result to an instance of an equivalent class type it may be necessary to specify the correct type for _Kty_container in the template parameter list.
See also:
keys(_IN _Kty_check_fun_t check)

std::check_fun

Returns:
key container

const _Ty& std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::operator[] ( const _Kty & key ) const throw (std::out_of_range) [inline, inherited]

Const access by key

Parameters:
key to search
Returns:
const reference to value
Exceptions:
std::out_of_range if key does not exist

_Ty& std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::operator[] ( const _Kty & key ) [inline, inherited]

void mbo::CStrMapStr::Scan ( const MboString & strList )

Scan a comma separated list of entries. The list will not be cleared before reading.

       <key1> "=" <value1> "," <key2> "=" <value2>, ...

_Myt std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::select ( _Element_check_fun_t check ) const [inline, inherited]

Selectively copy key/value pairs to a new map of the same type.

See also:
std::check_fun
Parameters:
check element selection helper function

MboString mbo::CStrMapStr::ToCStr | ( | size_t | nMaxKeyLength = 0,
 |  | const MboString & | strKeyMore = "",
 |  | const MboString & | strSplit = ",",
 |  | const MboString & | strSeparate = "=",
 |  | const MboString & | strKeyAppend = ""
 | ) | const

Make flat string from map with each key having a maximum length specified by nMaxKeylength.

       <key1> "=" <value1> "," <key2> "=" <value2>, ...

Parameters:
nMaxKeyLength | maximum length of key names (0 means whole keys, -1 means no key).
strKeyMore | if the Key has to be cut due to the maximum length specified you can indicate this by overriding the end of the key string with this value (see CStr::LeftString).
strSplit | you can change the split string from "," to whatever string you like (for example "\n").
strSeparate | you can also change the separation string from "=" to meet your needs (for example "\t= ").
strKeyAppend | it is also possible to append a string to the key before it is being cut using CStr::LeftString.
Returns:
generated flat string (comma separated list when using defaults.
Note:
This function allows to format the generated string in several other ways besides the default format. For example it can produce an ini format using strSplit = "\n":
       <key1> "=" <value1>
       <key2> "=" <value2>
It is also possible to align the "=" if the maximum key length is known prior to calling this method or if the keys are cut at a specific length. For example suppose you want the keys to have a maximum length of 8 while cut strings are denoted by a trailing single dot ".". Further more suppose you want the "=" aligned by a tab assuming a tab uses 8 spaces. Then the method has to be called like this:
             str.ToCStr(8, ".", "\n", "= ", "\t")

_Ty_container std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::values ( _Ty_check_fun_t check ) const [inline, inherited]

Returns std::deque, std::list, std::vector of selected elements stored in this map.

This is dependent on the template parameter _Ty_containter that defaults to std::deque2.

With this specialized version you are able to decide which elements of the map should make it in the returned container.

For example this makes building a container of unique elements easy when the container is deque2, list2 or vector2.

      std::map2<int, char*, std::deque2<int>, std::deque2<char*> > v;
      std::deque2<char*> unique = v.values(std::check_fun(std::deque2<char*>::contains_no));

In the above example the check_fun helper adapter is used to turn the function std::deque2::contains_no into the required test function. This way every element of v is passed to unique.contains_no().

See also:
values()

std::check_fun

Parameters:
check element selection helper function
Returns:
element container

_Ty_container std::map2< MboString , MboString , std::deque2< MboString > , std::deque2< MboString > , less_cstr_ic , std::allocator< std::pair< const MboString, MboString > > >::values ( ) const [inline, inherited]

Returns std::deque, std::list or std::vector of all elements stored in this map.

This is dependent on the template parameter _Ty_containter that defaults to std::deque2.

Note:
if you want to assign the function result to an instance of an equivalent class type it may be necessary to specify the correct type for _Ty_container in the template parameter list.
See also:
values(_IN _Ty_check_fun_t check)

std::check_fun

Returns:
element container

The documentation for this class was generated from the following file:
  • MboStrMap.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::CUnlock Class Reference

mbo::CUnlock Class Reference

Automatic local Lock unlock. More...

#include <MboSynch.h>

Inheritance diagram for mbo::CUnlock:

mbo::ILock List of all members.

Public Member Functions

CUnlock (const ILock &lx)
virtual | ~CUnlock ()

Private Member Functions

virtual void | Enter () const
virtual unsigned long | GetLevel () const
virtual void | Leave () const

Private Attributes

unsigned long | m_lLevel
const ILock & | m_lx

Detailed Description

Automatic local Lock unlock.

The Unlock automatically calls Enter() upon creation and Leave() in destruction but exchanges Enter/Leave calles for the given Lock. Hence it temporarily unlocks the given Lock.

Note:
Use with caution.
Warning:
You must ensure the Unlock is destructed before its corresponding Lock.
Note:
If you create an Unlock from another Unlock it becomes a Lock again because it wil exchange Enter/Leave twice.

As long as the Lock is based on a single CriticalSection or Mutex all enter levels will be quit on creation and restored on destruction.

This class is distributed under the following license Mbo License.

Constructor & Destructor Documentation

mbo::CUnlock::CUnlock ( const ILock & lx ) [inline, explicit]

constructor (from any ILock pointer)

Parameters:
plx pointer to Lock to use

virtual mbo::CUnlock::~CUnlock ( ) [inline, virtual]

Member Function Documentation

virtual void mbo::CUnlock::Enter ( ) const [inline, private, virtual]

enter Unlock = leave Lock

Implements mbo::ILock.

virtual unsigned long mbo::CUnlock::GetLevel ( ) const [inline, private, virtual]

DO NOT CALL: The returned value is invalid.

Implements mbo::ILock.

virtual void mbo::CUnlock::Leave ( ) const [inline, private, virtual]

leave Unlock = enter Lock

Implements mbo::ILock.

Member Data Documentation

unsigned long mbo::CUnlock::m_lLevel [private]

enter level before creation

const ILock& mbo::CUnlock::m_lx [private]

internally used Lock instance

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: deque Class Reference

deque Class Reference

Inheritance diagram for deque:

std::deque2< _Ty, _Alloc > std::deque2< MboString > mbo::CStrList
The documentation for this class was generated from the following file:
  • deque2.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: std::deque2< _Ty, _Alloc > Class Template Reference

std::deque2< _Ty, _Alloc > Class Template Reference

expanded deque template class More...

#include <deque2.h>

Inheritance diagram for std::deque2< _Ty, _Alloc >:

deque List of all members.

Public Types

typedef deque< _Ty, _Alloc > | _Mybase
typedef deque2< _Ty, _Alloc > | _Myt

Public Member Functions

virtual bool | add_if_new (const _Ty &_Val)
bool | contains (const _Ty &_Val) const
bool | contains_no (const _Ty &_Val) const
virtual void | limit (size_type _Limit)
operator bool ()
pair< size_type, bool > | position (const _Ty &_Val) const
void | sort ()

Static Public Member Functions

_Myt | dyn_create (_Myt::size_type _Count,...)

Related Functions

(Note that these are not member functions.)

deque2< _Ty_a, _Alloc_a > & | operator+= (deque2< _Ty_a, _Alloc_a > &container, const deque< _Ty_b, _Alloc_b > &values)
deque2< _Ty_a, _Alloc_a > & | operator<< (deque2< _Ty_a, _Alloc_a > &container, const deque< _Ty_b, _Alloc_b > &values)

Detailed Description

template<class _Ty, class _Alloc = allocator<_Ty>>
class std::deque2< _Ty, _Alloc >

expanded deque template class

This specialisation supports:

  • limit() Decreases the size to a given limit
  • contains() Checks whether or not a specific element is contained
  • add_if_new() Adds an element if it is not contained
  • sort() Sorts the elements

Note:
deque2, list2 and vector2 are designed to be replaceable by each other and hence have the same access methods. However the main differences of their stl base templates still apply.
Parameters:
_Ty | element/value type
_Alloc | element/value allocator

Member Typedef Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
typedef deque<_Ty, _Alloc> std::deque2< _Ty, _Alloc >::_Mybase

type abbrevation for parent class/template

template<class _Ty, class _Alloc = allocator<_Ty>>
typedef deque2<_Ty, _Alloc> std::deque2< _Ty, _Alloc >::_Myt

type abbrevation for this class

Member Function Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
virtual bool std::deque2< _Ty, _Alloc >::add_if_new ( const _Ty & _Val ) [inline, virtual]

Add _Val if it is not already contained in the vector Returns wether or not _Val was added

Parameters:
_Val element to add
Returns:
whether _Val was added or already contained

template<class _Ty, class _Alloc = allocator<_Ty>>
bool std::deque2< _Ty, _Alloc >::contains ( const _Ty & _Val ) const [inline]

Brute force test to check whether or not a specific value is contained in the vector.

Parameters:
_Val element to check for
Returns:
whether or not _Val is member of the vector

template<class _Ty, class _Alloc = allocator<_Ty>>
bool std::deque2< _Ty, _Alloc >::contains_no ( const _Ty & _Val ) const [inline]

Brute force test to check whether or not a specific value is contained in the vector. The inverted result is returned this can be used for map2 values(check_fun_t) to return a unique list.

Parameters:
_Val element to check for
Returns:
whether or not _Val is new = NOT contained in the vector

template<class _Ty, class _Alloc = allocator<_Ty>>
_Myt std::deque2< _Ty, _Alloc >::dyn_create | ( | _Myt::size_type | _Count,
 |  |  | ...
 | ) | [inline, static]

Dynamic deque creation.

Parameters:
_Count number of elemnts to put into deque2
... elements to put into the vector each of type _Ty (_Count times)
Returns:
the created container.

template<class _Ty, class _Alloc = allocator<_Ty>>
virtual void std::deque2< _Ty, _Alloc >::limit ( size_type _Limit ) [inline, virtual]

Limit does not grow if size() < _Limit as resize() does!

Parameters:
_Limit size limit for vector

template<class _Ty, class _Alloc = allocator<_Ty>>
std::deque2< _Ty, _Alloc >::operator bool ( ) [inline]

Check whether the vector contains any element

Returns:
element cout > 0

template<class _Ty, class _Alloc = allocator<_Ty>>
pair<size_type,bool> std::deque2< _Ty, _Alloc >::position ( const _Ty & _Val ) const [inline]

Brute force evaluation of element index in container. -1 is returned if element is not contained.

Parameters:
_Val element to search for
Returns:
  • position of _Val in vector or -1 if _VAL is not element of vector
  • whether or not _Val is element of vector

template<class _Ty, class _Alloc = allocator<_Ty>>
void std::deque2< _Ty, _Alloc >::sort ( ) [inline]

Sort the elements in the deque

See also:
std::sort

Friends And Related Function Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
deque2< _Ty_a, _Alloc_a > & operator+= | ( | deque2< _Ty_a, _Alloc_a > & | container,
 |  | const deque< _Ty_b, _Alloc_b > & | values
 | ) | [related]

add (not store) the values of a container to another container

Note:
the receiver container will not be emptied
Warning:
this operator can only be instanciated if a conversion from _Ty_b to _Ty_a exists
See also:
deque2::operator<<
Parameters:
_Ty_a | element/value type of receiver container
_Alloc_a | element/value allocator of receiver container
_Ty_b | element/value type of input container
_Alloc_b | element/value allocator of input container
container | container that receives th e input values
values | container input values
Returns:
modified container

template<class _Ty, class _Alloc = allocator<_Ty>>
deque2< _Ty_a, _Alloc_a > & operator<< | ( | deque2< _Ty_a, _Alloc_a > & | container,
 |  | const deque< _Ty_b, _Alloc_b > & | values
 | ) | [related]

store (not add) the values of a container to another containert

Note:
the receiver container will be emptied
Warning:
this operator can only be instanciated if a conversion from _Ty_b to _Ty_a exists
See also:
map2::operator+=
Parameters:
_Ty_a | element/value type of receiver container
_Alloc_a | element/value allocator of receiver container
_Ty_b | element/value type of input container
_Alloc_b | element/value allocator of input container
container | container that receives th e input values
values | container input values
Returns:
modified container

The documentation for this class was generated from the following file:
  • deque2.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: exception Class Reference

exception Class Reference

Inheritance diagram for exception:

mbo::MatrixException
The documentation for this class was generated from the following file:
  • MboMatrix.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::ICriticalSection Class Reference

mbo::ICriticalSection Class Reference

Critical Section Interface. More...

#include <MboSynch.h>

Inheritance diagram for mbo::ICriticalSection:

mbo::CCriticalSectionFake mbo::CCriticalSectionImpl mbo::IMutex mbo::CMutexFake mbo::CMutexImpl mbo::MutexList List of all members.

Public Member Functions

virtual void | Enter () const =0
virtual unsigned long | GetLevel () const =0
virtual CLock | GetLock () const =0
virtual void | Leave () const =0
virtual | ~ICriticalSection ()

Detailed Description

Critical Section Interface.

Note:
This class is distributed under the following license Mbo License.

Constructor & Destructor Documentation

virtual mbo::ICriticalSection::~ICriticalSection ( ) [inline, virtual]

enforce virtual destructor

Member Function Documentation

virtual void mbo::ICriticalSection::Enter ( ) const [pure virtual]

Enter Critical Section / Mutex

Implemented in mbo::IMutex, mbo::CCriticalSectionImpl, mbo::CCriticalSectionFake, mbo::CMutexImpl, mbo::CMutexFake, and mbo::MutexList.

virtual unsigned long mbo::ICriticalSection::GetLevel ( ) const [pure virtual]

Returns:
Number of times CriticalSection/Mutex is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

Implemented in mbo::CCriticalSectionImpl, mbo::CCriticalSectionFake, mbo::CMutexImpl, mbo::CMutexFake, and mbo::MutexList.

virtual CLock mbo::ICriticalSection::GetLock ( ) const [pure virtual]

Returns:
Lock for Critical Section

Implemented in mbo::IMutex, mbo::CCriticalSectionImpl, mbo::CCriticalSectionFake, mbo::CMutexImpl, mbo::CMutexFake, and mbo::MutexList.

virtual void mbo::ICriticalSection::Leave ( ) const [pure virtual]

Leave Critical Section / Mutex

Implemented in mbo::CCriticalSectionImpl, mbo::CCriticalSectionFake, mbo::CMutexImpl, mbo::CMutexFake, and mbo::MutexList.

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::IEvent Class Reference

mbo::IEvent Class Reference

Event implementation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::IEvent:

mbo::CEventFake mbo::CEventImpl List of all members.

Public Member Functions

virtual void | Pulse ()=0
virtual void | Reset ()=0
virtual void | Set ()=0
virtual bool | Wait (size_t nTime=INFINITE) const =0
virtual | ~IEvent ()

Detailed Description

Event implementation.

Note:
This class is distributed under the following license Mbo License.

Constructor & Destructor Documentation

virtual mbo::IEvent::~IEvent ( ) [inline, virtual]

destructor

Member Function Documentation

virtual void mbo::IEvent::Pulse ( ) [pure virtual]

Switch the signal to signaled and then -If no thread waits: switch back to not signaled. -If threads are waiting: In automatic reset mode only one thread can pass the Wait(). After this one thread the signal is switched back to not signaled. In manual reset mode all waiting threads pass Wait(). After all waiting threads have passed Wait(), the signal is switched back to not signaled.

Implemented in mbo::CEventImpl, and mbo::CEventFake.

virtual void mbo::IEvent::Reset ( ) [pure virtual]

Set the signal into the not signaled state.

Implemented in mbo::CEventImpl, and mbo::CEventFake.

virtual void mbo::IEvent::Set ( ) [pure virtual]

Set the signal into the signaled state.

Implemented in mbo::CEventImpl, and mbo::CEventFake.

virtual bool mbo::IEvent::Wait ( size_t nTime = INFINITE ) const [pure virtual]

Pulse (wait & reset) the event.

If the signal is in signaled state: passes the function will return. If the signal is in not signaled state: wait until time elaspes. In automatic reset mode: set signal to not signaled on leaving the method.

Parameters:
nTime time to wait in milliseconds.
Returns:
The return value is true if Wait() exits because of signaled state reached. When false is returned the time nTime (in ms) has elapsed before the signaled state has been reached.

Implemented in mbo::CEventImpl.

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::ILock Class Reference

mbo::ILock Class Reference

Lock interface. More...

#include <MboSynch.h>

Inheritance diagram for mbo::ILock:

mbo::CLock mbo::CLockFake mbo::CLockMulti mbo::CLockSingle mbo::CUnlock List of all members.

Public Member Functions

virtual void | Enter () const =0
virtual unsigned long | GetLevel () const =0
virtual void | Leave () const =0
virtual | ~ILock ()

Detailed Description

Lock interface.

Note:
This class is distributed under the following license Mbo License.

Constructor & Destructor Documentation

virtual mbo::ILock::~ILock ( ) [inline, virtual]

destructor

Member Function Documentation

virtual void mbo::ILock::Enter ( ) const [pure virtual]

Enter the lock

Implemented in mbo::CLockFake, mbo::CLockSingle, mbo::CLock, mbo::CLockMulti, and mbo::CUnlock.

virtual unsigned long mbo::ILock::GetLevel ( ) const [pure virtual]

Returns:
Number of times CriticalSection/Mutex is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

This may not be correctly available in which case 1 is returned to signal Enter state.

Implemented in mbo::CLockFake, mbo::CLockSingle, mbo::CLock, mbo::CLockMulti, and mbo::CUnlock.

virtual void mbo::ILock::Leave ( ) const [pure virtual]

Leave the lock

Implemented in mbo::CLockFake, mbo::CLockSingle, mbo::CLock, mbo::CLockMulti, and mbo::CUnlock.

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::IMutex Class Reference

mbo::IMutex Class Reference

Mutex Interface. More...

#include <MboSynch.h>

Inheritance diagram for mbo::IMutex:

mbo::ICriticalSection mbo::CMutexFake mbo::CMutexImpl mbo::MutexList List of all members.

Public Member Functions

virtual void | Enter () const
virtual unsigned long | GetLevel () const =0
virtual CLock | GetLock () const =0
virtual void | Leave () const =0
virtual bool | Try (DWORD nMilliseconds=0) const =0

Protected Member Functions

virtual IncDecVal | DecEntered () const =0
virtual HANDLE | GetHandle () const
virtual IncDecVal | IncEntered () const =0

Friends

class | MutexList

Detailed Description

Mutex Interface.

Internally derived classes must implement a counter for the times Enter() and Leave() are called respectively. This counter must be controlled by the interface build from IncEntered() and DecEntered().

Note:
No derived class must base Leave() calls on the number of times Enter() was called. Not even based on the interface described above.

As a direct consequence the user must ensure that for every successfull call to Enter() exactly one call to Leave() is performed.

This class is distributed under the following license Mbo License.

Member Function Documentation

virtual IncDecVal mbo::IMutex::DecEntered ( ) const [protected, pure virtual]

Inform that the Mutex was leaved.

Implemented in mbo::CMutexImpl, mbo::CMutexFake, and mbo::MutexList.

virtual void mbo::IMutex::Enter ( ) const [inline, virtual]

Enter Mutex

Implements mbo::ICriticalSection.

Reimplemented in mbo::CMutexImpl, mbo::CMutexFake, and mbo::MutexList.

virtual HANDLE mbo::IMutex::GetHandle ( ) const [inline, protected, virtual]

Returns:
internally used HANDLE

Reimplemented in mbo::CMutexImpl, and mbo::MutexList.

virtual unsigned long mbo::ICriticalSection::GetLevel ( ) const [pure virtual, inherited]

Returns:
Number of times CriticalSection/Mutex is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

Implemented in mbo::CCriticalSectionImpl, mbo::CCriticalSectionFake, mbo::CMutexImpl, mbo::CMutexFake, and mbo::MutexList.

virtual CLock mbo::IMutex::GetLock ( ) const [pure virtual]

Get lock for this mutex

The created lock will be returned as an object. That requires full return by value and invoking copy operators. But that is the only possible solution since we need a local copy that will be destructed locally - the sense of the lock.

Returns:
Lock for this Mutex

Implements mbo::ICriticalSection.

Implemented in mbo::CMutexImpl, mbo::CMutexFake, and mbo::MutexList.

virtual IncDecVal mbo::IMutex::IncEntered ( ) const [protected, pure virtual]

Inform that the Mutex was entered.

Implemented in mbo::CMutexImpl, mbo::CMutexFake, and mbo::MutexList.

virtual void mbo::ICriticalSection::Leave ( ) const [pure virtual, inherited]

Leave Critical Section / Mutex

Implemented in mbo::CCriticalSectionImpl, mbo::CCriticalSectionFake, mbo::CMutexImpl, mbo::CMutexFake, and mbo::MutexList.

virtual bool mbo::IMutex::Try ( DWORD nMilliseconds = 0 ) const [pure virtual]

Try to enter the Mutex

Returns:
When the mutex was entered the return value is true.
Parameters:
nMilliseconds time to try to enter in milliseconds
Returns:
whether or not the mutex was entered

Implemented in mbo::CMutexImpl, mbo::CMutexFake, and mbo::MutexList.

Friends And Related Function Documentation

friend class MutexList [friend]

grant MutexList access

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: iterator Class Reference

iterator Class Reference

Inheritance diagram for iterator:

TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator
The documentation for this class was generated from the following file:
  • TStaticArray.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::less_cstr_ic Struct Reference

mbo::less_cstr_ic Struct Reference

case insensitive prediction function based on CStr More...

#include <MboStrMap.h>

Inheritance diagram for mbo::less_cstr_ic:

binary_function List of all members.

Public Member Functions

bool operator() (const MboString &_Left, const MboString &_Right) const

Detailed Description

case insensitive prediction function based on CStr

This is used to make the CStrMap<> keys case insensitive.

Member Function Documentation

bool mbo::less_cstr_ic::operator() | ( | const MboString & | _Left,
 |  | const MboString & | _Right
 | ) | const [inline]

case insensitive comparion of two CStr strings

Parameters:
_Left | left hand side operand.
_Right | right hand side operand.
Returns:
true if _Left less than _Right.
Parameters:
_Left | left compare string
_Right | right compare string

The documentation for this struct was generated from the following file:
  • MboStrMap.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: list Class Reference

list Class Reference

Inheritance diagram for list:

std::list2< _Ty, _Alloc >
The documentation for this class was generated from the following file:
  • list2.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: std::list2< _Ty, _Alloc > Class Template Reference

std::list2< _Ty, _Alloc > Class Template Reference

expanded list template class More...

#include <list2.h>

Inheritance diagram for std::list2< _Ty, _Alloc >:

list List of all members.

Public Member Functions

virtual bool | add_if_new (const _Ty &_Val)
const_reference | at (size_type _Off) const
reference | at (size_type _Off)
bool | contains (const _Ty &_Val) const
bool | contains_no (const _Ty &_Val) const
virtual void | limit (size_type _Limit)
operator bool ()
const_reference | operator[] (size_type _Off) const
reference | operator[] (size_type _Off)
pair< size_type, bool > | position (const _Ty &_Val) const

Static Public Member Functions

list2< _Ty, _Alloc > | dyn_create (size_type _Count,...)

Protected Member Functions

void | _Xran () const

Private Types

typedef list< _Ty, _Alloc > | _Mybase
typedef list2< _Ty, _Alloc > | _Myt

Related Functions

(Note that these are not member functions.)

list2< _Ty_a, _Alloc_a > & | operator+= (list2< _Ty_a, _Alloc_a > &container, const list< _Ty_b, _Alloc_b > &values)
list2< _Ty_a, _Alloc_a > & | operator<< (list2< _Ty_a, _Alloc_a > &container, const list< _Ty_b, _Alloc_b > &values)

Detailed Description

template<class _Ty, class _Alloc = allocator<_Ty>>
class std::list2< _Ty, _Alloc >

expanded list template class

This specialisation supports:

  • limit() Decreases size to a given limit
  • contains() Checks whether or not a specific element is contained
  • add_if_new() Adds an element if it is not contained
  • sort() Sorts the elements

Note:
deque2, list2 and vector2 are designed to be replaceable by each other and hence have the same access methods. However the main differences of their stl base templates still apply.
Speed?
  • contains() O(n)
  • at(), [] O(n)
  • sort() O(n^2)

Parameters:
_Ty | element/value type
_Alloc | element/value allocator

Member Typedef Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
typedef list<_Ty, _Alloc> std::list2< _Ty, _Alloc >::_Mybase [private]

type abbrevation for parent class/template

template<class _Ty, class _Alloc = allocator<_Ty>>
typedef list2<_Ty, _Alloc> std::list2< _Ty, _Alloc >::_Myt [private]

type abbrevation for this class

Member Function Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
void std::list2< _Ty, _Alloc >::_Xran ( ) const [inline, protected]

throw an out of range exception

template<class _Ty, class _Alloc = allocator<_Ty>>
virtual bool std::list2< _Ty, _Alloc >::add_if_new ( const _Ty & _Val ) [inline, virtual]

Add _Val if it is not already contained in the list Returns wether or not _Val was added

Parameters:
_Val element to add
Returns:
whether _Val was added or already contained

template<class _Ty, class _Alloc = allocator<_Ty>>
const_reference std::list2< _Ty, _Alloc >::at ( size_type _Off ) const [inline]

dereference operator

Parameters:
_Off offset/index of element to dereference

template<class _Ty, class _Alloc = allocator<_Ty>>
reference std::list2< _Ty, _Alloc >::at ( size_type _Off ) [inline]

dereference operator

Parameters:
_Off offset/index of element to dereference

template<class _Ty, class _Alloc = allocator<_Ty>>
bool std::list2< _Ty, _Alloc >::contains ( const _Ty & _Val ) const [inline]

Brute force test to check whether or not a specific value is contained in the vector.

Parameters:
_Val element to check for
Returns:
whether or not _Val is member of the vector

template<class _Ty, class _Alloc = allocator<_Ty>>
bool std::list2< _Ty, _Alloc >::contains_no ( const _Ty & _Val ) const [inline]

Brute force test to check whether or not a specific value is contained in the vector. The inverted result is returned this can be used for map2 values(check_fun_t) to return a unique list.

Parameters:
_Val element to check for
Returns:
whether or not _Val is new = NOT contained in the vector

template<class _Ty, class _Alloc = allocator<_Ty>>
list2<_Ty, _Alloc> std::list2< _Ty, _Alloc >::dyn_create | ( | size_type | _Count,
 |  |  | ...
 | ) | [inline, static]

Dynamic list creation.

Parameters:
_Count number of elemnts to put into list2
... elements to put into the vector each of type _Ty (_Count times)

template<class _Ty, class _Alloc = allocator<_Ty>>
virtual void std::list2< _Ty, _Alloc >::limit ( size_type _Limit ) [inline, virtual]

Limit does not grow if size() < _Limit as resize() does!

Parameters:
_Limit size limit for vector

template<class _Ty, class _Alloc = allocator<_Ty>>
std::list2< _Ty, _Alloc >::operator bool ( ) [inline]

Check whether the vector contains any element

Returns:
element cout > 0

template<class _Ty, class _Alloc = allocator<_Ty>>
const_reference std::list2< _Ty, _Alloc >::operator[] ( size_type _Off ) const [inline]

dereference operator

Parameters:
_Off offset/index of element to dereference

template<class _Ty, class _Alloc = allocator<_Ty>>
reference std::list2< _Ty, _Alloc >::operator[] ( size_type _Off ) [inline]

dereference operator

Parameters:
_Off offset/index of element to dereference

template<class _Ty, class _Alloc = allocator<_Ty>>
pair<size_type,bool> std::list2< _Ty, _Alloc >::position ( const _Ty & _Val ) const [inline]

Brute force evaluation of element index in container. -1 is returned if element is not contained.

Parameters:
_Val element to search for
Returns:
  • position of _Val in vector or -1 if _VAL is not element of vector
  • whether or not _Val is element of vector

Friends And Related Function Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
list2< _Ty_a, _Alloc_a > & operator+= | ( | list2< _Ty_a, _Alloc_a > & | container,
 |  | const list< _Ty_b, _Alloc_b > & | values
 | ) | [related]

add (not store) the values of a container to another container

Note:
the receiver container will not be emptied
Warning:
this operator can only be instanciated if a conversion from _Ty_b to _Ty_a exists
See also:
list2::operator<<
Parameters:
_Ty_a | element/value type of receiver container
_Alloc_a | element/value allocator of receiver container
_Ty_b | element/value type of input container
_Alloc_b | element/value allocator of input container
container | container that receives th e input values
values | container input values
Returns:
modified container

template<class _Ty, class _Alloc = allocator<_Ty>>
list2< _Ty_a, _Alloc_a > & operator<< | ( | list2< _Ty_a, _Alloc_a > & | container,
 |  | const list< _Ty_b, _Alloc_b > & | values
 | ) | [related]

store (not add) the values of a container to another containert

Note:
the receiver container will be emptied
Warning:
this operator can only be instanciated if a conversion from _Ty_b to _Ty_a exists
See also:
list2::operator+=
Parameters:
_Ty_a | element/value type of receiver container
_Alloc_a | element/value allocator of receiver container
_Ty_b | element/value type of input container
_Alloc_b | element/value allocator of input container
container | container that receives th e input values
values | container input values
Returns:
modified container

The documentation for this class was generated from the following file:
  • list2.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::LockedVar< T, _THREAD_MODEL > Class Template Reference

mbo::LockedVar< T, _THREAD_MODEL > Class Template Reference

locked variable More...

#include <MboLockedVar.h>

List of all members.

Public Member Functions

T | __exchange (const T &tIn)
mbo::CLock __getLock ()
LockedVar (const T &tIn)
operator const T () const
operator T ()
const T & | operator= (const T &tIn)

Private Types

typedef _THREAD_MODEL::CriticalSection | CriticalSection

Private Attributes

CriticalSection m_mx
T | t

Detailed Description

template<class T, class _THREAD_MODEL = ThreadModel>
class mbo::LockedVar< T, _THREAD_MODEL >

locked variable

LockedVar is used to define locked variables (mostly class members) that are guarded by a mutex. These variables can be accessed by copy only since that is needed to ensure the lock mechanism. If you need locked members and gain reference access to them you'll need to define a separate mutex or lock and have no need for this LockVar type.

Member Typedef Documentation

template<class T, class _THREAD_MODEL = ThreadModel>
typedef _THREAD_MODEL::CriticalSection mbo::LockedVar< T, _THREAD_MODEL >::CriticalSection [private]

type abbrevation for thread model dependant Lock

Constructor & Destructor Documentation

template<class T, class _THREAD_MODEL = ThreadModel>
mbo::LockedVar< T, _THREAD_MODEL >::LockedVar ( const T & tIn ) [inline]

Default Constructor

Parameters:
tIn initial value

Member Function Documentation

template<class T, class _THREAD_MODEL = ThreadModel>
T mbo::LockedVar< T, _THREAD_MODEL >::__exchange ( const T & tIn ) [inline]

value exchangement

Parameters:
tIn the new value
Returns:
the old value

template<class T, class _THREAD_MODEL = ThreadModel>
mbo::CLock mbo::LockedVar< T, _THREAD_MODEL >::__getLock ( ) [inline]

Returns:
Lock for variable

template<class T, class _THREAD_MODEL = ThreadModel>
mbo::LockedVar< T, _THREAD_MODEL >::operator const T ( ) const [inline]

const access to locked value (a const copy is returned)

Returns:
not locked const copy of the value
Note:
This returns a copy because returning a reference would bypass locking.

template<class T, class _THREAD_MODEL = ThreadModel>
mbo::LockedVar< T, _THREAD_MODEL >::operator T ( ) [inline]

access to locked value (a copy is returned)

Returns:
not locked copy of the value
Note:
This returns a copy because returning a reference would bypass locking.

template<class T, class _THREAD_MODEL = ThreadModel>
const T& mbo::LockedVar< T, _THREAD_MODEL >::operator= ( const T & tIn ) [inline]

assignment

Parameters:
tIn new value
Note:
This returns a reference to the input. It is not feasible to return the value itself. A copy would be to slow and a reference would bypass locking.

Member Data Documentation

template<class T, class _THREAD_MODEL = ThreadModel>
CriticalSection mbo::LockedVar< T, _THREAD_MODEL >::m_mx [mutable, private]

template<class T, class _THREAD_MODEL = ThreadModel>
T mbo::LockedVar< T, _THREAD_MODEL >::t [private]

The documentation for this class was generated from the following file:
  • MboLockedVar.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::LockedVar< bool, ThreadModel > Class Template Reference

mbo::LockedVar< bool, ThreadModel > Class Template Reference

locked boolean variable More...

#include <MboLockedVar.h>

List of all members.

Public Member Functions

T | __exchange (const T &tIn)
mbo::CLock __getLock ()
LockedVar (const T &tIn)
operator const T () const
operator T ()
const T & | operator= (const T &tIn)

Private Types

typedef _THREAD_MODEL::CriticalSection | CriticalSection

Private Attributes

CriticalSection m_mx
T | t

Detailed Description

template<>
class mbo::LockedVar< bool, ThreadModel >

locked boolean variable

See also:
MboLockedVar

Member Typedef Documentation

typedef _THREAD_MODEL::CriticalSection mbo::LockedVar< bool, ThreadModel >::CriticalSection [private]

type abbrevation for thread model dependant Lock

Member Function Documentation

T mbo::LockedVar< bool, ThreadModel >::__exchange ( const T & tIn ) [inline]

value exchangement

Parameters:
tIn the new value
Returns:
the old value

mbo::CLock mbo::LockedVar< bool, ThreadModel >::__getLock ( ) [inline]

Returns:
Lock for variable

mbo::LockedVar< bool, ThreadModel >::LockedVar ( const T & tIn ) [inline]

Default Constructor

Parameters:
tIn initial value

mbo::LockedVar< bool, ThreadModel >::operator const T ( ) const [inline]

const access to locked value (a const copy is returned)

Returns:
not locked const copy of the value
Note:
This returns a copy because returning a reference would bypass locking.

mbo::LockedVar< bool, ThreadModel >::operator T ( ) [inline]

access to locked value (a copy is returned)

Returns:
not locked copy of the value
Note:
This returns a copy because returning a reference would bypass locking.

const T& mbo::LockedVar< bool, ThreadModel >::operator= ( const T & tIn ) [inline]

assignment

Parameters:
tIn new value
Note:
This returns a reference to the input. It is not feasible to return the value itself. A copy would be to slow and a reference would bypass locking.

Member Data Documentation

CriticalSection mbo::LockedVar< bool, ThreadModel >::m_mx [mutable, private]

T mbo::LockedVar< bool, ThreadModel >::t [private]

The documentation for this class was generated from the following file:
  • MboLockedVar.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: map Class Reference

map Class Reference

Inheritance diagram for map:

std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc > mbo::CStrMap< MboString > mbo::CStrMapStr
The documentation for this class was generated from the following file:
  • map2.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > Class Template Reference

std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > Class Template Reference

expanded map template class More...

#include <map2.h>

Inheritance diagram for std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >:

map List of all members.

Public Types

typedef pair< const __Kty,
__Ty > 		_Element
typedef check_fun_t< _Myt,
_Element > 		_Element_check_fun_t
typedef __Kty | _Kty
typedef check_fun_t< _Kty_container,
__Kty > 		_Kty_check_fun_t
typedef __Kty_container | _Kty_container
typedef map< __Kty, __Ty,
__Pr, __Alloc > 		_Mybase
typedef map2< __Kty, __Ty,
_Kty_container, _Ty_container,
__Pr, __Alloc > 		_Myt
typedef __Ty | _Ty
typedef check_fun_t< _Ty_container,
__Ty > 		_Ty_check_fun_t
typedef __Ty_container | _Ty_container

Public Member Functions

bool | contains_key (const _Kty &key) const
const _Ty & | first_elem (const _Ty &if_empty) const
_Ty & | first_elem (_Ty &if_empty)
const _Kty & | first_key (const _Kty &if_empty) const
pair< iterator, bool > | insert_elem (const _Kty &key, _Ty val)
_Kty_container | keys (_Kty_check_fun_t check) const
_Kty_container | keys () const
const _Ty & | operator[] (const _Kty &key) const throw (std::out_of_range)
_Ty & | operator[] (const _Kty &key)
_Myt | select (_Element_check_fun_t check) const
_Ty_container | values (_Ty_check_fun_t check) const
_Ty_container | values () const

Detailed Description

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
class std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >

expanded map template class

The template map2 is derived from std::map and uses list2, vector2 or deque2 as key and value containers with vector2 being the default since that should normally result in faster applications.

The main advantage of this specialisation is that you are able to retrieve a container for all or selected keys and/or values. The container type used for this task is determined by the container types used when constructing a class from this template.

This specialisation supports:

  • keys() returns a container of all or selective keys
  • values() returns a container of all or selective values
  • insert_elem() insertion of explicit key value pairs without the need to construct a std::pair.

Parameters:
_Kty | key type
_Ty | value type
_Kty_container | container for keys (vector2, list2, deque2)
_Ty_container | container for values (vector2, list2, deque2)
_Pr | less prediction
_Alloc | element allocator

Member Typedef Documentation

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
typedef pair<const __Kty, __Ty> std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::_Element

type abbrevation for element type

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
typedef check_fun_t<_Myt,_Element> std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::_Element_check_fun_t

type abbrevation for Element check function

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
typedef __Kty std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::_Kty

type abbrevation for Key type

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
typedef check_fun_t<_Kty_container,__Kty> std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::_Kty_check_fun_t

tape abbrevation for Key check function

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
typedef __Kty_container std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::_Kty_container

type abbrevation for Key container

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
typedef map<__Kty, __Ty, __Pr, __Alloc> std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::_Mybase

type abbrevation for parent class/template

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
typedef map2<__Kty, __Ty, _Kty_container, _Ty_container, __Pr, __Alloc> std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::_Myt

type abbreveation for this class

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
typedef __Ty std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::_Ty

type abbrevation for Value type

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
typedef check_fun_t<_Ty_container,__Ty> std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::_Ty_check_fun_t

tape abbrevation for Value check function

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
typedef __Ty_container std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::_Ty_container

type abbrevation for Value container

Member Function Documentation

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
bool std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::contains_key ( const _Kty & key ) const [inline]

Check whether or not the map contains a specific key.

Parameters:
key Key of element to search for

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
const _Ty& std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::first_elem ( const _Ty & if_empty ) const [inline]

Retrieves the first value or a default one if the map is empty (const).

Parameters:
if_empty Value to use when map is empty.
Returns:
Reference (const) to either if_empty in case map is empty or the first value.
Note:
Since local objects are destroyed at block end you are able to to calls like const T x = y.first_elem(T());.

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
_Ty& std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::first_elem ( _Ty & if_empty ) [inline]

Retrieves the first value or a default one if the map is empty.

Parameters:
if_empty Value to use when map is empty.
Returns:
Reference to either if_empty in case map is empty or the first value.
Note:
Since local objects are destroyed at block end you are able to to calls like T x = y.first_elem(T());.

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
const _Kty& std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::first_key ( const _Kty & if_empty ) const [inline]

Retrieves the first key or a default one if the map is empty.

Parameters:
if_empty Key to use when map is empty.
Returns:
Reference to either if_empty in case map is empty or the first key.
Note:
Since local objects are destroyed at block end you are able to to calls like const T x = y.first_key(T());.

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
pair<iterator,bool> std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::insert_elem | ( | const _Kty & | key,
 |  | _Ty | val
 | ) | [inline]

Insert a pair constructed from explicit key and val parameters. This is different from operator[] since it uses insert and does therefor not change an existing pair. There exists a template mem function insert what means that all insert functions are non virtual and therefore we cannot name this function insert.

Parameters:
key | Key of element to insert
val | Value of element to insert
Returns:
  • iterator iterator to element if inserted or to end()
  • bool whether or not the element was inserted

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
_Kty_container std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::keys ( _Kty_check_fun_t check ) const [inline]

Returns std::deque, std::list or std::vector of selected keys stored in this map.

This is dependent on the template parameter _Kty_containter that defaults to std::deque2.

With this specialized version you are able to decide which keys of the map should make it in the returned container.

For example this makes it easy to build a list of keys that conform to to a certain condition. such like returning all keys that start with the same string when using strings as keys.

See also:
keys()

std::check_fun

Parameters:
check key selection helper function
Returns:
key container

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
_Kty_container std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::keys ( ) const [inline]

Returns std::deque, std::list or std::vector of all keys stored in this map.

This is dependent on the template parameter _Kty_containter that defaults to deque2.

Note:
if you want to assign the function result to an instance of an equivalent class type it may be necessary to specify the correct type for _Kty_container in the template parameter list.
See also:
keys(_IN _Kty_check_fun_t check)

std::check_fun

Returns:
key container

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
const _Ty& std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::operator[] ( const _Kty & key ) const throw (std::out_of_range) [inline]

Const access by key

Parameters:
key to search
Returns:
const reference to value
Exceptions:
std::out_of_range if key does not exist

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
_Ty& std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::operator[] ( const _Kty & key ) [inline]

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
_Myt std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::select ( _Element_check_fun_t check ) const [inline]

Selectively copy key/value pairs to a new map of the same type.

See also:
std::check_fun
Parameters:
check element selection helper function

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
_Ty_container std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::values ( _Ty_check_fun_t check ) const [inline]

Returns std::deque, std::list, std::vector of selected elements stored in this map.

This is dependent on the template parameter _Ty_containter that defaults to std::deque2.

With this specialized version you are able to decide which elements of the map should make it in the returned container.

For example this makes building a container of unique elements easy when the container is deque2, list2 or vector2.

      std::map2<int, char*, std::deque2<int>, std::deque2<char*> > v;
      std::deque2<char*> unique = v.values(std::check_fun(std::deque2<char*>::contains_no));

In the above example the check_fun helper adapter is used to turn the function std::deque2::contains_no into the required test function. This way every element of v is passed to unique.contains_no().

See also:
values()

std::check_fun

Parameters:
check element selection helper function
Returns:
element container

template<class __Kty, class __Ty, class __Kty_container = std::deque2 <__Kty>, class __Ty_container = std::deque2 <__Ty>, class __Pr = less<__Kty>, class __Alloc = allocator<pair<const __Kty, __Ty> >>
_Ty_container std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >::values ( ) const [inline]

Returns std::deque, std::list or std::vector of all elements stored in this map.

This is dependent on the template parameter _Ty_containter that defaults to std::deque2.

Note:
if you want to assign the function result to an instance of an equivalent class type it may be necessary to specify the correct type for _Ty_container in the template parameter list.
See also:
values(_IN _Ty_check_fun_t check)

std::check_fun

Returns:
element container

The documentation for this class was generated from the following file:
  • map2.h
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::Matrix< _Ty, _Cols, _Rows > Class Template Reference

mbo::Matrix< _Ty, _Cols, _Rows > Class Template Reference

Matrix class. More...

#include <MboMatrix.h>

List of all members.

Public Member Functions

Matrix< _Ty, _Cols, _Rows > | Adj () throw (MatrixException)
_Ty | Cofactor (size_t row, size_t col) throw (MatrixException)
_Ty | Cond ()
_Ty | Det () throw (MatrixException)
bool | IsDiagonal ()
bool | IsLowerTiangular ()
bool | IsNull ()
bool | IsScalar ()
bool | IsSingular ()
bool | IsSkewSymmetric ()
bool | IsSquare ()
bool | IsSymmetric ()
bool | IsUnit ()
bool | IsUpperTiangular ()
Matrix (const Matrix< _Ty, _Cols, _Rows > &m)
_Ty | Norm ()
void | Null ()
void | Null (const size_t &row, const size_t &col)
size_t | numCols ()
size_t | numRows ()
Matrix< _Ty, _Cols, _Rows > & | operator *= (const _Ty &c)
Matrix< _Ty, _Cols, _Rows > & | operator *= (const Matrix< _Ty, _Cols, _Rows > &m) throw (MatrixException)
_Ty & | operator() (size_t row, size_t col) throw (MatrixException)
Matrix< _Ty, _Cols, _Rows > | operator+ ()
Matrix< _Ty, _Cols, _Rows > & | operator+= (const Matrix< _Ty, _Cols, _Rows > &m) throw (MatrixException)
Matrix< _Ty, _Cols, _Rows > | operator- ()
Matrix< _Ty, _Cols, _Rows > & | operator-= (const Matrix< _Ty, _Cols, _Rows > &m) throw (MatrixException)
Matrix< _Ty, _Cols, _Rows > & | operator/= (const _Ty &c)
Matrix< _Ty, _Cols, _Rows > & | operator= (const Matrix< _Ty, _Cols, _Rows > &m)
Matrix< _Ty, _Cols, _Rows > & | operator^= (const size_t &pow) throw (MatrixException)
Matrix< _Ty, _Cols, _Rows > | Solve (const Matrix< _Ty, _Cols, _Rows > &v) const throw (MatrixException)
void | Unit ()
void | Unit (const size_t &row)

Private Member Functions

int | pivot (size_t row)

Private Attributes

_Ty | Val [_Cols][_Rows]

Friends

Matrix< _Ty, _Cols2, _Rows1 > | _Cols
template<class _Ty, _Cols , _Rows >
Matrix< _Ty, _Cols, _Rows > | operator * (const T &no, const Matrix< _Ty, _Cols, _Rows > &m)
template<class _Ty, _Cols , _Rows >
Matrix< _Ty, _Cols, _Rows > | operator * (const Matrix< _Ty, _Cols, _Rows > &m, const T &no)
Matrix< _Ty, _Cols2, _Rows1
> _Rows Matrix< _Ty, _Cols,
_Rows > 		operator * (const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) throw (MatrixException)
template<class _Ty, size_t _Cols1Rows2, size_t _Rows1, size_t _Cols2>
Matrix< _Ty, _Cols2, _Rows1 > | operator * (const Matrix< _Ty, _Cols1Rows2, _Rows1 > &lhs, const Matrix< _Ty, _Cols2, _Cols1Rows2 > &rhs) friend template< class _Ty
template<class _Ty, _Cols , _Rows >
Matrix< _Ty, _Cols, _Rows > | operator! (Matrix< _Ty, _Cols, _Rows > m) throw (MatrixException)
bool | operator!= (const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2)
template<class _Ty, _Cols , _Rows >
Matrix< _Ty, _Cols, _Rows > | operator+ (const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) throw (MatrixException)
template<class _Ty, _Cols , _Rows >
Matrix< _Ty, _Cols, _Rows > | operator- (const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) throw (MatrixException)
template<class _Ty, _Cols , _Rows >
Matrix< _Ty, _Cols, _Rows > | operator/ (const T &no, const Matrix< _Ty, _Cols, _Rows > &m) throw (MatrixException)
template<class _Ty, _Cols , _Rows >
Matrix< _Ty, _Cols, _Rows > | operator/ (const Matrix< _Ty, _Cols, _Rows > &m, const T &no)
template<class _Ty, _Cols , _Rows >
Matrix< _Ty, _Cols, _Rows > | operator/ (const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) throw (MatrixException)
ostream & | operator<< (ostream &o, Matrix< _Ty, _Cols, _Rows > &m)
bool | operator== (const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2)
istream & | operator>> (istream &i, Matrix< _Ty, _Cols, _Rows > &m)
template<class _Ty, _Cols , _Rows >
Matrix< _Ty, _Cols, _Rows > | operator^ (const Matrix< _Ty, _Cols, _Rows > &m, const size_t &pow) throw (MatrixException)
template<class _Ty, _Cols , _Rows >
Matrix< _Ty, _Cols, _Rows > | operator~ (const Matrix< _Ty, _Cols, _Rows > &m)

Detailed Description

template<class _Ty, size_t _Cols, size_t _Rows>
class mbo::Matrix< _Ty, _Cols, _Rows >

Matrix class.

Constructor & Destructor Documentation

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

Member Function Documentation

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows> mbo::Matrix< _Ty, _Cols, _Rows >::Adj ( ) throw (MatrixException)

template<class _Ty, size_t _Cols, size_t _Rows>
_Ty mbo::Matrix< _Ty, _Cols, _Rows >::Cofactor | ( | size_t | row,
 |  | size_t | col
 | ) | throw (MatrixException)

template<class _Ty, size_t _Cols, size_t _Rows>
_Ty mbo::Matrix< _Ty, _Cols, _Rows >::Cond ( )

template<class _Ty, size_t _Cols, size_t _Rows>
_Ty mbo::Matrix< _Ty, _Cols, _Rows >::Det ( ) throw (MatrixException)

template<class _Ty, size_t _Cols, size_t _Rows>
bool mbo::Matrix< _Ty, _Cols, _Rows >::IsDiagonal ( )

template<class _Ty, size_t _Cols, size_t _Rows>
bool mbo::Matrix< _Ty, _Cols, _Rows >::IsLowerTiangular ( )

template<class _Ty, size_t _Cols, size_t _Rows>
bool mbo::Matrix< _Ty, _Cols, _Rows >::IsNull ( )

template<class _Ty, size_t _Cols, size_t _Rows>
bool mbo::Matrix< _Ty, _Cols, _Rows >::IsScalar ( )

template<class _Ty, size_t _Cols, size_t _Rows>
bool mbo::Matrix< _Ty, _Cols, _Rows >::IsSingular ( )

template<class _Ty, size_t _Cols, size_t _Rows>
bool mbo::Matrix< _Ty, _Cols, _Rows >::IsSkewSymmetric ( )

template<class _Ty, size_t _Cols, size_t _Rows>
bool mbo::Matrix< _Ty, _Cols, _Rows >::IsSquare ( ) [inline]

template<class _Ty, size_t _Cols, size_t _Rows>
bool mbo::Matrix< _Ty, _Cols, _Rows >::IsSymmetric ( )

template<class _Ty, size_t _Cols, size_t _Rows>
bool mbo::Matrix< _Ty, _Cols, _Rows >::IsUnit ( )

template<class _Ty, size_t _Cols, size_t _Rows>
bool mbo::Matrix< _Ty, _Cols, _Rows >::IsUpperTiangular ( )

template<class _Ty, size_t _Cols, size_t _Rows>
_Ty mbo::Matrix< _Ty, _Cols, _Rows >::Norm ( )

template<class _Ty, size_t _Cols, size_t _Rows>
void mbo::Matrix< _Ty, _Cols, _Rows >::Null ( )

template<class _Ty, size_t _Cols, size_t _Rows>
void mbo::Matrix< _Ty, _Cols, _Rows >::Null | ( | const size_t & | row,
 |  | const size_t & | col
 | ) |

template<class _Ty, size_t _Cols, size_t _Rows>
size_t mbo::Matrix< _Ty, _Cols, _Rows >::numCols ( ) [inline]

template<class _Ty, size_t _Cols, size_t _Rows>
size_t mbo::Matrix< _Ty, _Cols, _Rows >::numRows ( ) [inline]

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows>& mbo::Matrix< _Ty, _Cols, _Rows >::operator *= ( const _Ty & c )

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows>& mbo::Matrix< _Ty, _Cols, _Rows >::operator *= ( const Matrix< _Ty, _Cols, _Rows > & m ) throw (MatrixException)

template<class _Ty, size_t _Cols, size_t _Rows>
_Ty & mbo::Matrix< _Ty, _Cols, _Rows >::operator() | ( | size_t | row,
 |  | size_t | col
 | ) | throw (MatrixException) [inline]

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows> mbo::Matrix< _Ty, _Cols, _Rows >::operator+ ( ) [inline]

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows>& mbo::Matrix< _Ty, _Cols, _Rows >::operator+= ( const Matrix< _Ty, _Cols, _Rows > & m ) throw (MatrixException)

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows> mbo::Matrix< _Ty, _Cols, _Rows >::operator- ( )

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows>& mbo::Matrix< _Ty, _Cols, _Rows >::operator-= ( const Matrix< _Ty, _Cols, _Rows > & m ) throw (MatrixException)

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows>& mbo::Matrix< _Ty, _Cols, _Rows >::operator/= ( const _Ty & c )

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

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows>& mbo::Matrix< _Ty, _Cols, _Rows >::operator^= ( const size_t & pow ) throw (MatrixException)

template<class _Ty, size_t _Cols, size_t _Rows>
int mbo::Matrix< _Ty, _Cols, _Rows >::pivot ( size_t row ) [private]

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols, _Rows> mbo::Matrix< _Ty, _Cols, _Rows >::Solve ( const Matrix< _Ty, _Cols, _Rows > & v ) const throw (MatrixException)

template<class _Ty, size_t _Cols, size_t _Rows>
void mbo::Matrix< _Ty, _Cols, _Rows >::Unit ( )

template<class _Ty, size_t _Cols, size_t _Rows>
void mbo::Matrix< _Ty, _Cols, _Rows >::Unit ( const size_t & row )

Friends And Related Function Documentation

template<class _Ty, size_t _Cols, size_t _Rows>
friend Matrix<_Ty, _Cols2, _Rows1> _Cols [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
template<class _Ty, _Cols , _Rows >
Matrix<_Ty, _Cols, _Rows> operator * | ( | const T & | no,
 |  | const Matrix< _Ty, _Cols, _Rows > & | m
 | ) | [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
template<class _Ty, _Cols , _Rows >
Matrix<_Ty, _Cols, _Rows> operator * | ( | const Matrix< _Ty, _Cols, _Rows > & | m,
 |  | const T & | no
 | ) | [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
Matrix<_Ty, _Cols2, _Rows1> _Rows Matrix<_Ty, _Cols, _Rows> operator * | ( | const Matrix< _Ty, _Cols, _Rows > & | m1,
 |  | const Matrix< _Ty, _Cols, _Rows > & | m2
 | ) | throw (MatrixException) [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
template<class _Ty, size_t _Cols1Rows2, size_t _Rows1, size_t _Cols2>
Matrix<_Ty, _Cols2, _Rows1> operator * | ( | const Matrix< _Ty, _Cols1Rows2, _Rows1 > & | lhs,
 |  | const Matrix< _Ty, _Cols2, _Cols1Rows2 > & | rhs
 | ) | [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
template<class _Ty, _Cols , _Rows >
Matrix<_Ty, _Cols, _Rows> operator! ( Matrix< _Ty, _Cols, _Rows > m ) throw (MatrixException) [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
bool operator!= | ( | const Matrix< _Ty, _Cols, _Rows > & | m1,
 |  | const Matrix< _Ty, _Cols, _Rows > & | m2
 | ) | [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
template<class _Ty, _Cols , _Rows >
Matrix<_Ty, _Cols, _Rows> operator+ | ( | const Matrix< _Ty, _Cols, _Rows > & | m1,
 |  | const Matrix< _Ty, _Cols, _Rows > & | m2
 | ) | throw (MatrixException) [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
template<class _Ty, _Cols , _Rows >
Matrix<_Ty, _Cols, _Rows> operator- | ( | const Matrix< _Ty, _Cols, _Rows > & | m1,
 |  | const Matrix< _Ty, _Cols, _Rows > & | m2
 | ) | throw (MatrixException) [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
template<class _Ty, _Cols , _Rows >
Matrix<_Ty, _Cols, _Rows> operator/ | ( | const T & | no,
 |  | const Matrix< _Ty, _Cols, _Rows > & | m
 | ) | throw (MatrixException) [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
template<class _Ty, _Cols , _Rows >
Matrix<_Ty, _Cols, _Rows> operator/ | ( | const Matrix< _Ty, _Cols, _Rows > & | m,
 |  | const T & | no
 | ) | [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
template<class _Ty, _Cols , _Rows >
Matrix<_Ty, _Cols, _Rows> operator/ | ( | const Matrix< _Ty, _Cols, _Rows > & | m1,
 |  | const Matrix< _Ty, _Cols, _Rows > & | m2
 | ) | throw (MatrixException) [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
ostream& operator<< | ( | ostream & | o,
 |  | Matrix< _Ty, _Cols, _Rows > & | m
 | ) | [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
bool operator== | ( | const Matrix< _Ty, _Cols, _Rows > & | m1,
 |  | const Matrix< _Ty, _Cols, _Rows > & | m2
 | ) | [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
istream& operator>> | ( | istream & | i,
 |  | Matrix< _Ty, _Cols, _Rows > & | m
 | ) | [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
template<class _Ty, _Cols , _Rows >
Matrix<_Ty, _Cols, _Rows> operator^ | ( | const Matrix< _Ty, _Cols, _Rows > & | m,
 |  | const size_t & | pow
 | ) | throw (MatrixException) [friend]

template<class _Ty, size_t _Cols, size_t _Rows>
template<class _Ty, _Cols , _Rows >
Matrix<_Ty, _Cols, _Rows> operator~ ( const Matrix< _Ty, _Cols, _Rows > & m ) [friend]

Member Data Documentation

template<class _Ty, size_t _Cols, size_t _Rows>
_Ty mbo::Matrix< _Ty, _Cols, _Rows >::Val[_Cols][_Rows] [private]

The documentation for this class was generated from the following file:
  • MboMatrix.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::MatrixException Class Reference

mbo::MatrixException Class Reference

Matrix exception class. More...

#include <MboMatrix.h>

Inheritance diagram for mbo::MatrixException:

exception List of all members.

Private Member Functions

MatrixException (_IN const char *szWhat)

Detailed Description

Matrix exception class.

Constructor & Destructor Documentation

mbo::MatrixException::MatrixException ( _IN const char * szWhat ) [inline, private]

The documentation for this class was generated from the following file:
  • MboMatrix.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::MboDelayedEventThread Class Reference

mbo::MboDelayedEventThread Class Reference

An event driven thread implementation. More...

#include <MboThread.h>

Inheritance diagram for mbo::MboDelayedEventThread:

mbo::MboEventThread mbo::MboThread List of all members.

Public Types

enum EThreadPriority {
PRIORITY_IDLE = THREAD_PRIORITY_IDLE,
PRIORITY_LOWEST = THREAD_PRIORITY_LOWEST,
PRIORITY_LOW = THREAD_PRIORITY_ABOVE_NORMAL,
PRIORITY_NORMAL = THREAD_PRIORITY_NORMAL,
PRIORITY_HIGH = THREAD_PRIORITY_ABOVE_NORMAL,
PRIORITY_HIGHEST = THREAD_PRIORITY_HIGHEST,
PRIORITY_CRITICAL = THREAD_PRIORITY_TIME_CRITICAL
}

Public Member Functions

virtual void | Action ()=0
IncDecVal | GetCounter () const
virtual size_t | GetDelay () const
DWORD | GetThreadId () const
const char * | GetThreadName ()
bool | IsRunning () const
virtual bool | IsSignaled () const
bool | IsStopping () const
bool | KillThread (DWORD nMilliseconds=0, DWORD dwExitCode=-1)
MboDelayedEventThread (size_t nMilliSeconds=0, bool bAutoStart=true, const char *szThreadName=0)
virtual void | OnThreadStart ()
virtual void | OnThreadStop ()
virtual void | SetDelay (size_t nMilliSeconds=0)
void | SetEvent () const
void | SetThreadPriority (EThreadPriority ePriority)
virtual void | Start ()
virtual void | Stop ()
bool | WaitFor (DWORD nMilliseconds=INFINITE) const
virtual | ~MboDelayedEventThread ()

Static Public Member Functions

void | SetThreadName (const char *szThreadName, DWORD dwThreadID=-1)

Protected Attributes

DWORD | m_dwThreadId
HANDLE | m_hIsStopping
HANDLE | m_hThread
CCriticalSectionImpl m_mxStartStop

Private Member Functions

virtual void | ThreadProc ()

Private Attributes

HANDLE | m_hDelay
CCriticalSectionImpl m_mxDelay
size_t | m_nDelay

Detailed Description

An event driven thread implementation.

The derived class MboEventThread implements an endless loop that waits for an event to occur (SetEvent) between each calls of Action(). The callbacks OnThreadStart()/OnThreadStop() are only called once. Unlike the base class MboEventThread you can set a delay between event and action.

Note:
This class is distributed under the following license Mbo License.

Member Enumeration Documentation

enum mbo::MboThread::EThreadPriority [inherited]

Thread priority classes. These directly map to the native priority classes.

Enumeration values:
PRIORITY_IDLE
PRIORITY_LOWEST
PRIORITY_LOW
PRIORITY_NORMAL
PRIORITY_HIGH
PRIORITY_HIGHEST
PRIORITY_CRITICAL

Constructor & Destructor Documentation

mbo::MboDelayedEventThread::MboDelayedEventThread | ( | size_t | nMilliSeconds = 0,
 |  | bool | bAutoStart = true,
 |  | const char * | szThreadName = 0
 | ) | [explicit]

constructor

Parameters:
nMilliSeconds | delay between event and action.
bAutoStart | whether to automatically start the event thread.
szThreadName | The name of the thread. The new class instance will copy the value and free its copy automatically upon destruction. You may want to use NULL to use the class name of as the thread name. If you do so the name is computed in thread startup - this only works if this is not done in constructor. If done so the name you will see is the name of that parent class whose constructor started the thread.
Note:
You can see thread names only in MSVC.NET and above or MSVC.6-SP2.

virtual mbo::MboDelayedEventThread::~MboDelayedEventThread ( ) [virtual]

destructor

Member Function Documentation

virtual void mbo::MboThread::Action ( ) [pure virtual, inherited]

Action method to be implemented by derived classes.

This Method is called once after Start() is successfull and may contain an infinite loop. But the method has to check whether or not it must exit (IsStopping())

Implemented in mbo::MboWinMsgHandler.

IncDecVal mbo::MboEventThread::GetCounter ( ) const [inherited]

Counts the execution times of Action()

Note:
Since the delay may be skipped ht ecounter is incremented right before calling Action() and not after receiving the event by a call to SetEvent().
Returns:
number of times Action() was invoked

virtual size_t mbo::MboDelayedEventThread::GetDelay ( ) const [virtual]

Get delay between event and call to Action()

Returns:
time in milli seconds

DWORD mbo::MboThread::GetThreadId ( ) const [inherited]

Retrieve Id of thread

This value is NULL if no thread is running

Returns:
internal thread id

const char* mbo::MboThread::GetThreadName ( ) [inherited]

Get thread name.

When the name was set NULL in constructor then this function triggers the name generation. However this has the same affects when called from inside a constructor.

Returns:
the name of the thread
Note:
This is a non const function.

bool mbo::MboThread::IsRunning ( ) const [inherited]

Check if a thread is running

Returns:
whether the thread is running

virtual bool mbo::MboEventThread::IsSignaled ( ) const [virtual, inherited]

Check whether the thread is signaled. That is the thread event has been set and either the delay hasn't elapsed or the Action() wasn't finished already.

Returns:
Whether thread is signaled.

bool mbo::MboThread::IsStopping ( ) const [inherited]

Check if a thread is told to stop

Returns:
whether the thread is stopping

bool mbo::MboThread::KillThread | ( | DWORD | nMilliseconds = 0,
 |  | DWORD | dwExitCode = -1
 | ) | [inherited]

Stop the thread, wait a given time for the thread to terminate and kill it afterwards if necessary.

Parameters:
nMilliseconds | Time in milliseconds to wait for the thread to terminate normally.
dwExitCode | Exitcode for the thread if killed.
Returns:
Whether or not the thread was terminated. This may become necessary for derived threads. However this function is invariant against inheritance.

virtual void mbo::MboThread::OnThreadStart ( ) [virtual, inherited]

Method called emidiatley after thread has started and before Action() is called.

virtual void mbo::MboThread::OnThreadStop ( ) [virtual, inherited]

Method that is called when action is left e.g. thread is stoping.

virtual void mbo::MboDelayedEventThread::SetDelay ( size_t nMilliSeconds = 0 ) [virtual]

Set delay between event and call to Action()

Parameters:
nMilliSeconds time in milli seconds

void mbo::MboEventThread::SetEvent ( ) const [inherited]

Set event which results in calling execute if the thread is running.

void mbo::MboThread::SetThreadName | ( | const char * | szThreadName,
 |  | DWORD | dwThreadID = -1
 | ) | [static, inherited]

Set the thread name for the debugging interface.

Parameters:
szThreadName | The new name of the thread
dwThreadID | The thread id or -1 to select current thread.
This function is typically called at Thread startup.

void mbo::MboThread::SetThreadPriority ( EThreadPriority ePriority ) [inherited]

Set the threads priority class.

Parameters:
ePriority new priority for the thread.
Note:
This works only if the thread was running once already.

virtual void mbo::MboThread::Start ( ) [virtual, inherited]

Start the thread.

to check whether or not the thread was really started implement an OnThreadStart() handler in the derived class.

virtual void mbo::MboDelayedEventThread::Stop ( ) [virtual]

Stop the thread.

This stops the thread by signaling it and skipping the delay. Neither Action() is called nor will the Action() counter be incremented.

Reimplemented from mbo::MboEventThread.

virtual void mbo::MboDelayedEventThread::ThreadProc ( ) [private, virtual]

Event handling and Action() invocation from the thread.

Reimplemented from mbo::MboEventThread.

bool mbo::MboThread::WaitFor ( DWORD nMilliseconds = INFINITE ) const [inherited]

Wait for thread to terminate

WaitFor() does not call Stop() and can itself be called from more than one thread.

Parameters:
nMilliseconds Time to wait for thread to terminate.
Returns:
Whether or not the thread ended.

Member Data Documentation

DWORD mbo::MboThread::m_dwThreadId [protected, inherited]

Thread Id or 0 (guarded by m_mxStartStop)

HANDLE mbo::MboDelayedEventThread::m_hDelay [private]

Event used to skip delay on Stop()

HANDLE mbo::MboThread::m_hIsStopping [protected, inherited]

Stop flag (Event)

HANDLE mbo::MboThread::m_hThread [protected, inherited]

HANDLE to thread or NULL (guarded by m_mxStartStop)

CCriticalSectionImpl mbo::MboDelayedEventThread::m_mxDelay [private]

Mutex to guard member access

CCriticalSectionImpl mbo::MboThread::m_mxStartStop [protected, inherited]

Mutex used for start/stop access

size_t mbo::MboDelayedEventThread::m_nDelay [private]

delay time in milliseconds (guarded by m_mxDelay)

The documentation for this class was generated from the following file:
  • MboThread.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::MboDrawWin Class Reference

mbo::MboDrawWin Class Reference

A draw window independant from main application. More...

#include <MboDrawWin.h>

Inheritance diagram for mbo::MboDrawWin:

mbo::MboWinMsgHandler mbo::MboThread List of all members.

Public Member Functions

virtual void | CalcTextRect (RECT &rect, const MboString &strText, UINT uFormat=0)
virtual bool | DrawBitmap (int nLeft, int nTop, UINT nResId)
virtual bool | DrawBitmap (int nLeft, int nTop, const MboString &strResId)
virtual bool | DrawBitmap (int nLeft, int nTop, HBITMAP hBitmap)
virtual void | DrawCircle (const LONG nCenterX, const LONG nCenterY, const LONG nRadius, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL)
virtual void | DrawCircle (const POINT &ptCenter, const LONG nRadius, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL)
virtual void | DrawEllipse (const RECT &rect, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL)
virtual bool | DrawIcon (int nLeft, int nTop, UINT nResId)
virtual bool | DrawIcon (int nLeft, int nTop, const MboString &strResId)
virtual bool | DrawIcon (int nLeft, int nTop, HICON hIcon)
virtual void | DrawLine (POINT pt1, POINT pt2, int nPenWidth, COLORREF colInner, DRAW_MODE enMode=DRAW_MODE_FILL, int fnPenStyle=PS_INSIDEFRAME)
virtual void | DrawLine (LONG nX1, LONG nY1, LONG nX2, LONG nY2, int nPenWidth, COLORREF colInner, DRAW_MODE enMode=DRAW_MODE_FILL, int fnPenStyle=PS_INSIDEFRAME)
virtual void | DrawPolygon (const POINT *aptPoints, int nNumPoints, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL)
virtual void | DrawRect (LONG nLeft, LONG nTop, LONG nRight, LONG nBottom, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL)
virtual void | DrawRect (const RECT &rect, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL)
virtual void | DrawSetMode (HBRUSH &hBrush, HPEN &hPen, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL, int nPenWidth=0, int fnPenStyle=PS_SOLID)
virtual void | DrawText (LONG nLeft, LONG nTop, LONG nRight, LONG nBottom, const MboString &strText, UINT uFormat=0, COLORREF colInner=RGB(0, 0, 0), COLORREF colOuter=RGB(255, 255, 255), DRAW_MODE enMode=DRAW_MODE_TRANSPARENT)
virtual void | DrawText (const RECT &rect, const MboString &strText, UINT uFormat=0, COLORREF colInner=RGB(0, 0, 0), COLORREF colOuter=RGB(255, 255, 255), DRAW_MODE enMode=DRAW_MODE_TRANSPARENT)
int | GetHeight () const
int | GetMaxSizeX () const
int | GetMaxSizeY () const
int | GetMinSizeX () const
int | GetMinSizeY () const
int | GetPositionX () const
int | GetPositionY () const
int | GetScreenSizeX () const
int | GetScreenSizeY () const
int | GetSizeX () const
int | GetSizeY () const
int | GetWidth () const
bool | IsWindow () const
bool | IsWindowVisible () const
bool | IsWndSizeable () const
bool | IsWndSizingOrMoving () const
MboDrawWin (int nSizeX, int nSizeY, int nMinSizeX, int nMinSizeY, int nMaxSizeX, int nMaxSizeY, const MboString &strWndClassName="MboDrawWin", bool bStart=true)
MboDrawWin (int nSizeX=400, int nSizeY=300, const MboString &strWndClassName="MboDrawWin", bool bStart=true)
virtual void | OnButtonDblClk (UINT nFlags, int x, int y)
virtual void | OnButtonDown (UINT nFlags, int x, int y)
virtual void | OnButtonUp (UINT nFlags, int x, int y)
virtual void | OnWindowCreated ()
virtual void | OnWndSized ()
virtual LRESULT | ProcessMessage (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
virtual void | WndClear ()
virtual bool | WndCreate ()
virtual void | WndDestroy ()
virtual void | WndDraw ()
virtual void | WndHide ()
virtual void | WndLoadExtent (const CIniData &cIniData, const MboString &strSection, bool bWriteDefault=false)
virtual void | WndRestore ()
virtual void | WndSaveExtent (CIniData &cIniData, const MboString &strSection) const
virtual bool | WndSetIconBig (UINT nResId)
virtual bool | WndSetIconBoth (UINT nResId)
virtual bool | WndSetIconSmall (UINT nResId)
virtual void | WndSetPosition (int nPosX, int nPosY)
virtual void | WndSetSize (int nSizeX, int nSizeY)
virtual void | WndSetTitle (const MboString &strTitle)
virtual void | WndShow (bool bActive=true)
virtual void | WndUpdate ()
virtual | ~MboDrawWin ()

Protected Types

enum EThreadPriority {
PRIORITY_IDLE = THREAD_PRIORITY_IDLE,
PRIORITY_LOWEST = THREAD_PRIORITY_LOWEST,
PRIORITY_LOW = THREAD_PRIORITY_ABOVE_NORMAL,
PRIORITY_NORMAL = THREAD_PRIORITY_NORMAL,
PRIORITY_HIGH = THREAD_PRIORITY_ABOVE_NORMAL,
PRIORITY_HIGHEST = THREAD_PRIORITY_HIGHEST,
PRIORITY_CRITICAL = THREAD_PRIORITY_TIME_CRITICAL
}

Protected Member Functions

virtual void | Action ()
void | AddHWND ()
virtual HWND | GetHWND () const
virtual HINSTANCE | GetModuleHandle () const
DWORD | GetThreadId () const
const char * | GetThreadName ()
bool | IsRunning () const
bool | IsStopping () const
bool | KillThread (DWORD nMilliseconds=0, DWORD dwExitCode=-1)
virtual void | MessageHandler (MSG &msg)
virtual void | OnThreadStart ()
virtual void | OnThreadStop ()
virtual bool | PostMessage (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
virtual bool | PostMessage (UINT uMsg, WPARAM wParam, LPARAM lParam)
virtual LRESULT | ProcessDefault (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
void | SetThreadPriority (EThreadPriority ePriority)
virtual void | Start ()
virtual void | Stop ()
virtual void | ThreadProc ()
bool | WaitFor (DWORD nMilliseconds=INFINITE) const
virtual bool | WndCalcMetrics ()
virtual const MboString & | WndClassName () const
virtual bool | WndRegister ()
virtual void | WndRegisterHandle ()
virtual const MboString & | WndTitleText () const

Static Protected Member Functions

void | SetThreadName (const char *szThreadName, DWORD dwThreadID=-1)

Protected Attributes

DWORD | m_dwThreadId
HANDLE | m_hIsStopping
HDC | m_hMemDC
HDC | m_hScrDC
HANDLE | m_hThread
HWND | m_hwnd
CCriticalSectionImpl m_mxStartStop
const MboString | m_strWndClassName

Static Protected Attributes

WndClassList g_vWndClassList

Private Attributes

bool | m_bInSizeMove
int | m_nHeight
int | m_nMaxSizeX
int | m_nMaxSizeY
int | m_nMinSizeX
int | m_nMinSizeY
int | m_nSizeX
int | m_nSizeY
int | m_nWidth

Detailed Description

A draw window independant from main application.

The class creates a window and the message handler and connects them on intstance level. That is you don't have to worry about how to propagate 'slef' to the message handler ProcessMessage().

Actual drawing happens in a background buffer which should be copied to the screen by calling WndUpdate(). The standard message handler implementation does so for several system messages like window movement.

When drawing takes to much time it is a good idea to do that in a separate thread.

Member Enumeration Documentation

enum mbo::MboThread::EThreadPriority [inherited]

Thread priority classes. These directly map to the native priority classes.

Enumeration values:
PRIORITY_IDLE
PRIORITY_LOWEST
PRIORITY_LOW
PRIORITY_NORMAL
PRIORITY_HIGH
PRIORITY_HIGHEST
PRIORITY_CRITICAL

Constructor & Destructor Documentation

mbo::MboDrawWin::MboDrawWin | ( | int | nSizeX = 400,
 |  | int | nSizeY = 300,
 |  | const MboString & | strWndClassName = "MboDrawWin",
 |  | bool | bStart = true
 | ) | [explicit]

Creates a window and all necessary resources (classes, handlers).

Parameters:
nSizeX | outer width of window
nSizeY | outer height of window
strWndClassName | the name of the window class that will be returned by WndClassName() if not overwritten.
bStart | whether to create window and start handler directly. If you plan to override window creation functions in a derived class this parameter must be set false.
Note:
When using this constructor the created window is not resizeable.
Warning:
There is a known problem with small windows. When the window widsth is smaller than the width needed to display any configured frame or system menu elements the client area gets the size as configured and a transparent area is used to fillup the real window area. The problem however is inherent to the WINAPI.

mbo::MboDrawWin::MboDrawWin | ( | int | nSizeX,
 |  | int | nSizeY,
 |  | int | nMinSizeX,
 |  | int | nMinSizeY,
 |  | int | nMaxSizeX,
 |  | int | nMaxSizeY,
 |  | const MboString & | strWndClassName = "MboDrawWin",
 |  | bool | bStart = true
 | ) |

Creates a window and all necessary resources (classes, handlers).

Parameters:
nSizeX | outer width of window
nSizeY | outer height of window
nMinSizeX | minimum allowed outer width of window
nMinSizeY | minimum allowed outer height of window
nMaxSizeX | maximum allowed outer width of window
nMaxSizeY | maximum allowed outer height of window
strWndClassName | the name of the window class that will be returned by WndClassName() if not overwritten.
bStart | whether to create window and start handler directly. If you plan to override window creation functions in a derived class this parameter must be set false.
Note:
When using this constructor the created window is resizeable as long as MinSizeX / MaxSizeX or MinSizeY / MaxSizeY differ.

All Size values area automatically corrected. That is you have exchanged minimum and maximum values the constructor will change them back and if the Size value is smaller than the MinSize value the MinSizeValue will be used and finally if the Size value is greater than the MxSize value then the MaxSize value will be used.

Warning:
There is a known problem with small windows. When the window widsth is smaller than the width needed to display any configured frame or system menu elements the client area gets the size as configured and a transparent area is used to fillup the real window area. The problem however is inherent to the WINAPI.

virtual mbo::MboDrawWin::~MboDrawWin ( ) [virtual]

Destruct instance and all allocated resources.

Member Function Documentation

virtual void mbo::MboWinMsgHandler::Action ( ) [protected, virtual, inherited]

Message handler

Do this:

  • Create an unvisible message window
  • Handle its WinApi messages until stopped For every single message method MessageHandler is invoked.
  • Close and destroy message window

Implements mbo::MboThread.

void mbo::MboWinMsgHandler::AddHWND ( ) [protected, inherited]

Add the instance with its identifying HWND to the list of registered windows.

Actually this does:

     g_mhwndList[m_hwnd] = this;
Note:
non virtual

virtual void mbo::MboDrawWin::CalcTextRect | ( | RECT & | rect,
 |  | const MboString & | strText,
 |  | UINT | uFormat = 0
 | ) | [virtual]

Calculates rectangle to display a text.

Return values:
rect display bounds for text box which are updated to be able to hold the complete text.
Parameters:
strText | text to display.
uFormat | text formatting options (like DT_LEFT, DT_CENTER, DT_RIGHT). This one will be extended by DT_CALCRECT.

virtual bool mbo::MboDrawWin::DrawBitmap | ( | int | nLeft,
 |  | int | nTop,
 |  | UINT | nResId
 | ) | [virtual]

Draws a bitmap

Parameters:
nLeft | x-coordinate of upper-left corner
nTop | y-coordinate of upper-left corner
nResId | ressource id of bitmap
Returns:
whether bitmap could be loaded

virtual bool mbo::MboDrawWin::DrawBitmap | ( | int | nLeft,
 |  | int | nTop,
 |  | const MboString & | strResId
 | ) | [virtual]

Draws a bitmap

Parameters:
nLeft | x-coordinate of upper-left corner
nTop | y-coordinate of upper-left corner
strResId | ressource id name of bitmap
Returns:
whether bitmap could be loaded

virtual bool mbo::MboDrawWin::DrawBitmap | ( | int | nLeft,
 |  | int | nTop,
 |  | HBITMAP | hBitmap
 | ) | [virtual]

Draws a bitmap

Parameters:
nLeft | x-coordinate of upper-left corner
nTop | y-coordinate of upper-left corner
hBitmap | handle to bitmap to draw
Returns:
whether bitmap could be loaded

virtual void mbo::MboDrawWin::DrawCircle | ( | const LONG | nCenterX,
 |  | const LONG | nCenterY,
 |  | const LONG | nRadius,
 |  | COLORREF | colInner,
 |  | COLORREF | colOuter = RGB(0, 0, 0),
 |  | DRAW_MODE | enMode = DRAW_MODE_FILL
 | ) | [virtual]

Draws a filled circle at given center with given radius.

Parameters:
nCenterX | X coordinates for circle center
nCenterY | Y coordinates for circle center
nRadius | radius of circle in pixel
colInner | inner color (area)
colOuter | outer color (border)
enMode | draw mode to be used

virtual void mbo::MboDrawWin::DrawCircle | ( | const POINT & | ptCenter,
 |  | const LONG | nRadius,
 |  | COLORREF | colInner,
 |  | COLORREF | colOuter = RGB(0, 0, 0),
 |  | DRAW_MODE | enMode = DRAW_MODE_FILL
 | ) | [virtual]

Draws a filled circle at given center with given radius.

Parameters:
ptCenter | pixel coordinates for circle center
nRadius | radius of circle in pixel
colInner | inner color (area)
colOuter | outer color (border)
enMode | draw mode to be used

virtual void mbo::MboDrawWin::DrawEllipse | ( | const RECT & | rect,
 |  | COLORREF | colInner,
 |  | COLORREF | colOuter = RGB(0, 0, 0),
 |  | DRAW_MODE | enMode = DRAW_MODE_FILL
 | ) | [virtual]

Draws a filled ellipse within the given rectangular boundaries.

Parameters:
rect | display bounds of ellipse to draw
colInner | inner color (area)
colOuter | outer color (border)
enMode | draw mode to be used
Note:
GDI correction for bottom/right is done automatically.

virtual bool mbo::MboDrawWin::DrawIcon | ( | int | nLeft,
 |  | int | nTop,
 |  | UINT | nResId
 | ) | [virtual]

Loads an icon and draws it

Parameters:
nLeft | x-coordinates of upper-left corner
nTop | y-coordinates of upper-left corner
nResId | ressource id of icon
Returns:
whether icon could be loaded

virtual bool mbo::MboDrawWin::DrawIcon | ( | int | nLeft,
 |  | int | nTop,
 |  | const MboString & | strResId
 | ) | [virtual]

Loads an icon and draws it

Parameters:
nLeft | x-coordinates of upper-left corner
nTop | y-coordinates of upper-left corner
strResId | ressource id name of icon
Returns:
whether icon could be loaded

virtual bool mbo::MboDrawWin::DrawIcon | ( | int | nLeft,
 |  | int | nTop,
 |  | HICON | hIcon
 | ) | [virtual]

Draws an icon

Parameters:
nLeft | x-coordinate of upper-left corner
nTop | y-coordinate of upper-left corner
hIcon | handle to icon to draw
Returns:
whether icon could be loaded

virtual void mbo::MboDrawWin::DrawLine | ( | POINT | pt1,
 |  | POINT | pt2,
 |  | int | nPenWidth,
 |  | COLORREF | colInner,
 |  | DRAW_MODE | enMode = DRAW_MODE_FILL,
 |  | int | fnPenStyle = PS_INSIDEFRAME
 | ) | [virtual]

Draws a line.

Parameters:
pt1 | start coordinates
pt2 | end coordinates
nPenWidth | width of pen in pixels
colInner | inner color (area)
enMode | draw mode to be used
fnPenStyle | style of pen (PS_xxx)

virtual void mbo::MboDrawWin::DrawLine | ( | LONG | nX1,
 |  | LONG | nY1,
 |  | LONG | nX2,
 |  | LONG | nY2,
 |  | int | nPenWidth,
 |  | COLORREF | colInner,
 |  | DRAW_MODE | enMode = DRAW_MODE_FILL,
 |  | int | fnPenStyle = PS_INSIDEFRAME
 | ) | [virtual]

Draws a line.

Parameters:
nX1 | start coordinate X
nY1 | start coordinate Y
nX2 | end coordinate X
nY2 | end coordinate Y
nPenWidth | width of pen in pixels
colInner | inner color (area)
enMode | draw mode to be used
fnPenStyle | style of pen (PS_xxx)

virtual void mbo::MboDrawWin::DrawPolygon | ( | const POINT * | aptPoints,
 |  | int | nNumPoints,
 |  | COLORREF | colInner,
 |  | COLORREF | colOuter = RGB(0, 0, 0),
 |  | DRAW_MODE | enMode = DRAW_MODE_FILL
 | ) | [virtual]

Draws a filled polygon just like DrawRect draws a rectangle.

Parameters:
aptPoints | array of points to connect by a line. If areas are spawned then those will be filled.
nNumPoints | number of points in array
colInner | inner color (area)
colOuter | outer color (border)
enMode | draw mode to be used

virtual void mbo::MboDrawWin::DrawRect | ( | LONG | nLeft,
 |  | LONG | nTop,
 |  | LONG | nRight,
 |  | LONG | nBottom,
 |  | COLORREF | colInner,
 |  | COLORREF | colOuter = RGB(0, 0, 0),
 |  | DRAW_MODE | enMode = DRAW_MODE_FILL
 | ) | [virtual]

Draws a filled rectangle with whole rect included.

Parameters:
nLeft | rect coordinate
nTop | rect coordinate
nRight | rect coordinate
nBottom | rect coordinate
colInner | inner color (area)
colOuter | outer color (border)
enMode | draw mode to be used
Note:
GDI correction for bottom/right is done automatically.

virtual void mbo::MboDrawWin::DrawRect | ( | const RECT & | rect,
 |  | COLORREF | colInner,
 |  | COLORREF | colOuter = RGB(0, 0, 0),
 |  | DRAW_MODE | enMode = DRAW_MODE_FILL
 | ) | [virtual]

Draws a filled rectangle with whole rect included.

Parameters:
rect | display bounds of rectangle to draw
colInner | inner color (area)
colOuter | outer color (border)
enMode | draw mode to be used
Note:
GDI correction for bottom/right is done automatically.

virtual void mbo::MboDrawWin::DrawSetMode | ( | HBRUSH & | hBrush,
 |  | HPEN & | hPen,
 |  | COLORREF | colInner,
 |  | COLORREF | colOuter = RGB(0, 0, 0),
 |  | DRAW_MODE | enMode = DRAW_MODE_FILL,
 |  | int | nPenWidth = 0,
 |  | int | fnPenStyle = PS_SOLID
 | ) | [virtual]

Select the actual draw mode. The method returns brush and pen which must be deleted by the callee. Normally this is done only internally from within any of the draw methods.

Return values:
hBrush | brush to paint with
hPen | pen to paint with
Parameters:
colInner | inner color (area)
colOuter | outer color (border)
enMode | draw mode to be used
nPenWidth | width of pen in pixels
fnPenStyle | style of pen (PS_xxx)

virtual void mbo::MboDrawWin::DrawText | ( | LONG | nLeft,
 |  | LONG | nTop,
 |  | LONG | nRight,
 |  | LONG | nBottom,
 |  | const MboString & | strText,
 |  | UINT | uFormat = 0,
 |  | COLORREF | colInner = RGB(0, 0, 0),
 |  | COLORREF | colOuter = RGB(255, 255, 255),
 |  | DRAW_MODE | enMode = DRAW_MODE_TRANSPARENT
 | ) | [virtual]

Draws text filled with color cInner at position specified by area.

Parameters:
nLeft | rect coordinate
nTop | rect coordinate
nRight | rect coordinate
nBottom | rect coordinate
strText | text to display
uFormat | text formatting options (like DT_LEFT, DT_CENTER, DT_RIGHT)
colInner | inner color (area)
colOuter | outer color (border)
enMode | draw mode to be used

virtual void mbo::MboDrawWin::DrawText | ( | const RECT & | rect,
 |  | const MboString & | strText,
 |  | UINT | uFormat = 0,
 |  | COLORREF | colInner = RGB(0, 0, 0),
 |  | COLORREF | colOuter = RGB(255, 255, 255),
 |  | DRAW_MODE | enMode = DRAW_MODE_TRANSPARENT
 | ) | [virtual]

Draws text filled with color cInner at position specified by rect.

Parameters:
rect | display bounds for text box
strText | text to display
uFormat | text formatting options (like DT_LEFT, DT_CENTER, DT_RIGHT)
colInner | inner color (area)
colOuter | outer color (border)
enMode | draw mode to be used

int mbo::MboDrawWin::GetHeight ( ) const

Returns:
height of client area

virtual HWND mbo::MboWinMsgHandler::GetHWND ( ) const [virtual, inherited]

Returns:
handle used internally (usefule for message passing).

int mbo::MboDrawWin::GetMaxSizeX ( ) const

Returns:
maximum window width

int mbo::MboDrawWin::GetMaxSizeY ( ) const

Returns:
maximum window height

int mbo::MboDrawWin::GetMinSizeX ( ) const

Returns:
minimum window width

int mbo::MboDrawWin::GetMinSizeY ( ) const

Returns:
minimum window height

virtual HINSTANCE mbo::MboWinMsgHandler::GetModuleHandle ( ) const [virtual, inherited]

Returns:
instance of EXE or DLL, used with resources.

int mbo::MboDrawWin::GetPositionX ( ) const

Returns:
X position of window (if running else 0)

int mbo::MboDrawWin::GetPositionY ( ) const

Returns:
Y position of window (if running else 0)

int mbo::MboDrawWin::GetScreenSizeX ( ) const

Returns:
horizontal size of screen in pixels

int mbo::MboDrawWin::GetScreenSizeY ( ) const

Returns:
vertical size of screen in pixels

int mbo::MboDrawWin::GetSizeX ( ) const

Returns:
current window width

int mbo::MboDrawWin::GetSizeY ( ) const

Returns:
current window height

DWORD mbo::MboThread::GetThreadId ( ) const [inherited]

Retrieve Id of thread

This value is NULL if no thread is running

Returns:
internal thread id

const char* mbo::MboThread::GetThreadName ( ) [inherited]

Get thread name.

When the name was set NULL in constructor then this function triggers the name generation. However this has the same affects when called from inside a constructor.

Returns:
the name of the thread
Note:
This is a non const function.

int mbo::MboDrawWin::GetWidth ( ) const

Returns:
width of client area

bool mbo::MboThread::IsRunning ( ) const [inherited]

Check if a thread is running

Returns:
whether the thread is running

bool mbo::MboThread::IsStopping ( ) const [inherited]

Check if a thread is told to stop

Returns:
whether the thread is stopping

bool mbo::MboDrawWin::IsWindow ( ) const

Returns:
whether window is existing.

bool mbo::MboDrawWin::IsWindowVisible ( ) const

Returns:
whether window is visible.

bool mbo::MboDrawWin::IsWndSizeable ( ) const

Returns:
whether window is sizeable.

bool mbo::MboDrawWin::IsWndSizingOrMoving ( ) const

Returns:
whether window is currently in move or size mode.

bool mbo::MboThread::KillThread | ( | DWORD | nMilliseconds = 0,
 |  | DWORD | dwExitCode = -1
 | ) | [inherited]

Stop the thread, wait a given time for the thread to terminate and kill it afterwards if necessary.

Parameters:
nMilliseconds | Time in milliseconds to wait for the thread to terminate normally.
dwExitCode | Exitcode for the thread if killed.
Returns:
Whether or not the thread was terminated. This may become necessary for derived threads. However this function is invariant against inheritance.

virtual void mbo::MboWinMsgHandler::MessageHandler ( MSG & msg ) [protected, virtual, inherited]

Handle a message by first translating it and then dispatching it.

Parameters:
msg Message to handle.

virtual void mbo::MboDrawWin::OnButtonDblClk | ( | UINT | nFlags,
 |  | int | x,
 |  | int | y
 | ) | [virtual]

Callback called when a mouse button is double clicked.

Parameters:
nFlags Any combination of:
  • MK_CONTROL Set if the ctrl key is down.
  • MK_LBUTTON Set if the left mouse button was active.
  • MK_MBUTTON Set if the middle mouse button was active.
  • MK_RBUTTON Set if the right mouse button was active.
  • MK_SHIFT Set if the shift key is down.
x | x position of mouse
y | y position of mouse
Note:
x and y are relative to the upper-left corner of the client area.

virtual void mbo::MboDrawWin::OnButtonDown | ( | UINT | nFlags,
 |  | int | x,
 |  | int | y
 | ) | [virtual]

Callback called when a mouse button is pressed.

Parameters:
nFlags Any combination of:
  • MK_CONTROL Set if the ctrl key is down.
  • MK_LBUTTON Set if the left mouse button was active.
  • MK_MBUTTON Set if the middle mouse button was active.
  • MK_RBUTTON Set if the right mouse button was active.
  • MK_SHIFT Set if the shift key is down.
x | x position of mouse
y | y position of mouse
Note:
x and y are relative to the upper-left corner of the client area.

virtual void mbo::MboDrawWin::OnButtonUp | ( | UINT | nFlags,
 |  | int | x,
 |  | int | y
 | ) | [virtual]

Callback called when a mouse button is release (up after pressed).

Parameters:
nFlags Any combination of:
  • MK_CONTROL Set if the ctrl key is down.
  • MK_LBUTTON Set if the left mouse button was active.
  • MK_MBUTTON Set if the middle mouse button was active.
  • MK_RBUTTON Set if the right mouse button was active.
  • MK_SHIFT Set if the shift key is down.
x | x position of mouse
y | y position of mouse
Note:
x and y are relative to the upper-left corner of the client area.

virtual void mbo::MboThread::OnThreadStart ( ) [virtual, inherited]

Method called emidiatley after thread has started and before Action() is called.

virtual void mbo::MboThread::OnThreadStop ( ) [virtual, inherited]

Method that is called when action is left e.g. thread is stoping.

virtual void mbo::MboDrawWin::OnWindowCreated ( ) [virtual]

Used to initialized the window (first drawing).

This method may of course be overwritten to perform tasks like calling WndSetTitle() or WndSetIcon(). The default implementation simply calls WndClear() when this function gets invoked and then shows and activates it.

Note:
If you override this method you must ensure that you active and show the window because otherwise you wouldn't be able to use it.

You cannot use OnThreadStart() callback to draw because it is called before the window has been created.

Reimplemented from mbo::MboWinMsgHandler.

virtual void mbo::MboDrawWin::OnWndSized ( ) [virtual]

Called when the window has been resized. The default implementation simply calls WndDraw(). A derived class however might want to change internal information to be able to modify what can be shown with new window size.

virtual bool mbo::MboWinMsgHandler::PostMessage | ( | HWND | hwnd,
 |  | UINT | uMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [virtual, inherited]

Pass a message to the handler.

Parameters:
hwnd Handle to the window whose window procedure is to receive the message. Two values have special meanings: Value Meaning
  • HWND_BROADCAST The message is posted to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows. The message is not posted to child windows.
  • NULL The function behaves like a call to PostThreadMessage with the dwThreadId parameter set to the identifier of the current thread.
uMsg | Specifies the message to be posted.
wParam | Specifies additional message-specific information.
lParam | Specifies additional message-specific information.
Returns:
If the function succeeds, the return value is true.

virtual bool mbo::MboWinMsgHandler::PostMessage | ( | UINT | uMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [virtual, inherited]

Pass a message to the handler. Internally this method calls PostMessage with hwnd set to m_hwnd.

Parameters:
uMsg | Specifies the message to be posted.
wParam | Specifies additional message-specific information.
lParam | Specifies additional message-specific information.
Returns:
If the function succeeds, the return value is true.

virtual LRESULT mbo::MboWinMsgHandler::ProcessDefault | ( | HWND | hwnd,
 |  | UINT | uMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [virtual, inherited]

Handles default messages not handled by ProcessMessage.

Note:
You should call ProcessDefault() from ProcessMessage() for any message not handled yourself.
Parameters:
hwnd | Handle to the window procedure that received the message. This normally matches m_hwnd.
uMsg | Specifies the message received.
wParam | Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
lParam | Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
Returns:
The return value is the result of the message processing and depends on the message.

virtual LRESULT mbo::MboDrawWin::ProcessMessage | ( | HWND | hwnd,
 |  | UINT | uMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [virtual]

Overwrite this handler if you want to handle any message.

Note:
You should call ProcessDefault() from ProcessMessage() for any message not handled yourself.
Parameters:
hwnd | Handle to the window procedure that received the message. This normally matches m_hwnd.
uMsg | Specifies the message received.
wParam | Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
lParam | Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
Returns:
The return value is the result of the message processing and depends on the message.

Reimplemented from mbo::MboWinMsgHandler.

void mbo::MboThread::SetThreadName | ( | const char * | szThreadName,
 |  | DWORD | dwThreadID = -1
 | ) | [static, inherited]

Set the thread name for the debugging interface.

Parameters:
szThreadName | The new name of the thread
dwThreadID | The thread id or -1 to select current thread.
This function is typically called at Thread startup.

void mbo::MboThread::SetThreadPriority ( EThreadPriority ePriority ) [inherited]

Set the threads priority class.

Parameters:
ePriority new priority for the thread.
Note:
This works only if the thread was running once already.

virtual void mbo::MboThread::Start ( ) [virtual, inherited]

Start the thread.

to check whether or not the thread was really started implement an OnThreadStart() handler in the derived class.

virtual void mbo::MboWinMsgHandler::Stop ( ) [virtual, inherited]

Generates an WM_DESTROY message for the message handler which triggers a call to the inherited Stop and hence stops the thread. However the method also calls inherited Stop() direct to force message loop termination on next message.

Reimplemented from mbo::MboThread.

virtual void mbo::MboThread::ThreadProc ( ) [protected, virtual, inherited]

Call OnThreadStart()/Action()/OnThreadStop()

Reimplemented in mbo::MboIntervalThread, mbo::MboEventThread, and mbo::MboDelayedEventThread.

bool mbo::MboThread::WaitFor ( DWORD nMilliseconds = INFINITE ) const [inherited]

Wait for thread to terminate

WaitFor() does not call Stop() and can itself be called from more than one thread.

Parameters:
nMilliseconds Time to wait for thread to terminate.
Returns:
Whether or not the thread ended.

virtual bool mbo::MboDrawWin::WndCalcMetrics ( ) [protected, virtual]

Register the window and calculate its metrics.

Reimplemented from mbo::MboWinMsgHandler.

virtual const MboString& mbo::MboWinMsgHandler::WndClassName ( ) const [protected, virtual, inherited]

Returns:
the (window) class name which is used to create the window. This name will be used in RegisterWin() and CreateWin().
If you need to overload this function you must ensure that the returned value is a const string which must not be freed by the caller. Also you need to set bStart parameter of the constructor to false.

virtual void mbo::MboDrawWin::WndClear ( ) [virtual]

White fill the client area. This function is normally only called from the default OnWindoCreated() callback.

virtual bool mbo::MboDrawWin::WndCreate ( ) [virtual]

Creates the GUI Window

This function will be called from the same thread that runs the message loop. The default implementation does neither show nor activate the empty window. However the callback OnWindowCreated() gets executed directly after this function returns and right before the message loop starts and shall be used to show and/or activate the window.

Returns:
whether or not window could be created.
Note:
This method does neither show nor activate the window. That is job is done in the default implementation of OnWindowCreated().

If this function returns false then the calling thread will terminate by a handled runtime_error.

Reimplemented from mbo::MboWinMsgHandler.

virtual void mbo::MboDrawWin::WndDestroy ( ) [virtual]

Destroys the GUI Window

Reimplemented from mbo::MboWinMsgHandler.

virtual void mbo::MboDrawWin::WndDraw ( ) [virtual]

The actual drawing routine which is only called upon window creation once. It calles WndUpdate() to show the new contents.

Derived classes should therfore override this method and do its actual drawing there and call WndUpdate() when finished. The other way to draw the window is to inherit this function as is and perform drawing in specialized methods that are controlled from outside this class. In that case those methods need to ensure WndUpdate() gets called to make the new contents visible.

virtual void mbo::MboDrawWin::WndHide ( ) [virtual]

Hide the window .

virtual void mbo::MboDrawWin::WndLoadExtent | ( | const CIniData & | cIniData,
 |  | const MboString & | strSection,
 |  | bool | bWriteDefault = false
 | ) | [virtual]

Load window position and size from ini file.

Parameters:
cIniData | Ini file to use
strSection | Section to use
bWriteDefault | Whether to write the keys if not present already
Note:
This function uses the following keys: WndPosX, WndPosY, WndSizeX, WndSizeY.

This works only when running.

virtual bool mbo::MboWinMsgHandler::WndRegister ( ) [protected, virtual, inherited]

Register the class used to specify the internally used message handler.

virtual void mbo::MboDrawWin::WndRegisterHandle ( ) [protected, virtual]

Called from WndCreate() or WndCalcMetrics() to actually register the window handle and create the Screen DC. This function does not do anything if either the handle is not set or the screen DC handle was created already.

virtual void mbo::MboDrawWin::WndRestore ( ) [virtual]

Restore the window, does neither show nor activate it.

See also:
WndShow

virtual void mbo::MboDrawWin::WndSaveExtent | ( | CIniData & | cIniData,
 |  | const MboString & | strSection
 | ) | const [virtual]

Save window position and size to ini file.

Parameters:
cIniData | Ini file to use
strSection | Section to use
Note:
This function uses the following keys: WndPosX, WndPosY, WndSizeX, WndSizeY.

This works only when running.

virtual bool mbo::MboDrawWin::WndSetIconBig ( UINT nResId ) [virtual]

Set the big (32x32) application icon.

Parameters:
nResId ressource id of icon
Returns:
whether icon could be loaded and message was send.

virtual bool mbo::MboDrawWin::WndSetIconBoth ( UINT nResId ) [virtual]

Set the both application icons.

This method calls WndSetIconBig() and WndSetIconSmall().

Parameters:
nResId ressource id of icon
Returns:
whether icon could be loaded and message was send.
Note:
The icon should have both a small (16x16) and a big (32x32) image.

virtual bool mbo::MboDrawWin::WndSetIconSmall ( UINT nResId ) [virtual]

Set the small (16x16) application icon.

Parameters:
nResId ressource id of icon
Returns:
whether icon could be loaded and message was send.

virtual void mbo::MboDrawWin::WndSetPosition | ( | int | nPosX,
 |  | int | nPosY
 | ) | [virtual]

Move the window to the specifying coordinates.

Note:
This is ignored if not running (in _DEBUG mode it uses an assertion).
Parameters:
nPosX | new X coordinate of window (top/right edge)
nPosY | new Y coordinate of window (top/right edge)

virtual void mbo::MboDrawWin::WndSetSize | ( | int | nSizeX,
 |  | int | nSizeY
 | ) | [virtual]

Resize the window by specifying its outer size.

You can only change the size of the window within minimum and maximum values specified. To Check these you can use the following methods:

  • GetMinSizeX()
  • GetMinSizeY()
  • GetMaxSizeX()
  • GetMaxSizeY() Lower values are replaced by their minimum values and higher values are replaced by their maximum values.

Parameters:
nSizeX | new width of window
nSizeY | new height of window

virtual void mbo::MboDrawWin::WndSetTitle ( const MboString & strTitle ) [virtual]

Set title of window.

Parameters:
strTitle new window title

virtual void mbo::MboDrawWin::WndShow ( bool bActive = true ) [virtual]

Show the window and optionally activate it.

Parameters:
bActive whether to activate the window.
Note:
This does not restore the window. That is a minimized window remains minimized after this call.
See also:
WndRestore

virtual const MboString& mbo::MboWinMsgHandler::WndTitleText ( ) const [protected, virtual, inherited]

Returns:
title of window (defaults to WndClassName())

virtual void mbo::MboDrawWin::WndUpdate ( ) [virtual]

Copy background drawing buffer to screen.

Member Data Documentation

WndClassList mbo::MboWinMsgHandler::g_vWndClassList [static, protected, inherited]

the window class name as returned by WndClassName()

bool mbo::MboDrawWin::m_bInSizeMove [private]

Whether window is currently in sizing or moving mode

DWORD mbo::MboThread::m_dwThreadId [protected, inherited]

Thread Id or 0 (guarded by m_mxStartStop)

HANDLE mbo::MboThread::m_hIsStopping [protected, inherited]

Stop flag (Event)

HDC mbo::MboDrawWin::m_hMemDC [protected]

Handle to Device Context of background buffer

HDC mbo::MboDrawWin::m_hScrDC [protected]

Handle to Device Context of window

HANDLE mbo::MboThread::m_hThread [protected, inherited]

HANDLE to thread or NULL (guarded by m_mxStartStop)

HWND mbo::MboWinMsgHandler::m_hwnd [protected, inherited]

CCriticalSectionImpl mbo::MboThread::m_mxStartStop [protected, inherited]

Mutex used for start/stop access

int mbo::MboDrawWin::m_nHeight [private]

Inner height (client area)

int mbo::MboDrawWin::m_nMaxSizeX [private]

maximum outer width

int mbo::MboDrawWin::m_nMaxSizeY [private]

maximum outer height

int mbo::MboDrawWin::m_nMinSizeX [private]

minimum outer width

int mbo::MboDrawWin::m_nMinSizeY [private]

minimum outer height

int mbo::MboDrawWin::m_nSizeX [private]

current outer width

int mbo::MboDrawWin::m_nSizeY [private]

current outer height

int mbo::MboDrawWin::m_nWidth [private]

Inner width (client area)

const MboString mbo::MboWinMsgHandler::m_strWndClassName [protected, inherited]

window handle

The documentation for this class was generated from the following file:
  • MboDrawWin.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::MboEventThread Class Reference

mbo::MboEventThread Class Reference

An event driven thread implementation. More...

#include <MboThread.h>

Inheritance diagram for mbo::MboEventThread:

mbo::MboThread mbo::MboDelayedEventThread List of all members.

Public Types

enum EThreadPriority {
PRIORITY_IDLE = THREAD_PRIORITY_IDLE,
PRIORITY_LOWEST = THREAD_PRIORITY_LOWEST,
PRIORITY_LOW = THREAD_PRIORITY_ABOVE_NORMAL,
PRIORITY_NORMAL = THREAD_PRIORITY_NORMAL,
PRIORITY_HIGH = THREAD_PRIORITY_ABOVE_NORMAL,
PRIORITY_HIGHEST = THREAD_PRIORITY_HIGHEST,
PRIORITY_CRITICAL = THREAD_PRIORITY_TIME_CRITICAL
}

Public Member Functions

virtual void | Action ()=0
IncDecVal | GetCounter () const
DWORD | GetThreadId () const
const char * | GetThreadName ()
bool | IsRunning () const
virtual bool | IsSignaled () const
bool | IsStopping () const
bool | KillThread (DWORD nMilliseconds=0, DWORD dwExitCode=-1)
MboEventThread (bool bAutoStart=true, const char *szThreadName=0)
virtual void | OnThreadStart ()
virtual void | OnThreadStop ()
void | SetEvent () const
void | SetThreadPriority (EThreadPriority ePriority)
virtual void | Start ()
virtual void | Stop ()
bool | WaitFor (DWORD nMilliseconds=INFINITE) const
virtual | ~MboEventThread ()

Static Public Member Functions

void | SetThreadName (const char *szThreadName, DWORD dwThreadID=-1)

Protected Attributes

DWORD | m_dwThreadId
HANDLE | m_hIsStopping
HANDLE | m_hThread
CCriticalSectionImpl m_mxStartStop

Private Member Functions

virtual void | ThreadProc ()

Private Attributes

HANDLE | m_hEvent
IncDecVal m_nCounter

Friends

class | MboDelayedEventThread

Detailed Description

An event driven thread implementation.

The derived class MboEventThread implements an endless loop that waits for an event to occur (SetEvent) between each calls of Action(). The callbacks OnThreadStart()/OnThreadStop() are only called once.

Note:
This class is distributed under the following license Mbo License.

Member Enumeration Documentation

enum mbo::MboThread::EThreadPriority [inherited]

Thread priority classes. These directly map to the native priority classes.

Enumeration values:
PRIORITY_IDLE
PRIORITY_LOWEST
PRIORITY_LOW
PRIORITY_NORMAL
PRIORITY_HIGH
PRIORITY_HIGHEST
PRIORITY_CRITICAL

Constructor & Destructor Documentation

mbo::MboEventThread::MboEventThread | ( | bool | bAutoStart = true,
 |  | const char * | szThreadName = 0
 | ) | [explicit]

constructor

Parameters:
bAutoStart | whether to automatically start the event thread.
szThreadName | The name of the thread. The new class instance will copy the value and free its copy automatically upon destruction. You may want to use NULL to use the class name of as the thread name. If you do so the name is computed in thread startup - this only works if this is not done in constructor. If done so the name you will see is the name of that parent class whose constructor started the thread.
Note:
You can see thread names only in MSVC.NET and above or MSVC.6-SP2.

virtual mbo::MboEventThread::~MboEventThread ( ) [virtual]

destructor

Member Function Documentation

virtual void mbo::MboThread::Action ( ) [pure virtual, inherited]

Action method to be implemented by derived classes.

This Method is called once after Start() is successfull and may contain an infinite loop. But the method has to check whether or not it must exit (IsStopping())

Implemented in mbo::MboWinMsgHandler.

IncDecVal mbo::MboEventThread::GetCounter ( ) const

Counts the execution times of Action()

Note:
Since the delay may be skipped ht ecounter is incremented right before calling Action() and not after receiving the event by a call to SetEvent().
Returns:
number of times Action() was invoked

DWORD mbo::MboThread::GetThreadId ( ) const [inherited]

Retrieve Id of thread

This value is NULL if no thread is running

Returns:
internal thread id

const char* mbo::MboThread::GetThreadName ( ) [inherited]

Get thread name.

When the name was set NULL in constructor then this function triggers the name generation. However this has the same affects when called from inside a constructor.

Returns:
the name of the thread
Note:
This is a non const function.

bool mbo::MboThread::IsRunning ( ) const [inherited]

Check if a thread is running

Returns:
whether the thread is running

virtual bool mbo::MboEventThread::IsSignaled ( ) const [virtual]

Check whether the thread is signaled. That is the thread event has been set and either the delay hasn't elapsed or the Action() wasn't finished already.

Returns:
Whether thread is signaled.

bool mbo::MboThread::IsStopping ( ) const [inherited]

Check if a thread is told to stop

Returns:
whether the thread is stopping

bool mbo::MboThread::KillThread | ( | DWORD | nMilliseconds = 0,
 |  | DWORD | dwExitCode = -1
 | ) | [inherited]

Stop the thread, wait a given time for the thread to terminate and kill it afterwards if necessary.

Parameters:
nMilliseconds | Time in milliseconds to wait for the thread to terminate normally.
dwExitCode | Exitcode for the thread if killed.
Returns:
Whether or not the thread was terminated. This may become necessary for derived threads. However this function is invariant against inheritance.

virtual void mbo::MboThread::OnThreadStart ( ) [virtual, inherited]

Method called emidiatley after thread has started and before Action() is called.

virtual void mbo::MboThread::OnThreadStop ( ) [virtual, inherited]

Method that is called when action is left e.g. thread is stoping.

void mbo::MboEventThread::SetEvent ( ) const

Set event which results in calling execute if the thread is running.

void mbo::MboThread::SetThreadName | ( | const char * | szThreadName,
 |  | DWORD | dwThreadID = -1
 | ) | [static, inherited]

Set the thread name for the debugging interface.

Parameters:
szThreadName | The new name of the thread
dwThreadID | The thread id or -1 to select current thread.
This function is typically called at Thread startup.

void mbo::MboThread::SetThreadPriority ( EThreadPriority ePriority ) [inherited]

Set the threads priority class.

Parameters:
ePriority new priority for the thread.
Note:
This works only if the thread was running once already.

virtual void mbo::MboThread::Start ( ) [virtual, inherited]

Start the thread.

to check whether or not the thread was really started implement an OnThreadStart() handler in the derived class.

virtual void mbo::MboEventThread::Stop ( ) [virtual]

Stop the thread.

This stops the thread by signaling it and skipping the delay. Neither Action() is called nor will the Action() counter be incremented.

Reimplemented from mbo::MboThread.

Reimplemented in mbo::MboDelayedEventThread.

virtual void mbo::MboEventThread::ThreadProc ( ) [private, virtual]

Event handling and Action() invocation from the thread.

Reimplemented from mbo::MboThread.

Reimplemented in mbo::MboDelayedEventThread.

bool mbo::MboThread::WaitFor ( DWORD nMilliseconds = INFINITE ) const [inherited]

Wait for thread to terminate

WaitFor() does not call Stop() and can itself be called from more than one thread.

Parameters:
nMilliseconds Time to wait for thread to terminate.
Returns:
Whether or not the thread ended.

Friends And Related Function Documentation

friend class MboDelayedEventThread [friend]

Member Data Documentation

DWORD mbo::MboThread::m_dwThreadId [protected, inherited]

Thread Id or 0 (guarded by m_mxStartStop)

HANDLE mbo::MboEventThread::m_hEvent [private]

Event used internally

HANDLE mbo::MboThread::m_hIsStopping [protected, inherited]

Stop flag (Event)

HANDLE mbo::MboThread::m_hThread [protected, inherited]

HANDLE to thread or NULL (guarded by m_mxStartStop)

CCriticalSectionImpl mbo::MboThread::m_mxStartStop [protected, inherited]

Mutex used for start/stop access

IncDecVal mbo::MboEventThread::m_nCounter [private]

Action() invocation counter

The documentation for this class was generated from the following file:
  • MboThread.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::MboIntervalThread Class Reference

mbo::MboIntervalThread Class Reference

An interval thread implementation. More...

#include <MboThread.h>

Inheritance diagram for mbo::MboIntervalThread:

mbo::MboThread List of all members.

Public Types

enum EThreadPriority {
PRIORITY_IDLE = THREAD_PRIORITY_IDLE,
PRIORITY_LOWEST = THREAD_PRIORITY_LOWEST,
PRIORITY_LOW = THREAD_PRIORITY_ABOVE_NORMAL,
PRIORITY_NORMAL = THREAD_PRIORITY_NORMAL,
PRIORITY_HIGH = THREAD_PRIORITY_ABOVE_NORMAL,
PRIORITY_HIGHEST = THREAD_PRIORITY_HIGHEST,
PRIORITY_CRITICAL = THREAD_PRIORITY_TIME_CRITICAL
}

Public Member Functions

virtual void | Action ()=0
IncDecVal | GetCounter () const
DWORD | GetThreadId () const
const char * | GetThreadName ()
bool | IsRunning () const
bool | IsStopping () const
bool | KillThread (DWORD nMilliseconds=0, DWORD dwExitCode=-1)
MboIntervalThread (size_t nMilliSeconds=1000, const char *szThreadName=0)
virtual void | OnThreadStart ()
virtual void | OnThreadStop ()
void | SetThreadPriority (EThreadPriority ePriority)
virtual void | Start ()
virtual void | Stop ()
bool | WaitFor (DWORD nMilliseconds=INFINITE) const
virtual | ~MboIntervalThread ()

Static Public Member Functions

void | SetThreadName (const char *szThreadName, DWORD dwThreadID=-1)

Protected Member Functions

virtual size_t | GetInterval () const
virtual void | SetInterval (size_t nMilliSeconds=1000)

Protected Attributes

DWORD | m_dwThreadId
HANDLE | m_hIsStopping
HANDLE | m_hThread
CCriticalSectionImpl m_mxStartStop

Private Member Functions

virtual void | ThreadProc ()

Private Attributes

IncDecVal m_nCounter
size_t | m_nInterval

Detailed Description

An interval thread implementation.

The derived class MboIntervalThread implements an endless loop that sleeps for a given amount of time between each calls of Action(). The callbacks OnThreadStart()/OnThreadStop() are only called once.

Note:
This class is distributed under the following license Mbo License.

Member Enumeration Documentation

enum mbo::MboThread::EThreadPriority [inherited]

Thread priority classes. These directly map to the native priority classes.

Enumeration values:
PRIORITY_IDLE
PRIORITY_LOWEST
PRIORITY_LOW
PRIORITY_NORMAL
PRIORITY_HIGH
PRIORITY_HIGHEST
PRIORITY_CRITICAL

Constructor & Destructor Documentation

mbo::MboIntervalThread::MboIntervalThread | ( | size_t | nMilliSeconds = 1000,
 |  | const char * | szThreadName = 0
 | ) | [explicit]

constructor

Parameters:
nMilliSeconds | interval between two thread cycles
szThreadName | The name of the thread. The new class instance will copy the value and free its copy automatically upon destruction. You may want to use NULL to use the class name of as the thread name. If you do so the name is computed in thread startup - this only works if this is not done in constructor. If done so the name you will see is the name of that parent class whose constructor started the thread.
Note:
You can see thread names only in MSVC.NET and above or MSVC.6-SP2.

virtual mbo::MboIntervalThread::~MboIntervalThread ( ) [virtual]

destructor

Member Function Documentation

virtual void mbo::MboThread::Action ( ) [pure virtual, inherited]

Action method to be implemented by derived classes.

This Method is called once after Start() is successfull and may contain an infinite loop. But the method has to check whether or not it must exit (IsStopping())

Implemented in mbo::MboWinMsgHandler.

IncDecVal mbo::MboIntervalThread::GetCounter ( ) const

Counts the execution times of Action()

Returns:
number of times Action() was invoked

virtual size_t mbo::MboIntervalThread::GetInterval ( ) const [protected, virtual]

Get sleep time between two calls of Action()

Returns:
time in milli seconds

DWORD mbo::MboThread::GetThreadId ( ) const [inherited]

Retrieve Id of thread

This value is NULL if no thread is running

Returns:
internal thread id

const char* mbo::MboThread::GetThreadName ( ) [inherited]

Get thread name.

When the name was set NULL in constructor then this function triggers the name generation. However this has the same affects when called from inside a constructor.

Returns:
the name of the thread
Note:
This is a non const function.

bool mbo::MboThread::IsRunning ( ) const [inherited]

Check if a thread is running

Returns:
whether the thread is running

bool mbo::MboThread::IsStopping ( ) const [inherited]

Check if a thread is told to stop

Returns:
whether the thread is stopping

bool mbo::MboThread::KillThread | ( | DWORD | nMilliseconds = 0,
 |  | DWORD | dwExitCode = -1
 | ) | [inherited]

Stop the thread, wait a given time for the thread to terminate and kill it afterwards if necessary.

Parameters:
nMilliseconds | Time in milliseconds to wait for the thread to terminate normally.
dwExitCode | Exitcode for the thread if killed.
Returns:
Whether or not the thread was terminated. This may become necessary for derived threads. However this function is invariant against inheritance.

virtual void mbo::MboThread::OnThreadStart ( ) [virtual, inherited]

Method called emidiatley after thread has started and before Action() is called.

virtual void mbo::MboThread::OnThreadStop ( ) [virtual, inherited]

Method that is called when action is left e.g. thread is stoping.

virtual void mbo::MboIntervalThread::SetInterval ( size_t nMilliSeconds = 1000 ) [protected, virtual]

Set sleep time between two calls of Action()

Parameters:
nMilliSeconds time in milli seconds

void mbo::MboThread::SetThreadName | ( | const char * | szThreadName,
 |  | DWORD | dwThreadID = -1
 | ) | [static, inherited]

Set the thread name for the debugging interface.

Parameters:
szThreadName | The new name of the thread
dwThreadID | The thread id or -1 to select current thread.
This function is typically called at Thread startup.

void mbo::MboThread::SetThreadPriority ( EThreadPriority ePriority ) [inherited]

Set the threads priority class.

Parameters:
ePriority new priority for the thread.
Note:
This works only if the thread was running once already.

virtual void mbo::MboThread::Start ( ) [virtual, inherited]

Start the thread.

to check whether or not the thread was really started implement an OnThreadStart() handler in the derived class.

virtual void mbo::MboThread::Stop ( ) [virtual, inherited]

Stop the thread.

This only sets the variable m_bIsStoping

Reimplemented in mbo::MboEventThread, mbo::MboDelayedEventThread, and mbo::MboWinMsgHandler.

virtual void mbo::MboIntervalThread::ThreadProc ( ) [private, virtual]

Interval handling and Action() invocation from the thread.

Reimplemented from mbo::MboThread.

bool mbo::MboThread::WaitFor ( DWORD nMilliseconds = INFINITE ) const [inherited]

Wait for thread to terminate

WaitFor() does not call Stop() and can itself be called from more than one thread.

Parameters:
nMilliseconds Time to wait for thread to terminate.
Returns:
Whether or not the thread ended.

Member Data Documentation

DWORD mbo::MboThread::m_dwThreadId [protected, inherited]

Thread Id or 0 (guarded by m_mxStartStop)

HANDLE mbo::MboThread::m_hIsStopping [protected, inherited]

Stop flag (Event)

HANDLE mbo::MboThread::m_hThread [protected, inherited]

HANDLE to thread or NULL (guarded by m_mxStartStop)

CCriticalSectionImpl mbo::MboThread::m_mxStartStop [protected, inherited]

Mutex used for start/stop access

IncDecVal mbo::MboIntervalThread::m_nCounter [private]

Action() invocation counter

size_t mbo::MboIntervalThread::m_nInterval [private]

interval time in milliseconds (guarded by m_mxInterval)

The documentation for this class was generated from the following file:
  • MboThread.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::MboThread Class Reference

mbo::MboThread Class Reference

A basic thread implementation. More...

#include <MboThread.h>

Inheritance diagram for mbo::MboThread:

mbo::MboEventThread mbo::MboIntervalThread mbo::MboWinMsgHandler mbo::MboDelayedEventThread mbo::MboDrawWin List of all members.

Public Types

enum EThreadPriority {
PRIORITY_IDLE = THREAD_PRIORITY_IDLE,
PRIORITY_LOWEST = THREAD_PRIORITY_LOWEST,
PRIORITY_LOW = THREAD_PRIORITY_ABOVE_NORMAL,
PRIORITY_NORMAL = THREAD_PRIORITY_NORMAL,
PRIORITY_HIGH = THREAD_PRIORITY_ABOVE_NORMAL,
PRIORITY_HIGHEST = THREAD_PRIORITY_HIGHEST,
PRIORITY_CRITICAL = THREAD_PRIORITY_TIME_CRITICAL
}

Public Member Functions

virtual void | Action ()=0
DWORD | GetThreadId () const
const char * | GetThreadName ()
bool | IsRunning () const
bool | IsStopping () const
bool | KillThread (DWORD nMilliseconds=0, DWORD dwExitCode=-1)
MboThread (const char *szThreadName)
MboThread ()
virtual void | OnThreadStart ()
virtual void | OnThreadStop ()
void | SetThreadPriority (EThreadPriority ePriority)
virtual void | Start ()
virtual void | Stop ()
bool | WaitFor (DWORD nMilliseconds=INFINITE) const
virtual | ~MboThread ()

Static Public Member Functions

void | SetThreadName (const char *szThreadName, DWORD dwThreadID=-1)

Protected Member Functions

virtual void | ThreadProc ()

Protected Attributes

DWORD | m_dwThreadId
HANDLE | m_hIsStopping
HANDLE | m_hThread
CCriticalSectionImpl m_mxStartStop

Private Member Functions

virtual void | ForceThreadName ()
virtual void | ThreadProcCaller ()

Private Attributes

char * | m_szThreadName

Friends

DWORD WINAPI | MboThreadProc (LPVOID lpParameter)

Detailed Description

A basic thread implementation.

You simply have to write down your action as an implementation of abstract method Action() your class derived from MboThread. This Action method must exit when property IsStopping() is set true. When the destructor is called the thread will be notified to terminate by property mentioned above. The destructor does not exit before the thread has terminated.

Additionally you can override OnThreadStart() and OnThreadStop() callbacks that allow to execute some code from within the started/stopping thread. When OnThreadStop() is called within destructor the overrided method will be ignored and instead the NO OPERATION callback gets executed. This results from C++ language design but can be solved by overriding the destructor with a custom one that calls Stop() And WaitFor() itself.

The threads can be assigned a name. This can be used for debugging purpose starting from MSVC.NET (unofficially since MSVC.6-SP2, but there only the beginning of the name is visible). If you not explicitly specify a name then the class name will be taken as thread name.

Note:
You should use the default constructor together with descriptive class names of your derived classes. The only need to explicitly set a name by parameter is if you create a derived class that handles calls to different handlers from within Action and you want to know the handler name.

When extending the class it is important to guard all property access code by entering the mutex m_mxStartStop.

This class is distributed under the following license Mbo License.

Member Enumeration Documentation

enum mbo::MboThread::EThreadPriority

Thread priority classes. These directly map to the native priority classes.

Enumeration values:
PRIORITY_IDLE
PRIORITY_LOWEST
PRIORITY_LOW
PRIORITY_NORMAL
PRIORITY_HIGH
PRIORITY_HIGHEST
PRIORITY_CRITICAL

Constructor & Destructor Documentation

mbo::MboThread::MboThread ( )

default constructor

mbo::MboThread::MboThread ( const char * szThreadName ) [explicit]

constructor

Parameters:
szThreadName The name of the thread. The new class instance will copy the value and free its copy automatically upon destruction. You may want to use NULL to use the class name of as the thread name. If you do so the name is computed in thread startup - this only works if this is not done in constructor. If done so the name you will see is the name of that parent class whose constructor started the thread.
Note:
You can see thread names only in MSVC.NET and above or MSVC.6-SP2.

virtual mbo::MboThread::~MboThread ( ) [virtual]

Invokes Stop() and WaitFor().

Therefor the destructor ensures the thread is terminated if running.

Member Function Documentation

virtual void mbo::MboThread::Action ( ) [pure virtual]

Action method to be implemented by derived classes.

This Method is called once after Start() is successfull and may contain an infinite loop. But the method has to check whether or not it must exit (IsStopping())

Implemented in mbo::MboWinMsgHandler.

virtual void mbo::MboThread::ForceThreadName ( ) [private, virtual]

Force the instance to have a name for the threads. This name will be used by calls to SetThreadName when a thread starts.

Note:
The callee is responsible to guard calls to this function by use of mutex m_mxStartStop.
See also:
GetName()

SetThreadName()

DWORD mbo::MboThread::GetThreadId ( ) const

Retrieve Id of thread

This value is NULL if no thread is running

Returns:
internal thread id

const char* mbo::MboThread::GetThreadName ( )

Get thread name.

When the name was set NULL in constructor then this function triggers the name generation. However this has the same affects when called from inside a constructor.

Returns:
the name of the thread
Note:
This is a non const function.

bool mbo::MboThread::IsRunning ( ) const

Check if a thread is running

Returns:
whether the thread is running

bool mbo::MboThread::IsStopping ( ) const

Check if a thread is told to stop

Returns:
whether the thread is stopping

bool mbo::MboThread::KillThread | ( | DWORD | nMilliseconds = 0,
 |  | DWORD | dwExitCode = -1
 | ) |

Stop the thread, wait a given time for the thread to terminate and kill it afterwards if necessary.

Parameters:
nMilliseconds | Time in milliseconds to wait for the thread to terminate normally.
dwExitCode | Exitcode for the thread if killed.
Returns:
Whether or not the thread was terminated. This may become necessary for derived threads. However this function is invariant against inheritance.

virtual void mbo::MboThread::OnThreadStart ( ) [virtual]

Method called emidiatley after thread has started and before Action() is called.

virtual void mbo::MboThread::OnThreadStop ( ) [virtual]

Method that is called when action is left e.g. thread is stoping.

void mbo::MboThread::SetThreadName | ( | const char * | szThreadName,
 |  | DWORD | dwThreadID = -1
 | ) | [static]

Set the thread name for the debugging interface.

Parameters:
szThreadName | The new name of the thread
dwThreadID | The thread id or -1 to select current thread.
This function is typically called at Thread startup.

void mbo::MboThread::SetThreadPriority ( EThreadPriority ePriority )

Set the threads priority class.

Parameters:
ePriority new priority for the thread.
Note:
This works only if the thread was running once already.

virtual void mbo::MboThread::Start ( ) [virtual]

Start the thread.

to check whether or not the thread was really started implement an OnThreadStart() handler in the derived class.

virtual void mbo::MboThread::Stop ( ) [virtual]

Stop the thread.

This only sets the variable m_bIsStoping

Reimplemented in mbo::MboEventThread, mbo::MboDelayedEventThread, and mbo::MboWinMsgHandler.

virtual void mbo::MboThread::ThreadProc ( ) [protected, virtual]

Call OnThreadStart()/Action()/OnThreadStop()

Reimplemented in mbo::MboIntervalThread, mbo::MboEventThread, and mbo::MboDelayedEventThread.

virtual void mbo::MboThread::ThreadProcCaller ( ) [private, virtual]

Simply calls ThreadProc()

bool mbo::MboThread::WaitFor ( DWORD nMilliseconds = INFINITE ) const

Wait for thread to terminate

WaitFor() does not call Stop() and can itself be called from more than one thread.

Parameters:
nMilliseconds Time to wait for thread to terminate.
Returns:
Whether or not the thread ended.

Friends And Related Function Documentation

DWORD WINAPI MboThreadProc ( LPVOID lpParameter ) [friend]

Grant global function MboThreadProc access to all members

Member Data Documentation

DWORD mbo::MboThread::m_dwThreadId [protected]

Thread Id or 0 (guarded by m_mxStartStop)

HANDLE mbo::MboThread::m_hIsStopping [protected]

Stop flag (Event)

HANDLE mbo::MboThread::m_hThread [protected]

HANDLE to thread or NULL (guarded by m_mxStartStop)

CCriticalSectionImpl mbo::MboThread::m_mxStartStop [protected]

Mutex used for start/stop access

char* mbo::MboThread::m_szThreadName [private]

name of the thread

The documentation for this class was generated from the following file:
  • MboThread.h
Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::MboWinMsgHandler Class Reference

mbo::MboWinMsgHandler Class Reference

Windows message handler thread. More...

#include <MboThread.h>

Inheritance diagram for mbo::MboWinMsgHandler:

mbo::MboThread mbo::MboDrawWin List of all members.

Public Types

enum EThreadPriority {
PRIORITY_IDLE = THREAD_PRIORITY_IDLE,
PRIORITY_LOWEST = THREAD_PRIORITY_LOWEST,
PRIORITY_LOW = THREAD_PRIORITY_ABOVE_NORMAL,
PRIORITY_NORMAL = THREAD_PRIORITY_NORMAL,
PRIORITY_HIGH = THREAD_PRIORITY_ABOVE_NORMAL,
PRIORITY_HIGHEST = THREAD_PRIORITY_HIGHEST,
PRIORITY_CRITICAL = THREAD_PRIORITY_TIME_CRITICAL
}

Public Member Functions

virtual HWND | GetHWND () const
virtual HINSTANCE | GetModuleHandle () const
DWORD | GetThreadId () const
const char * | GetThreadName ()
bool | IsRunning () const
bool | IsStopping () const
bool | KillThread (DWORD nMilliseconds=0, DWORD dwExitCode=-1)
MboWinMsgHandler (const MboString &strWndClassName="MboWinMsgHandler", bool bStart=true)
virtual void | OnThreadStart ()
virtual void | OnThreadStop ()
virtual bool | PostMessage (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
virtual bool | PostMessage (UINT uMsg, WPARAM wParam, LPARAM lParam)
virtual LRESULT | ProcessDefault (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
virtual LRESULT | ProcessMessage (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
void | SetThreadPriority (EThreadPriority ePriority)
virtual void | Start ()
virtual void | Stop ()
bool | WaitFor (DWORD nMilliseconds=INFINITE) const
virtual | ~MboWinMsgHandler ()

Static Public Member Functions

void | SetThreadName (const char *szThreadName, DWORD dwThreadID=-1)

Protected Member Functions

virtual void | Action ()
void | AddHWND ()
virtual void | MessageHandler (MSG &msg)
virtual void | OnWindowCreated ()
virtual void | ThreadProc ()
virtual bool | WndCalcMetrics ()
virtual const MboString & | WndClassName () const
virtual bool | WndCreate ()
virtual void | WndDestroy ()
virtual bool | WndRegister ()
virtual const MboString & | WndTitleText () const

Protected Attributes

DWORD | m_dwThreadId
HANDLE | m_hIsStopping
HANDLE | m_hThread
HWND | m_hwnd
CCriticalSectionImpl m_mxStartStop
const MboString | m_strWndClassName

Static Protected Attributes

WndClassList g_vWndClassList

Private Types

typedef std::map< HWND, MboWinMsgHandler * > | MAP_HWND
typedef std::list< MboString > | WndClassList

Static Private Attributes

MAP_HWND g_mhwndList

Friends

LRESULT CALLBACK | MboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

Detailed Description

Windows message handler thread.

This class implementns a windows message handling facility to be used when working in shell or other applications where no message handler and/or message loop is accessible.

When you need to work with visible windows you must register your own class by overriding WndRegister() and most likely WndCreate().

Member Typedef Documentation

typedef std::map<HWND, MboWinMsgHandler*> mbo::MboWinMsgHandler::MAP_HWND [private]

typedef std::list<MboString> mbo::MboWinMsgHandler::WndClassList [private]

Member Enumeration Documentation

enum mbo::MboThread::EThreadPriority [inherited]

Thread priority classes. These directly map to the native priority classes.

Enumeration values:
PRIORITY_IDLE
PRIORITY_LOWEST
PRIORITY_LOW
PRIORITY_NORMAL
PRIORITY_HIGH
PRIORITY_HIGHEST
PRIORITY_CRITICAL

Constructor & Destructor Documentation

mbo::MboWinMsgHandler::MboWinMsgHandler | ( | const MboString & | strWndClassName = "MboWinMsgHandler",
 |  | bool | bStart = true
 | ) | [explicit]

The constructor will automatically start the message thread. However it has to wait a small amount of time before it can return.

If you need to need to define your own WndRegister() or WndCreate() methods in a derived class you must call the constructor with param bStart being false and directly call Start().

Parameters:
strWndClassName | name of message handler
bStart | create the class and window and start the message handler thread.

virtual mbo::MboWinMsgHandler::~MboWinMsgHandler ( ) [virtual]

Destroy/Release all resources registered and/or created.

Member Function Documentation

virtual void mbo::MboWinMsgHandler::Action ( ) [protected, virtual]

Message handler

Do this:

  • Create an unvisible message window
  • Handle its WinApi messages until stopped For every single message method MessageHandler is invoked.
  • Close and destroy message window

Implements mbo::MboThread.

void mbo::MboWinMsgHandler::AddHWND ( ) [protected]

Add the instance with its identifying HWND to the list of registered windows.

Actually this does:

     g_mhwndList[m_hwnd] = this;
Note:
non virtual

virtual HWND mbo::MboWinMsgHandler::GetHWND ( ) const [virtual]

Returns:
handle used internally (usefule for message passing).

virtual HINSTANCE mbo::MboWinMsgHandler::GetModuleHandle ( ) const [virtual]

Returns:
instance of EXE or DLL, used with resources.

DWORD mbo::MboThread::GetThreadId ( ) const [inherited]

Retrieve Id of thread

This value is NULL if no thread is running

Returns:
internal thread id

const char* mbo::MboThread::GetThreadName ( ) [inherited]

Get thread name.

When the name was set NULL in constructor then this function triggers the name generation. However this has the same affects when called from inside a constructor.

Returns:
the name of the thread
Note:
This is a non const function.

bool mbo::MboThread::IsRunning ( ) const [inherited]

Check if a thread is running

Returns:
whether the thread is running

bool mbo::MboThread::IsStopping ( ) const [inherited]

Check if a thread is told to stop

Returns:
whether the thread is stopping

bool mbo::MboThread::KillThread | ( | DWORD | nMilliseconds = 0,
 |  | DWORD | dwExitCode = -1
 | ) | [inherited]

Stop the thread, wait a given time for the thread to terminate and kill it afterwards if necessary.

Parameters:
nMilliseconds | Time in milliseconds to wait for the thread to terminate normally.
dwExitCode | Exitcode for the thread if killed.
Returns:
Whether or not the thread was terminated. This may become necessary for derived threads. However this function is invariant against inheritance.

virtual void mbo::MboWinMsgHandler::MessageHandler ( MSG & msg ) [protected, virtual]

Handle a message by first translating it and then dispatching it.

Parameters:
msg Message to handle.

virtual void mbo::MboThread::OnThreadStart ( ) [virtual, inherited]

Method called emidiatley after thread has started and before Action() is called.

virtual void mbo::MboThread::OnThreadStop ( ) [virtual, inherited]

Method that is called when action is left e.g. thread is stoping.

virtual void mbo::MboWinMsgHandler::OnWindowCreated ( ) [protected, virtual]

Called after the window has been created by WndCreate(). This method may be overwritten in derived GUI classes to perform initial drawing.

Note:
You cannot use OnThreadStart() method to draw because it is called before the window has been created.

Reimplemented in mbo::MboDrawWin.

virtual bool mbo::MboWinMsgHandler::PostMessage | ( | HWND | hwnd,
 |  | UINT | uMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [virtual]

Pass a message to the handler.

Parameters:
hwnd Handle to the window whose window procedure is to receive the message. Two values have special meanings: Value Meaning
  • HWND_BROADCAST The message is posted to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows. The message is not posted to child windows.
  • NULL The function behaves like a call to PostThreadMessage with the dwThreadId parameter set to the identifier of the current thread.
uMsg | Specifies the message to be posted.
wParam | Specifies additional message-specific information.
lParam | Specifies additional message-specific information.
Returns:
If the function succeeds, the return value is true.

virtual bool mbo::MboWinMsgHandler::PostMessage | ( | UINT | uMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [virtual]

Pass a message to the handler. Internally this method calls PostMessage with hwnd set to m_hwnd.

Parameters:
uMsg | Specifies the message to be posted.
wParam | Specifies additional message-specific information.
lParam | Specifies additional message-specific information.
Returns:
If the function succeeds, the return value is true.

virtual LRESULT mbo::MboWinMsgHandler::ProcessDefault | ( | HWND | hwnd,
 |  | UINT | uMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [virtual]

Handles default messages not handled by ProcessMessage.

Note:
You should call ProcessDefault() from ProcessMessage() for any message not handled yourself.
Parameters:
hwnd | Handle to the window procedure that received the message. This normally matches m_hwnd.
uMsg | Specifies the message received.
wParam | Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
lParam | Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
Returns:
The return value is the result of the message processing and depends on the message.

virtual LRESULT mbo::MboWinMsgHandler::ProcessMessage | ( | HWND | hwnd,
 |  | UINT | uMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [virtual]

Overwrite this handler if you want to handle any message.

Note:
You should call ProcessDefault() from ProcessMessage() for any message not handled yourself.
Parameters:
hwnd | Handle to the window procedure that received the message. This normally matches m_hwnd.
uMsg | Specifies the message received.
wParam | Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
lParam | Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
Returns:
The return value is the result of the message processing and depends on the message.

Reimplemented in mbo::MboDrawWin.

void mbo::MboThread::SetThreadName | ( | const char * | szThreadName,
 |  | DWORD | dwThreadID = -1
 | ) | [static, inherited]

Set the thread name for the debugging interface.

Parameters:
szThreadName | The new name of the thread
dwThreadID | The thread id or -1 to select current thread.
This function is typically called at Thread startup.

void mbo::MboThread::SetThreadPriority ( EThreadPriority ePriority ) [inherited]

Set the threads priority class.

Parameters:
ePriority new priority for the thread.
Note:
This works only if the thread was running once already.

virtual void mbo::MboThread::Start ( ) [virtual, inherited]

Start the thread.

to check whether or not the thread was really started implement an OnThreadStart() handler in the derived class.

virtual void mbo::MboWinMsgHandler::Stop ( ) [virtual]

Generates an WM_DESTROY message for the message handler which triggers a call to the inherited Stop and hence stops the thread. However the method also calls inherited Stop() direct to force message loop termination on next message.

Reimplemented from mbo::MboThread.

virtual void mbo::MboThread::ThreadProc ( ) [protected, virtual, inherited]

Call OnThreadStart()/Action()/OnThreadStop()

Reimplemented in mbo::MboIntervalThread, mbo::MboEventThread, and mbo::MboDelayedEventThread.

bool mbo::MboThread::WaitFor ( DWORD nMilliseconds = INFINITE ) const [inherited]

Wait for thread to terminate

WaitFor() does not call Stop() and can itself be called from more than one thread.

Parameters:
nMilliseconds Time to wait for thread to terminate.
Returns:
Whether or not the thread ended.

virtual bool mbo::MboWinMsgHandler::WndCalcMetrics ( ) [protected, virtual]

Register the window and calculate its metrics in case of visible windows of derived classes.

Reimplemented in mbo::MboDrawWin.

virtual const MboString& mbo::MboWinMsgHandler::WndClassName ( ) const [protected, virtual]

Returns:
the (window) class name which is used to create the window. This name will be used in RegisterWin() and CreateWin().
If you need to overload this function you must ensure that the returned value is a const string which must not be freed by the caller. Also you need to set bStart parameter of the constructor to false.

virtual bool mbo::MboWinMsgHandler::WndCreate ( ) [protected, virtual]

Create an unvisible message window. Called during handler startup.

Reimplemented in mbo::MboDrawWin.

virtual void mbo::MboWinMsgHandler::WndDestroy ( ) [protected, virtual]

Destroy the message window.

Reimplemented in mbo::MboDrawWin.

virtual bool mbo::MboWinMsgHandler::WndRegister ( ) [protected, virtual]

Register the class used to specify the internally used message handler.

virtual const MboString& mbo::MboWinMsgHandler::WndTitleText ( ) const [protected, virtual]

Returns:
title of window (defaults to WndClassName())

Friends And Related Function Documentation

LRESULT CALLBACK MboWndProc | ( | HWND | hwnd,
 |  | UINT | uMsg,
 |  | WPARAM | wParam,
 |  | LPARAM | lParam
 | ) | [friend]

Member Data Documentation

MAP_HWND mbo::MboWinMsgHandler::g_mhwndList [static, private]

Mapping from window handles to class instances.

Note:
This property cannot be exported when the class is compiled as a DLL project using MSVC.6. Furthermore it cannot be used in external projects/targets and instead the only way to use it in derived classes is to use the non virtual method AddHWND.

WndClassList mbo::MboWinMsgHandler::g_vWndClassList [static, protected]

the window class name as returned by WndClassName()

DWORD mbo::MboThread::m_dwThreadId [protected, inherited]

Thread Id or 0 (guarded by m_mxStartStop)

HANDLE mbo::MboThread::m_hIsStopping [protected, inherited]

Stop flag (Event)

HANDLE mbo::MboThread::m_hThread [protected, inherited]

HANDLE to thread or NULL (guarded by m_mxStartStop)

HWND mbo::MboWinMsgHandler::m_hwnd [protected]

CCriticalSectionImpl mbo::MboThread::m_mxStartStop [protected, inherited]

Mutex used for start/stop access

const MboString mbo::MboWinMsgHandler::m_strWndClassName [protected]

window handle

The documentation for this class was generated from the following file:
  • MboThread.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::mem_reallocator< __ValueType > Class Template Reference

mbo::mem_reallocator< __ValueType > Class Template Reference

Allocator that supports reallocation working on malloc(). More...

#include <reallocator.h>

Inheritance diagram for mbo::mem_reallocator< __ValueType >:

mbo::reallocator< __ValueType > mbo::allocator< __ValueType > List of all members.

Public Types

typedef const __ValueType * | const_pointer
typedef const __ValueType & | const_reference
typedef ptrdiff_t | difference_type
typedef __ValueType * | pointer
typedef __ValueType & | reference
typedef size_t | size_type
typedef __ValueType | value_type

Public Member Functions

const_pointer | address (const_reference ref)
pointer | address (reference ref)
pointer | allocate (size_type size, allocator< void, char >::const_pointer hint=0L)
pointer | allocate (size_type size, std::allocator< void >::const_pointer hint=0L)
void | construct (pointer ptr, const_reference oth)
void | deallocate (pointer ptr, size_type size)
void | destroy (pointer ptr)
size_type | max_size () const
void | move (pointer dst, pointer src, size_type size)
pointer | reallocate (pointer ptr, size_type old_size, size_type new_size)

Detailed Description

template<class __ValueType>
class mbo::mem_reallocator< __ValueType >

Allocator that supports reallocation working on malloc().

This allocator uses malloc(), realloc() and free() directly for elements space allocation/reallocation/deallocation.

This allocator uses memmove() directly when reallocating element space to copy elements from the orignal location to the new location without the need to call constructors and destructors (not even inplace destructors).

See also:
TDynamicArray

MBO_THROWS_EXCEPTIONS

Member Typedef Documentation

typedef const __ValueType * mbo::allocator< __ValueType , __ValueType >::const_pointer [inherited]

type used with const element pointer operations (read only)

typedef const __ValueType & mbo::allocator< __ValueType , __ValueType >::const_reference [inherited]

type used with const element referencing (read only)

typedef ptrdiff_t mbo::allocator< __ValueType , __ValueType >::difference_type [inherited]

type used to calculate element position distances

typedef __ValueType * mbo::allocator< __ValueType , __ValueType >::pointer [inherited]

type used with element pointer operations (read/write)

typedef __ValueType & mbo::allocator< __ValueType , __ValueType >::reference [inherited]

type used with element referencing (read/write)

typedef size_t mbo::allocator< __ValueType , __ValueType >::size_type [inherited]

size type for element counting

typedef __ValueType mbo::allocator< __ValueType , __ValueType >::value_type [inherited]

type of the elements

Member Function Documentation

const_pointer mbo::allocator< __ValueType , __ValueType >::address ( const_reference ref ) [inline, inherited]

Returns:
the const address of the element ref

pointer mbo::allocator< __ValueType , __ValueType >::address ( reference ref ) [inline, inherited]

Returns:
the address of the element ref

pointer mbo::allocator< __ValueType , __ValueType >::allocate | ( | size_type | size,
 |  | allocator< void, char >::const_pointer | hint = 0L
 | ) | [inline, inherited]

Allocate element space

Parameters:
size | number of elements required
hint | ignored
Returns:
allocated element space
No default constructors are executed.

template<class __ValueType>
pointer mbo::mem_reallocator< __ValueType >::allocate | ( | size_type | size,
 |  | std::allocator< void >::const_pointer | hint = 0L
 | ) | [inline]

Use malloc() to allocate size number of uninitialized elements

Parameters:
size | number of elements to allocate
hint | ignored here
Returns:
pointer to the allocated memory

void mbo::allocator< __ValueType , __ValueType >::construct | ( | pointer | ptr,
 |  | const_reference | oth
 | ) | [inline, inherited]

Construct an element as a copy of another one

Parameters:
ptr | pointer to element position in element space
oth | other element to copy from
An inplace copy constructor will be executed.

template<class __ValueType>
void mbo::mem_reallocator< __ValueType >::deallocate | ( | pointer | ptr,
 |  | size_type | size
 | ) | [inline]

Frees an element space

Parameters:
ptr | original pointer
size | number of elements (ignored)
Warning:
calls free(ptr) directly)

Reimplemented from mbo::allocator< __ValueType >.

void mbo::allocator< __ValueType , __ValueType >::destroy ( pointer ptr ) [inline, inherited]

Destroy an element by calling its destructor. No memory is freed.

Parameters:
element to destroy

size_type mbo::allocator< __ValueType , __ValueType >::max_size ( ) const [inline, inherited]

Returns:
the theoretical maximum number of elements if no other storage was allocated anywhere else.

template<class __ValueType>
void mbo::mem_reallocator< __ValueType >::move | ( | pointer | dst,
 |  | pointer | src,
 |  | size_type | size
 | ) | [inline]

Moves size elements from src to dst using memmove()

Parameters:
dst | destination pointer
src | source pointer
size | number of elements to move
Warning:
Calls malloc(dst, src, size * sizeof(value_type)) directly.

Reimplemented from mbo::reallocator< __ValueType >.

template<class __ValueType>
pointer mbo::mem_reallocator< __ValueType >::reallocate | ( | pointer | ptr,
 |  | size_type | old_size,
 |  | size_type | new_size
 | ) | [inline]

Reallocate element space using realloc()

Parameters:
ptr | original pointer
old_size | original number of elements (ignored)
new_size | new number of elements
Returns:
reallocated element space
Warning:
Calls realloc(ptr, new_size * sizeof(value_type)) directly. Does not use move().

Reimplemented from mbo::reallocator< __ValueType >.

The documentation for this class was generated from the following file:
  • reallocator.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::MutexList Class Reference

mbo::MutexList Class Reference

MutexList implementation. More...

#include <MboSynch.h>

Inheritance diagram for mbo::MutexList:

vector mbo::IMutex mbo::ICriticalSection List of all members.

Public Member Functions

virtual void | Enter () const
virtual unsigned long | GetLevel () const
virtual CLock | GetLock () const
virtual void | Leave () const
MutexList ()
virtual bool | Try (DWORD nMilliseconds=0) const
virtual | ~MutexList ()

Protected Member Functions

virtual IncDecVal | DecEntered () const
virtual IncDecVal | IncEntered () const

Private Member Functions

virtual HANDLE | GetHandle () const

Private Attributes

IncDecVal m_lEntered

Detailed Description

MutexList implementation.

This class collects MutexEntry instances which implement the IMutex interface. These lists are used internally be CLockMulti.

Note:
This class is distributed under the following license Mbo License.

Constructor & Destructor Documentation

mbo::MutexList::MutexList ( )

constructor

virtual mbo::MutexList::~MutexList ( ) [virtual]

destructor

Member Function Documentation

virtual IncDecVal mbo::MutexList::DecEntered ( ) const [protected, virtual]

Inform that all mutexes were leaved.

Implements mbo::IMutex.

virtual void mbo::MutexList::Enter ( ) const [virtual]

Enter all mutexes (enter critical section)

Reimplemented from mbo::IMutex.

virtual HANDLE mbo::MutexList::GetHandle ( ) const [private, virtual]

Get the internally used HANDLE is disabled for MutexList

Exceptions:
exception always
Returns:
internally used HANDLE

Reimplemented from mbo::IMutex.

virtual unsigned long mbo::MutexList::GetLevel ( ) const [virtual]

Returns:
Number of times CriticalSection is entered
Note:
This is only valie when the CriticalSection/Mutex is owned by the current thread.

Implements mbo::ICriticalSection.

virtual CLock mbo::MutexList::GetLock ( ) const [virtual]

Get lock for this mutex

The created lock will be returned as an object. That requires full return by value and invoking copy operators. But that is the only possible solution since we need a local copy that will be destructed locally - the sense of the lock.

Returns:
Lock for this Mutex

Implements mbo::IMutex.

virtual IncDecVal mbo::MutexList::IncEntered ( ) const [protected, virtual]

Inform that all mutexes were entered.

Implements mbo::IMutex.

virtual void mbo::MutexList::Leave ( ) const [virtual]

Leave all mutexes (leave critical section)

Implements mbo::ICriticalSection.

virtual bool mbo::MutexList::Try ( DWORD nMilliseconds = 0 ) const [virtual]

Try to enter all Mutexes in the list

When the all mutexes were entered the return value is true.

Parameters:
nMilliseconds time to try to enter in milliseconds
Returns:
whether or not all mutexes were entered

Implements mbo::IMutex.

Member Data Documentation

IncDecVal mbo::MutexList::m_lEntered [mutable, private]

number of times Mutex was entered

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::NullPointer< _Ty > Class Template Reference

mbo::NullPointer< _Ty > Class Template Reference

Incomplete null pointer type. More...

#include <MboRefCntPtr.h>

List of all members.

Public Member Functions

const _Ty & | operator * () const
_Ty & | operator * ()
operator bool () const

Detailed Description

template<class _Ty>
class mbo::NullPointer< _Ty >

Incomplete null pointer type.

This null pointer implementation throws an error for any read access, However write access is not implemented yet.

Member Function Documentation

template<class _Ty>
const _Ty& mbo::NullPointer< _Ty >::operator * ( ) const [inline]

Read access throws a nullptr_access expection

Exceptions:
exception nullptr_access

template<class _Ty>
_Ty& mbo::NullPointer< _Ty >::operator * ( ) [inline]

Read access throws a nullptr_access expection

Exceptions:
exception nullptr_access

template<class _Ty>
mbo::NullPointer< _Ty >::operator bool ( ) const [inline]

Read access throws a nullptr_access expection

Exceptions:
exception nullptr_access

The documentation for this class was generated from the following file:
  • MboRefCntPtr.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::NullPointer< _Ty >::nullptr_access Class Reference

mbo::NullPointer< _Ty >::nullptr_access Class Reference

exception for null-pointer access violations More...

#include <MboRefCntPtr.h>

Inheritance diagram for mbo::NullPointer< _Ty >::nullptr_access:

runtime_error List of all members.

Public Member Functions

nullptr_access (const char *szWhat="Null pointer access")

Detailed Description

template<class _Ty>
class mbo::NullPointer< _Ty >::nullptr_access

exception for null-pointer access violations

Constructor & Destructor Documentation

template<class _Ty>
mbo::NullPointer< _Ty >::nullptr_access::nullptr_access ( const char * szWhat = "Null pointer access" ) [inline, explicit]

The constructor takes an optional error message

The documentation for this class was generated from the following file:
  • MboRefCntPtr.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::reallocator< __ValueType > Class Template Reference

mbo::reallocator< __ValueType > Class Template Reference

Allocator that supports reallocation. More...

#include <reallocator.h>

Inheritance diagram for mbo::reallocator< __ValueType >:

mbo::allocator< __ValueType > mbo::mem_reallocator< __ValueType > List of all members.

Public Types

typedef const __ValueType * | const_pointer
typedef const __ValueType & | const_reference
typedef ptrdiff_t | difference_type
typedef __ValueType * | pointer
typedef __ValueType & | reference
typedef size_t | size_type
typedef __ValueType | value_type

Public Member Functions

const_pointer | address (const_reference ref)
pointer | address (reference ref)
pointer | allocate (size_type size, allocator< void, char >::const_pointer hint=0L)
void | construct (pointer ptr, const_reference oth)
void | deallocate (pointer ptr, size_type size)
void | destroy (pointer ptr)
size_type | max_size () const
void | move (pointer dst, pointer src, size_type size)
pointer | reallocate (pointer ptr, size_type old_size, size_type new_size) throw ( std::bad_alloc )

Detailed Description

template<class __ValueType>
class mbo::reallocator< __ValueType >

Allocator that supports reallocation.

This allocator uses memmove() directly when reallocating element space to copy elements from the orignal location to the new location without the need to call constructors and destructors (not even inplace destructors).

See also:
TDynamicArray

MBO_THROWS_EXCEPTIONS

Member Typedef Documentation

typedef const __ValueType * mbo::allocator< __ValueType , __ValueType >::const_pointer [inherited]

type used with const element pointer operations (read only)

typedef const __ValueType & mbo::allocator< __ValueType , __ValueType >::const_reference [inherited]

type used with const element referencing (read only)

typedef ptrdiff_t mbo::allocator< __ValueType , __ValueType >::difference_type [inherited]

type used to calculate element position distances

typedef __ValueType * mbo::allocator< __ValueType , __ValueType >::pointer [inherited]

type used with element pointer operations (read/write)

typedef __ValueType & mbo::allocator< __ValueType , __ValueType >::reference [inherited]

type used with element referencing (read/write)

typedef size_t mbo::allocator< __ValueType , __ValueType >::size_type [inherited]

size type for element counting

typedef __ValueType mbo::allocator< __ValueType , __ValueType >::value_type [inherited]

type of the elements

Member Function Documentation

const_pointer mbo::allocator< __ValueType , __ValueType >::address ( const_reference ref ) [inline, inherited]

Returns:
the const address of the element ref

pointer mbo::allocator< __ValueType , __ValueType >::address ( reference ref ) [inline, inherited]

Returns:
the address of the element ref

pointer mbo::allocator< __ValueType , __ValueType >::allocate | ( | size_type | size,
 |  | allocator< void, char >::const_pointer | hint = 0L
 | ) | [inline, inherited]

Allocate element space

Parameters:
size | number of elements required
hint | ignored
Returns:
allocated element space
No default constructors are executed.

void mbo::allocator< __ValueType , __ValueType >::construct | ( | pointer | ptr,
 |  | const_reference | oth
 | ) | [inline, inherited]

Construct an element as a copy of another one

Parameters:
ptr | pointer to element position in element space
oth | other element to copy from
An inplace copy constructor will be executed.

void mbo::allocator< __ValueType , __ValueType >::deallocate | ( | pointer | ptr,
 |  | size_type | size
 | ) | [inline, inherited]

Deallocate an element space.

Parameters:
ptr | element space to deallocate
size | number of elements in element space
No destructors are called.

Reimplemented in mbo::mem_reallocator< __ValueType >.

void mbo::allocator< __ValueType , __ValueType >::destroy ( pointer ptr ) [inline, inherited]

Destroy an element by calling its destructor. No memory is freed.

Parameters:
element to destroy

size_type mbo::allocator< __ValueType , __ValueType >::max_size ( ) const [inline, inherited]

Returns:
the theoretical maximum number of elements if no other storage was allocated anywhere else.

template<class __ValueType>
void mbo::reallocator< __ValueType >::move | ( | pointer | dst,
 |  | pointer | src,
 |  | size_type | size
 | ) | [inline]

Moves size elements from src to dst.

Parameters:
dst | destination pointer
src | source pointer
size | number of elements to move
Warning:
We are doing a raw memory operation since we cannot accept unbalanced constructor / deestructor calls. Which would disbalance reference counters.

We could also use std::uninitialized_copy() but this would not work when using std::allocator as base class because then we would allocate value_type element spaces and thus call their constructors.

Reimplemented in mbo::mem_reallocator< __ValueType >.

template<class __ValueType>
pointer mbo::reallocator< __ValueType >::reallocate | ( | pointer | ptr,
 |  | size_type | old_size,
 |  | size_type | new_size
 | ) | throw ( std::bad_alloc ) [inline]

Reallocate element space

Parameters:
ptr | original pointer
old_size | original number of elements
new_size | new number of elements
Returns:
reallocated element space
Exceptions:
std::bad_alloc if no memory could be allocated

Reimplemented in mbo::mem_reallocator< __ValueType >.

The documentation for this class was generated from the following file:
  • reallocator.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > Class Template Reference

mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > Class Template Reference

Reference counted pointer. More...

#include <MboRefCntPtr.h>

List of all members.

Public Types

typedef _THREAD_MODEL_PTR::CriticalSection | CriticalSection
typedef NullPointer< _Ty > | NullPtr
typedef RefCntRep< _Ty, _THREAD_MODEL > | Rep
typedef _Ty | Type

Public Member Functions

RefCntPtr & | __assign (const _Ty &ref)
_Ty & | __clone (_Ty &ref) const
CLock | __getLock () const
int | __referenceCount () const
const _Ty & | operator * () const
_Ty & | operator * ()
operator bool () const
const _Ty * | operator-> () const
_Ty * | operator-> ()
RefCntPtr & | operator= (const RefCntPtr &oth)
RefCntPtr & | operator= (_Ty *p)
RefCntPtr (const RefCntPtr &oth)
template<class _Tx>
RefCntPtr (const _Tx &x)
RefCntPtr (_Ty *p=0)
~RefCntPtr ()

Private Member Functions

void | __release ()

Private Attributes

CriticalSection mx
Rep * pRep

Related Functions

(Note that these are not member functions.)

bool | operator!= (const RefCntPtr< _Ty, _THM, _THM_PTR > &lhs, const RefCntPtr< _Ty, _THM, _THM_PTR > &rhs)
bool | operator< (const RefCntPtr< _Ty, _THM, _THM_PTR > &lhs, const RefCntPtr< _Ty, _THM, _THM_PTR > &rhs)
bool | operator== (const RefCntPtr< _Ty, _THM, _THM_PTR > &lhs, const RefCntPtr< _Ty, _THM, _THM_PTR > &rhs)

Detailed Description

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
class mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >

Reference counted pointer.

The class RefCntPtr<_Ty> describes an object that stores a pointer to an allocated instance of type _Ty, and keeps that object's reference count. Each time RefCntPtr<_Ty> instance is copied (through copy constructor or assignment operator), it's reference count is incremented. The stored pointer to object of type _Ty * is passed to constructor of RefCntPtr<_Ty> and must either be null or designate an object allocated by a new expression. The destructor for RefCntPtr<_Ty> deletes the allocated object if reference count falls to zero. Hence, an object of class RefCntPtr<_Ty> ensures that a pointer to an instance of type _Ty is automatically deleted. Valid values for the templates _THREAD_MODEL are SingleThreadedModel (for single threaded model) and MultiThreadedModel (for multi threaded model).

Parameters:
_Ty | type to use for target pointer
_THREAD_MODEL | either SingleThreadedModel, MultiThreadedModel or the automatically selected ThreadModel.
_THREAD_MODEL_PTR | same as _THREAD_MODEL but for the instance itself. This defaults to SingleThreadedModel regardless of the current ThreadModel default. The only thinkable need for MultiThreadedModel would be a situation where more than one thread accesses the same RefCntPtr.
Example:
 {
   RefCntPtr<int> p;     // equivalent of NULL pointer (no target)
   RefCntPtr<int> p1(5); // reference count of p1 is 1 (target
   RefCntPtr<int> p2(7); // reference count of p2 is 1

   printf("p1=%d", *p2); // this will print "p1=5".
   printf("p2=%d", *p2); // this will print "p2=7".

   p2 = p1;              // reference count of p2 falls to zero, deallocation
                         // occurs, and then reference count of p1 will be
                         // incremented to 2 because p2 now uses the same
                         // target. Therefore also reference count of p2 is 2.

   printf("p2=%d", *p2); // this will print "p2=5".

  } // deallocation is performed now becouse destructor of p1 decrements
    // reference count to 1, and then destructor of p2 decrements reference
    // count to 0.

Note:
This class has its destructor defined non virtual, hence you may not derive this class.

The size of this class is > 4 Bytes so use call by reference where approriate. The class itself will handle reference counting in assignments. But you may not store instances passed by refernce by memory operations of any kind since that would ignore reference counting.

This class is distributed under the following license Mbo License.

Member Typedef Documentation

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
typedef _THREAD_MODEL_PTR::CriticalSection mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::CriticalSection

type abbrevation for thread model dependant Lock

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
typedef NullPointer<_Ty> mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::NullPtr

type abbrevation for a null pointer that throws nullptr_access upon access

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
typedef RefCntRep<_Ty, _THREAD_MODEL> mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::Rep

type abbrevation for target pointer representation

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
typedef _Ty mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::Type

type abbrevation for target pointer type

Constructor & Destructor Documentation

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::RefCntPtr ( _Ty * p = 0 ) [inline]

Default constructor

The standard constructor takes a pointer of the member pointer type.

Parameters:
p target pointer to be stored in the RefCntPtr.
Note:
This is an automatic conversion.

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
template<class _Tx>
mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::RefCntPtr ( const _Tx & x ) [inline]

Clone constructor with automatic type conversion

This copy constructor is very handy when two types are involved in the creation of a RefCntPtr instance. The first type is the type of the internally stored pointer which may be an abstract class. The second type may be any derived type. This way you can create a copy from a derived reference and store the resulting pointer with the abstract type in the RefCntPrt.

Class _Tx is the type of param x which must be equal or derived from class type _Ty.

Parameters:
x An instance to clone (by calling its copy constructor)

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::RefCntPtr ( const RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > & oth ) [inline]

Copy constructor that takes a reference

Parameters:
oth RefCntPtr to copy from

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::~RefCntPtr ( ) [inline]

destructor

The destructor releases the resources. That means it decrements the reference count to the stored pointer and frees is if the result is zero.

Note:
Since the destructor is declared non virtual you may not derive this class.

Member Function Documentation

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
RefCntPtr& mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::__assign ( const _Ty & ref ) [inline]

Assignment by reference

Unlike other assignment solutions this one is completely captured by the lock and opens/closes the lock only once.

Using *ptr = ref; would require the pointer to be valid before and the assignment happens outside the lock.

Using ptr = ref; would open/lock twice.

Parameters:
ref reference to target
Returns:
modified self

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
_Ty& mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::__clone ( _Ty & ref ) const [inline]

Derefence cloning

Unlike other data methods this one is completly captured by the lock. Hence it ensures the data is completley cloned while protected.

Return values:
ref Reference to data which will hold the copy (work as a clone)
Returns:
reference to input data and therefore the copied data.

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
CLock mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::__getLock ( ) const [inline]

Returns:
lock for pointer itself

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
int mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::__referenceCount ( ) const [inline]

Retrieve number of references

Returns:
reference count

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
void mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::__release ( ) [inline, private]

Free/release the internal pointer

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
const _Ty& mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::operator * ( ) const [inline]

Dereference operator (const)

Note:
Do use this with caution because you may access a null pointer here. There is no special check
Returns:
target dereferenced as const

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
_Ty& mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::operator * ( ) [inline]

Dereference operator

Note:
Do use this with caution because you may access a null pointer here. There is no special check
Returns:
target dereferenced

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::operator bool ( ) const [inline]

Check if assigned/set

Note:
This may overwrite some behavior you expect from working with the other pointer types. However that shouldn't be the case in well designed source code.
Returns:
Whether or not target pointer is assigned (not NULL)

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
const _Ty* mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::operator-> ( ) const [inline]

Dereference operator (const)

Returns:
target pointer not dereferenced as const

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
_Ty* mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::operator-> ( ) [inline]

Dereference operator

Returns:
target pointer not dereferenced

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
RefCntPtr& mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::operator= ( const RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > & oth ) [inline]

Assignment operator

Parameters:
oth RefCntPtr to copy from
Returns:
modified self

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
RefCntPtr& mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::operator= ( _Ty * p ) [inline]

Assignment operator

Parameters:
p new target pointer
Returns:
modified self

Friends And Related Function Documentation

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
bool operator!= | ( | const RefCntPtr< _Ty, _THM, _THM_PTR > & | lhs,
 |  | const RefCntPtr< _Ty, _THM, _THM_PTR > & | rhs
 | ) | [related]

NE: negated value base comparison of two reference count pointers.

Parameters:
lhs | left hand side operand
rhs | right hand side operand
Returns:
Whether or not one pointer has no value or the two values differ based on calling their operator !=.
Note:
This is different from standard pointers where you compare the addresses and not the values. However there should be really no need to compare "the addresses of two reference counted pointers". If you feel this need for any strange reason you should reconsider if reference counted pointers are what you need.

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
bool operator< | ( | const RefCntPtr< _Ty, _THM, _THM_PTR > & | lhs,
 |  | const RefCntPtr< _Ty, _THM, _THM_PTR > & | rhs
 | ) | [related]

LT: value base comparison of two reference count pointers.

Parameters:
lhs | left hand side operand
rhs | right hand side operand
Returns:
Whether or not both pointers have a value and the first value is less than the second by calling the operator <.
Note:
This is different from standard pointers where you compare the addresses and not the values. However there should be really no need to compare "the addresses of two reference counted pointers". If you feel this need for any strange reason you should reconsider if reference counted pointers are what you need.

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
bool operator== | ( | const RefCntPtr< _Ty, _THM, _THM_PTR > & | lhs,
 |  | const RefCntPtr< _Ty, _THM, _THM_PTR > & | rhs
 | ) | [related]

EQ: value base comparison of two reference count pointers.

Parameters:
lhs | left hand side operand
rhs | right hand side operand
Returns:
Whether or not both pointers have a value and those values are equal by their operator ==.
Note:
This is different from standard pointers where you compare the addresses and not the values. However there should be really no need to compare "the addresses of two reference counted pointers". If you feel this need for any strange reason you should reconsider if reference counted pointers are what you need.

Member Data Documentation

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
CriticalSection mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::mx [mutable, private]

internal access mutex

template<class _Ty, class _THREAD_MODEL = ThreadModel, class _THREAD_MODEL_PTR = SingleThreadedModel>
Rep* mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::pRep [private]

connection to RefCntRep that holds the target pointer

The documentation for this class was generated from the following file:
  • MboRefCntPtr.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::RefCntRep< _Ty, _THREAD_MODEL > Struct Template Reference

mbo::RefCntRep< _Ty, _THREAD_MODEL > Struct Template Reference

Reference counted pointer representation. More...

#include <MboRefCntPtr.h>

List of all members.

Public Types

typedef RefCntRep< _Ty, _THREAD_MODEL > | Rep

Public Member Functions

RefCntRep & AddRef ()
RefCntRep (_Ty *p=0)
bool | Release ()

Static Public Member Functions

Rep * | Alloc (_Ty *p)
void | Dealloc (Rep *&pRep)

Public Attributes

_Ty * | pData
long | refCnt

Detailed Description

template<class _Ty, class _THREAD_MODEL = ThreadModel>
struct mbo::RefCntRep< _Ty, _THREAD_MODEL >

Reference counted pointer representation.

Warning:
this should only be used by RefCntPtr
Parameters:
_Ty | type to use for target pointer
_THREAD_MODEL | either SingleThreadedModel, MultiThreadedModel or the automatically selected ThreadModel.
Note:
This class is distributed under the following license Mbo License.

Member Typedef Documentation

template<class _Ty, class _THREAD_MODEL = ThreadModel>
typedef RefCntRep<_Ty, _THREAD_MODEL> mbo::RefCntRep< _Ty, _THREAD_MODEL >::Rep

Shortname fot this instanciated this type in instanciated class types.

Constructor & Destructor Documentation

template<class _Ty, class _THREAD_MODEL = ThreadModel>
mbo::RefCntRep< _Ty, _THREAD_MODEL >::RefCntRep ( _Ty * p = 0 ) [inline]

constructor

Parameters:
p target pointer to use.

Member Function Documentation

template<class _Ty, class _THREAD_MODEL = ThreadModel>
RefCntRep& mbo::RefCntRep< _Ty, _THREAD_MODEL >::AddRef ( ) [inline]

Increase number of references

template<class _Ty, class _THREAD_MODEL = ThreadModel>
Rep* mbo::RefCntRep< _Ty, _THREAD_MODEL >::Alloc ( _Ty * p ) [inline, static]

Allocate a new RefCntRep

Parameters:
p target pointer to use
Returns:
newly created RefCntRep

template<class _Ty, class _THREAD_MODEL = ThreadModel>
void mbo::RefCntRep< _Ty, _THREAD_MODEL >::Dealloc ( Rep *& pRep ) [inline, static]

Deallocate (free/delete) an already allocated RefCntRep

Parameters:
pRep pointer to free

template<class _Ty, class _THREAD_MODEL = ThreadModel>
bool mbo::RefCntRep< _Ty, _THREAD_MODEL >::Release ( ) [inline]

Decrease number of references and return true if reference count is zero. That is no more references are legal so that the instance itself (pData) can be deleted.

Returns:
whether reference count is zero and hence the pointer should be NULL.

Member Data Documentation

template<class _Ty, class _THREAD_MODEL = ThreadModel>
_Ty* mbo::RefCntRep< _Ty, _THREAD_MODEL >::pData

target pointer

template<class _Ty, class _THREAD_MODEL = ThreadModel>
long mbo::RefCntRep< _Ty, _THREAD_MODEL >::refCnt [mutable]

reference count

The documentation for this struct was generated from the following file:
  • MboRefCntPtr.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: runtime_error Class Reference

runtime_error Class Reference

Inheritance diagram for runtime_error:

mbo::string_conversion_error
The documentation for this class was generated from the following file:
  • MboTString.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::string_conversion_error Class Reference

mbo::string_conversion_error Class Reference

#include <MboTString.h>

Inheritance diagram for mbo::string_conversion_error:

runtime_error List of all members.

Public Member Functions

string_conversion_error ()

Constructor & Destructor Documentation

mbo::string_conversion_error::string_conversion_error ( ) [inline]

The documentation for this class was generated from the following file:
  • MboTString.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > Class Template Reference

mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > Class Template Reference

dynamic array More...

#include <TDynamicArray.h>

List of all members.

Public Types

typedef TDynamicArray< __ValueType,
__Allocator, __MinSize, __Append > 		_MyType
typedef __Allocator | allocator
typedef __Allocator::const_pointer | const_pointer
typedef __Allocator::const_reference | const_reference
typedef std::reverse_iterator<
const_iterator > 		const_reverse_iterator
typedef __Allocator::difference_type | difference_type
typedef __Allocator::pointer | pointer
typedef __Allocator::reference | reference
typedef std::reverse_iterator<
iterator > 		reverse_iterator
typedef __Allocator::size_type | size_type
typedef __Allocator::value_type | value_type

Public Member Functions

size_type | append () const
template<class InputIterator>
void | assign (InputIterator first, InputIterator end)
void | assign (size_type count, const_reference val)
reference | at (size_type index) throw ( std::out_of_range )
const_reference | at (size_type index) const throw ( std::out_of_range )
reference | back () throw ( std::out_of_range )
const_reference | back () const throw ( std::out_of_range )
iterator begin ()
const_iterator | begin () const
size_type | capacity () const
void | clear ()
bool | empty () const
iterator end ()
const_iterator | end () const
iterator | erase (iterator first, iterator end)
iterator | erase (iterator where)
void | erase (size_t where)
reference | front () throw ( std::out_of_range )
const_reference | front () const throw ( std::out_of_range )
size_type | max_size () const
TDynamicArray & | operator= (const TDynamicArray &oth) throw ( std::bad_alloc )
reference | operator[] (size_type index) throw ( std::out_of_range )
const_reference | operator[] (size_type index) const throw ( std::out_of_range )
void | pop_back () throw ( std::out_of_range )
void | pop_front () throw ( std::out_of_range )
void | push_back (const_reference value) throw ( std::bad_alloc , std::overflow_error )
void | push_front (const_reference value) throw ( std::bad_alloc , std::overflow_error )
reverse_iterator rbegin ()
const_reverse_iterator | rbegin () const
reverse_iterator rend ()
const_reverse_iterator | rend () const
reserve (size_type nNewCapacity) throw ( std::bad_alloc , std::overflow_error )
void | resize (size_type nNewSize, value_type value) throw ( std::bad_alloc , std::overflow_error )
void | resize (size_type nNewSize) throw ( std::bad_alloc , std::overflow_error )
size_type | size () const
TDynamicArray (const TDynamicArray &oth) throw ( std::bad_alloc )
TDynamicArray (size_type nMinSize=__MinSize, size_type nAppend=__Append, size_type nMaxSize=0) throw ( std::bad_alloc )
virtual | ~TDynamicArray () throw ( std::logic_error )

Protected Member Functions

void | check_resize () throw ( std::bad_alloc , std::overflow_error )
void | delete_at (size_type nPos) throw ( std::out_of_range )
void | insert_at (size_type nPos, const_reference value) throw ( std::out_of_range )

Protected Attributes

pointer m_acValues
allocator m_alloc
size_type m_nAppend
size_type m_nCapacity
size_type m_nMaxSize
size_type m_nSize

Detailed Description

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
class mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >

dynamic array

Template base for dynamic arrays.

The type __ValueType has no restriction whatsoever. The allocator must be derived from reallocator.

Complexity:

  • front(), back(), operator[](size_type): O(1)
  • push_front(), pop_front(): O(n)
  • push_back(), pop_back(): O(1)
  • erase(size_type), erase(iterator): O(1)+
  • erase(iterator,iterator): O(n)+
  • assign(): O(n+m)+
  • resize(): O(n+m)+

Here + denotes some memory copy operation. Value n is the current number of elements and m is the number of elements to insert or remove.

See also:
MBO_THROWS_EXCEPTIONS

MBO_TDA_VERIFY

MBO_TDA_STL_ITERATOR

Member Typedef Documentation

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
typedef TDynamicArray<__ValueType, __Allocator, __MinSize, __Append> mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::_MyType

type itself

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
typedef __Allocator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::allocator

allocator type

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
typedef __Allocator::const_pointer mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_pointer

const pointer to value type

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
typedef __Allocator::const_reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_reference

const reference to value type

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
typedef std::reverse_iterator<const_iterator> mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_reverse_iterator

const reverse iterator

See also:
MBO_TDA_STL_ITERATOR

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
typedef __Allocator::difference_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::difference_type

type used to calculate element position distances

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
typedef __Allocator::pointer mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::pointer

pointer to value type

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
typedef __Allocator::reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::reference

reference to value type

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
typedef std::reverse_iterator<iterator> mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::reverse_iterator

reverse iterator

See also:
MBO_TDA_STL_ITERATOR

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
typedef __Allocator::size_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::size_type

type used for size and indexing

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
typedef __Allocator::value_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::value_type

value type

Constructor & Destructor Documentation

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::TDynamicArray | ( | size_type | nMinSize = __MinSize,
 |  | size_type | nAppend = __Append,
 |  | size_type | nMaxSize = 0
 | ) | throw ( std::bad_alloc ) [inline, explicit]

Default constructor

If nAppend is set to 0 then nSize specifies the maximum size of the array.

Parameters:
nMinSize | initial element capacity
nAppend | number of elements to append if size exceeds
nMaxSize | maximum capacity (zero results in the theoretical limit specified by the allocator).
Exceptions:
std::bad_alloc if no memory could be allocated

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::TDynamicArray ( const TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > & oth ) throw ( std::bad_alloc ) [inline]

copy constructor

Parameters:
oth array to copy from
Exceptions:
std::bad_alloc if no memory could be allocated

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
virtual mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::~TDynamicArray ( ) throw ( std::logic_error ) [inline, virtual]

Free all allocated elements

Exceptions:
std::logic_error if the element space was not cleared and freed.

Member Function Documentation

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
size_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::append ( ) const [inline]

Returns:
number of element places appended if resizing is necessary

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
template<class InputIterator>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::assign | ( | InputIterator | first,
 |  | InputIterator | end
 | ) | [inline]

Clear and assign from iterators

Parameters:
first | start of sequence to assign to array
end | element beyond seqence (first element not to assign or end)

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::assign | ( | size_type | count,
 |  | const_reference | val
 | ) | [inline]

Clear and assign a number of elements

Parameters:
count | number of elements to assign
val | value of new elements

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::at ( size_type index ) throw ( std::out_of_range ) [inline]

Parameters:
index of element to access (read/write)
Returns:
reference to value at specified index
Exceptions:
std::out_of_range if index is invalid

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::at ( size_type index ) const throw ( std::out_of_range ) [inline]

Parameters:
index of element to access (read only)
Returns:
const reference to value at specified index
Exceptions:
std::out_of_range if index is invalid

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::back ( ) throw ( std::out_of_range ) [inline]

Returns:
reference to first element
Exceptions:
std::out_of_range if size() == 0

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::back ( ) const throw ( std::out_of_range ) [inline]

Returns:
const reference to first element
Exceptions:
std::out_of_range if size() == 0

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::begin ( ) [inline]

Returns:
iterator initialized to first element

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::begin ( ) const [inline]

Returns:
const iterator initialized to first element

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
size_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::capacity ( ) const [inline]

Returns:
the current maximum number of elements

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::check_resize ( ) throw ( std::bad_alloc , std::overflow_error ) [inline, protected]

Check whether adding a new element requires array reallocation. If necessary do so.

Exceptions:
std::bad_alloc | if no memory could be allocated
std::overflow_error | if no elements can be appended

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::clear ( ) [inline]

Destruct all elements and free the element space and set m_nCapacity to zero.

Note:
calls clear for unused elements too.

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::delete_at ( size_type nPos ) throw ( std::out_of_range ) [inline, protected]

Delete an element at a given position (no destruction)

Parameters:
nPos position to delete
Exceptions:
std::out_of_range if nPos is invalid
Warning:
No further checks or move operations are done.

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::empty ( ) const [inline]

Returns:
whether the array is empty (e.g. size() == 0).

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::end ( ) [inline]

Returns:
iterator that points beyond the end of the used elements

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::end ( ) const [inline]

Returns:
const iterator that points beyond the end of the used elements

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::erase | ( | iterator | first,
 |  | iterator | end
 | ) | [inline]

Parameters:
first | start of element range to remove
end | element beyond range to delete
Returns:
iterator pointing to element beyond the removed element or to the end of the array

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::erase ( iterator where ) [inline]

Delete a single element from the array

Parameters:
where iterator designating the element to delete
Returns:
iterator pointing to element beyond the removed element or to the end of the array

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::erase ( size_t where ) [inline]

Delete a single element from the array

Parameters:
where index of element to delete
Returns:
iterator pointing to element beyond the removed element or to the end of the array

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::front ( ) throw ( std::out_of_range ) [inline]

Returns:
reference to last element
Exceptions:
std::out_of_range if size() == 0

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::front ( ) const throw ( std::out_of_range ) [inline]

Returns:
const reference to last element
Exceptions:
std::out_of_range if size() == 0

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::insert_at | ( | size_type | nPos,
 |  | const_reference | value
 | ) | throw ( std::out_of_range ) [inline, protected]

Insert an element to a given position (use assignment)

Parameters:
nPos position to insert at
Exceptions:
std::out_of_range if nPos is invalid
Warning:
No further checks or move operations are done.

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
size_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::max_size ( ) const [inline]

Returns:
the theoretical maximum capacity

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
TDynamicArray& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::operator= ( const TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > & oth ) throw ( std::bad_alloc ) [inline]

assignment operator

Parameters:
oth array to copy from
Exceptions:
std::bad_alloc if no memory could be allocated

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::operator[] ( size_type index ) throw ( std::out_of_range ) [inline]

Parameters:
index of element to access (read/write)
Returns:
reference to value at specified index
Exceptions:
std::out_of_range if index is invalid

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::operator[] ( size_type index ) const throw ( std::out_of_range ) [inline]

Parameters:
index of element to access (read only)
Returns:
const reference to value at specified index
Exceptions:
std::out_of_range if index is invalid

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::pop_back ( ) throw ( std::out_of_range ) [inline]

Drops the last element

Exceptions:
std::out_of_range if size() == 0

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::pop_front ( ) throw ( std::out_of_range ) [inline]

Drops the first element

Exceptions:
std::out_of_range if size() == 0

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::push_back ( const_reference value ) throw ( std::bad_alloc , std::overflow_error ) [inline]

Append new data at end of array.

Parameters:
value new data to append
Exceptions:
std::bad_alloc | if no memory could be allocated
std::overflow_error | if no elements can be appended

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::push_front ( const_reference value ) throw ( std::bad_alloc , std::overflow_error ) [inline]

Append new data at beginning of array.

Parameters:
value new data to append
Exceptions:
std::bad_alloc | if no memory could be allocated
std::overflow_error | if no elements can be appended

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
reverse_iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::rbegin ( ) [inline]

Returns:
reverse iterator initialized to first (last in array) element
See also:
MBO_TDA_STL_ITERATOR

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_reverse_iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::rbegin ( ) const [inline]

Returns:
const reverse iterator initialized to first (last in array) element
See also:
MBO_TDA_STL_ITERATOR

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
reverse_iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::rend ( ) [inline]

Returns:
reverse iterator that points beyond the end of the used elements
See also:
MBO_TDA_STL_ITERATOR

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_reverse_iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::rend ( ) const [inline]

Returns:
const reverse iterator that points beyond the end of the used elements
See also:
MBO_TDA_STL_ITERATOR

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::reserve ( size_type nNewCapacity ) throw ( std::bad_alloc , std::overflow_error ) [inline]

Set new capacity. Value must be greater than or equal size().

Parameters:
nNewCapacity new maximum number of elements
Exceptions:
std::bad_alloc | if no memory could be allocated
std::overflow_error | if no elements can be appended

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::resize | ( | size_type | nNewSize,
 |  | value_type | value
 | ) | throw ( std::bad_alloc , std::overflow_error ) [inline]

Fill the array with a given values until its size is greater than or equal to a new size. If the new size is less than the current size then the back elements are deleted until the size equals the new size.

Parameters:
nNewSize | new size of the array
val | new value to append if necessary
Exceptions:
std::bad_alloc | if no memory could be allocated
std::overflow_error | if no elements can be appended

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
void mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::resize ( size_type nNewSize ) throw ( std::bad_alloc , std::overflow_error ) [inline]

Fill the array with default values until its size is greater than or equal to a new size. If the new size is less than the current size then the back elements are deleted until the size equals the new size.

Parameters:
nNewSize new size of the array
Exceptions:
std::bad_alloc | if no memory could be allocated
std::overflow_error | if no elements can be appended

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
size_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::size ( ) const [inline]

Returns:
the number of currently used or valid elements

Member Data Documentation

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
pointer mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::m_acValues [protected]

element storage (array)

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
allocator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::m_alloc [protected]

element allocator

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
size_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::m_nAppend [protected]

number of elements added out of element space

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
size_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::m_nCapacity [protected]

current max size (m_nCapacity >= m_nSize)

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
size_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::m_nMaxSize [protected]

maximum allowed capacity

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
size_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::m_nSize [protected]

current size (number of used or valid elements)

The documentation for this class was generated from the following file:
  • TDynamicArray.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator Class Reference

mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator Class Reference

constant bidirectional iterator More...

#include <TDynamicArray.h>

Inheritance diagram for mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator:

iterator List of all members.

Public Member Functions

const_iterator (const _MyType &array, size_type nPos=0)
const_reference | operator * () const
bool | operator!= (const const_iterator &rhs) const throw ( std::logic_error )
const_iterator | operator+ (difference_type diff) const throw ( std::logic_error )
const_iterator | operator++ (int)
const_iterator & operator++ ()
const_iterator & | operator+= (difference_type diff) throw ( std::logic_error )
const_iterator | operator- (difference_type diff) const throw ( std::logic_error )
difference_type | operator- (const const_iterator &rhs) const throw ( std::logic_error )
const_iterator | operator-- (int)
const_iterator & operator-- ()
const_iterator & | operator-= (difference_type diff) throw ( std::logic_error )
const_pointer | operator-> () const
bool | operator< (const const_iterator &rhs) const throw ( std::logic_error )
bool | operator<= (const const_iterator &rhs) const throw ( std::logic_error )
const_iterator & | operator= (const const_iterator &rhs)
bool | operator== (const const_iterator &rhs) const throw ( std::logic_error )
bool | operator> (const const_iterator &rhs) const throw ( std::logic_error )
bool | operator>= (const const_iterator &rhs) const throw ( std::logic_error )
const_reference | operator[] (size_type nPos) const throw ( std::out_of_range )

Protected Attributes

const _MyType & | m_array
size_type m_nPos

Detailed Description

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
class mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator

constant bidirectional iterator

Constructor & Destructor Documentation

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::const_iterator | ( | const _MyType & | array,
 |  | size_type | nPos = 0
 | ) | [inline]

Parameters:
array | const reference to array
nPos | index of start position

Member Function Documentation

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator * ( ) const [inline]

Returns:
current data as const reference

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator!= ( const const_iterator & rhs ) const throw ( std::logic_error ) [inline]

NE: non-equality operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether the two iterators are different
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator+ ( difference_type diff ) const throw ( std::logic_error ) [inline]

Create iterator behind current

Parameters:
diff number of elements to go forth
Returns:
new iterator
Exceptions:
std::logic_error if new position is invalid

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator++ ( int ) [inline]

move forward

Returns:
copy of original iterator before moving
Deprecated:
use prefix operator++()

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_iterator& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator++ ( ) [inline]

move forward

Returns:
modified self

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_iterator& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator+= ( difference_type diff ) throw ( std::logic_error ) [inline]

Increase position

Parameters:
diff number of elements to go forth
Returns:
modified self
Exceptions:
std::logic_error if new position is invalid

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator- ( difference_type diff ) const throw ( std::logic_error ) [inline]

Create iterator in back of current

Parameters:
diff number of elements to go front
Returns:
new iterator
Exceptions:
std::logic_error if new position is in back of array

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
difference_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator- ( const const_iterator & rhs ) const throw ( std::logic_error ) [inline]

Compute distance of to iterators

Parameters:
rhs other iterator
Returns:
distance between this and rhs
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator-- ( int ) [inline]

move frontward

Returns:
copy of original iterator before moving
Deprecated:
use prefix operator--()

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_iterator& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator-- ( ) [inline]

move frontward

Returns:
modified self

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_iterator& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator-= ( difference_type diff ) throw ( std::logic_error ) [inline]

Decrease position

Parameters:
diff number of elements to go front
Returns:
modified self
Exceptions:
std::logic_error if new position is in back of array

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_pointer mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator-> ( ) const [inline]

Returns:
current data as const reference

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator< ( const const_iterator & rhs ) const throw ( std::logic_error ) [inline]

LT: less than operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether this < rhs
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator<= ( const const_iterator & rhs ) const throw ( std::logic_error ) [inline]

LE: less than or equal operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether this <= rhs
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_iterator& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator= ( const const_iterator & rhs ) [inline]

assignment (copies array reference and position)

Parameters:
rhs right hand side argument (iterator to copy)
Returns:
modified this

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator== ( const const_iterator & rhs ) const throw ( std::logic_error ) [inline]

EQ: equality operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether the two iterators are equal
Exceptions:
std::logic_error if oth references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator> ( const const_iterator & rhs ) const throw ( std::logic_error ) [inline]

GT: greater than operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether this > rhs
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator>= ( const const_iterator & rhs ) const throw ( std::logic_error ) [inline]

GT: greate than or equal operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether this >= rhs
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::operator[] ( size_type nPos ) const throw ( std::out_of_range ) [inline]

Parameters:
index of element to access (read only)
Returns:
const reference to value at specified index
Exceptions:
std::out_of_range if index is invalid

Member Data Documentation

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const _MyType& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::m_array [protected]

reference to array

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
size_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator::m_nPos [protected]

current position

The documentation for this class was generated from the following file:
  • TDynamicArray.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator Class Reference

mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator Class Reference

bidirectional iterator (non const) More...

#include <TDynamicArray.h>

Inheritance diagram for mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator:

iterator List of all members.

Public Member Functions

iterator (_MyType &array, size_type nPos=0)
reference operator * ()
const_reference | operator * () const
bool | operator!= (const iterator &rhs) const throw ( std::logic_error )
iterator | operator+ (difference_type diff) const throw ( std::logic_error )
iterator | operator++ (int)
iterator & operator++ ()
iterator & | operator+= (difference_type diff) throw ( std::logic_error )
iterator | operator- (difference_type diff) const throw ( std::logic_error )
difference_type | operator- (const iterator &rhs) const throw ( std::logic_error )
iterator | operator-- (int)
iterator & operator-- ()
iterator & | operator-= (difference_type diff) throw ( std::logic_error )
pointer operator-> ()
const_pointer | operator-> () const
bool | operator< (const iterator &rhs) const throw ( std::logic_error )
bool | operator<= (const iterator &rhs) const throw ( std::logic_error )
iterator & | operator= (const iterator &rhs)
bool | operator== (const iterator &rhs) const
bool | operator> (const iterator &rhs) const throw ( std::logic_error )
bool | operator>= (const iterator &rhs) const throw ( std::logic_error )
const_reference | operator[] (size_type nPos) const throw ( std::out_of_range )
reference | operator[] (size_type nPos) throw ( std::out_of_range )

Protected Attributes

_MyType & m_array
size_type m_nPos

Detailed Description

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
class mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator

bidirectional iterator (non const)

Constructor & Destructor Documentation

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::iterator | ( | _MyType & | array,
 |  | size_type | nPos = 0
 | ) | [inline]

Parameters:
array | const reference to array
nPos | index of start position

Member Function Documentation

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator * ( ) [inline]

Returns:
current data as non const reference

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator * ( ) const [inline]

Returns:
current data as const reference

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator!= ( const iterator & rhs ) const throw ( std::logic_error ) [inline]

NE: non-equality operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether the two iterators are different
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator+ ( difference_type diff ) const throw ( std::logic_error ) [inline]

Create iterator behind current

Parameters:
diff number of elements to go forth
Returns:
new iterator
Exceptions:
std::logic_error if new position is invalid

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator++ ( int ) [inline]

move forward

Returns:
copy of original iterator before moving
Deprecated:
use prefix operator++()

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator++ ( ) [inline]

move forward

Returns:
modified self

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator+= ( difference_type diff ) throw ( std::logic_error ) [inline]

Increase position

Parameters:
diff number of elements to go forth
Returns:
modified self
Exceptions:
std::logic_error if new position is invalid

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator- ( difference_type diff ) const throw ( std::logic_error ) [inline]

Create iterator in back of current

Parameters:
diff number of elements to go front
Returns:
new iterator
Exceptions:
std::logic_error if new position is in back of array

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
difference_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator- ( const iterator & rhs ) const throw ( std::logic_error ) [inline]

Compute distance of to iterators

Parameters:
rhs other iterator
Returns:
distance between this and rhs
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator-- ( int ) [inline]

move frontward

Returns:
copy of original iterator before moving
Deprecated:
use prefix operator--()

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator-- ( ) [inline]

move frontward

Returns:
modified self

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator-= ( difference_type diff ) throw ( std::logic_error ) [inline]

Decrease position

Parameters:
diff number of elements to go front
Returns:
modified self
Exceptions:
std::logic_error if new position is in back of array

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
pointer mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator-> ( ) [inline]

Returns:
current data as non const reference

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_pointer mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator-> ( ) const [inline]

Returns:
current data as const reference

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator< ( const iterator & rhs ) const throw ( std::logic_error ) [inline]

LT: less than operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether this < rhs
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator<= ( const iterator & rhs ) const throw ( std::logic_error ) [inline]

LE: less than or equal operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether this <= rhs
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
iterator& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator= ( const iterator & rhs ) [inline]

assignment (copies array reference and position)

Parameters:
rhs right hand side argument (iterator to copy)
Returns:
modified this

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator== ( const iterator & rhs ) const [inline]

EQ: equality operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether the two iterators are equal
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator> ( const iterator & rhs ) const throw ( std::logic_error ) [inline]

GT: greater than operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether this > rhs
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
bool mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator>= ( const iterator & rhs ) const throw ( std::logic_error ) [inline]

GT: greate than or equal operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether this >= rhs
Exceptions:
std::logic_error if rhs references different container

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
const_reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator[] ( size_type nPos ) const throw ( std::out_of_range ) [inline]

Parameters:
index of element to access (read only)
Returns:
const reference to value at specified index
Exceptions:
std::out_of_range if index is invalid

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
reference mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::operator[] ( size_type nPos ) throw ( std::out_of_range ) [inline]

Parameters:
nPos index of element to access (read/write)
Returns:
const reference to value at specified index
Exceptions:
std::out_of_range if index is invalid

Member Data Documentation

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
_MyType& mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::m_array [protected]

reference to array

template<class __ValueType, class __Allocator = mem_reallocator<__ValueType>, __Allocator::size_type __MinSize = 8, __Allocator::size_type __Append = 8>
size_type mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator::m_nPos [protected]

current position

The documentation for this class was generated from the following file:
  • TDynamicArray.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::MultiThreaded::ThreadModel Class Reference

mbo::MultiThreaded::ThreadModel Class Reference

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

#include <MboSynch.h>

List of all members.

Public Types

typedef CCriticalSectionImpl | CriticalSection
typedef CEventImpl | EventModel
typedef CLock | Lock
typedef CLockMulti | LockMulti
typedef CLockSingle | LockSingle
typedef CMutexImpl | MutexModel
typedef CUnlock | Unlock

Static Public Member Functions

IncDecVal | Decrement (IncDecVal *p)
IncDecVal | Increment (IncDecVal *p)
IncDecVal | PeekValue (const IncDecVal *p)

Detailed Description

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

Note:
This class is distributed under the following license Mbo License.

Member Typedef Documentation

typedef CCriticalSectionImpl mbo::MultiThreaded::ThreadModel::CriticalSection

thread safe Critical Section

typedef CEventImpl mbo::MultiThreaded::ThreadModel::EventModel

thread safe Event

typedef CLock mbo::MultiThreaded::ThreadModel::Lock

thread safe automatic Lock

typedef CLockMulti mbo::MultiThreaded::ThreadModel::LockMulti

thread safe multi Lock

typedef CLockSingle mbo::MultiThreaded::ThreadModel::LockSingle

thread safe single Lock

typedef CMutexImpl mbo::MultiThreaded::ThreadModel::MutexModel

thread safe Mutex

typedef CUnlock mbo::MultiThreaded::ThreadModel::Unlock

thread safe automatic Lock unlock

Member Function Documentation

IncDecVal mbo::MultiThreaded::ThreadModel::Decrement ( IncDecVal * p ) [static]

non thread-safe decrement

Parameters:
p value to decrement
Returns:
result of increment

IncDecVal mbo::MultiThreaded::ThreadModel::Increment ( IncDecVal * p ) [static]

non thread-safe increment

Parameters:
p value to increment
Returns:
result of increment

IncDecVal mbo::MultiThreaded::ThreadModel::PeekValue ( const IncDecVal * p ) [static]

non thread-safe peek

Parameters:
p value to peek
Returns:
result of peek

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::ThreadModel Class Reference

mbo::ThreadModel Class Reference

automatic selection of correct thread model More...

#include <MboSynch.h>

Detailed Description

automatic selection of correct thread model

Make use of correct thread model by importing it into the namespace mbo and define it as ThreadModel.

Note:
This class is distributed under the following license Mbo License.

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::SingleThreaded::ThreadModel Class Reference

mbo::SingleThreaded::ThreadModel Class Reference

Class that defines types to use in/for NON multithreaded environments. More...

#include <MboSynch.h>

List of all members.

Public Types

typedef CCriticalSectionFake | CriticalSection
typedef CEventFake | EventModel
typedef CLock | Lock
typedef CLockMulti | LockMulti
typedef CLockSingle | LockSingle
typedef CMutexFake | MutexModel
typedef CUnlock | Unlock

Static Public Member Functions

IncDecVal | Decrement (IncDecVal *p)
IncDecVal | Increment (IncDecVal *p)
IncDecVal | PeekValue (const IncDecVal *p)

Detailed Description

Class that defines types to use in/for NON multithreaded environments.

Note:
This class is distributed under the following license Mbo License.

Member Typedef Documentation

typedef CCriticalSectionFake mbo::SingleThreaded::ThreadModel::CriticalSection

non thread safe Critical Section

typedef CEventFake mbo::SingleThreaded::ThreadModel::EventModel

non thread safe Event

typedef CLock mbo::SingleThreaded::ThreadModel::Lock

non thread safe automatic Lock

typedef CLockMulti mbo::SingleThreaded::ThreadModel::LockMulti

non thread safe multi Lock

typedef CLockSingle mbo::SingleThreaded::ThreadModel::LockSingle

non thread safe single Lock

typedef CMutexFake mbo::SingleThreaded::ThreadModel::MutexModel

non thread safe Mutex

typedef CUnlock mbo::SingleThreaded::ThreadModel::Unlock

non thread safe automatic Lock unlock

Member Function Documentation

IncDecVal mbo::SingleThreaded::ThreadModel::Decrement ( IncDecVal * p ) [static]

non thread-safe decrement

Parameters:
p value to decrement
Returns:
result of increment

IncDecVal mbo::SingleThreaded::ThreadModel::Increment ( IncDecVal * p ) [static]

non thread-safe increment

Parameters:
p value to increment
Returns:
result of increment

IncDecVal mbo::SingleThreaded::ThreadModel::PeekValue ( const IncDecVal * p ) [static]

non thread-safe peek

Parameters:
p value to peek
Returns:
result of peek

The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > Class Template Reference

TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > Class Template Reference

static sized array of __ValueType More...

#include <TStaticArray.h>

List of all members.

Public Types

typedef TStaticArray< __ValueType,
__MaxSize > 		_MyType
typedef __ValueType | _ValueType
typedef const __ValueType & | const_reference
typedef __ValueType * | pointer
typedef __ValueType & | reference

Public Member Functions

bool | append (const_reference value)
reference | back () throw (std::out_of_range)
const_reference | back () const throw (std::out_of_range)
iterator begin ()
const_iterator | begin () const
void | clear ()
bool | empty () const
iterator end ()
const_iterator | end () const
reference | front () throw (std::out_of_range)
const_reference | front () const throw (std::out_of_range)
bool | full () const
size_t | maxSize () const
reference | nextElement () throw (std::out_of_range)
reference | operator[] (size_t index) throw (std::out_of_range)
const_reference | operator[] (size_t index) const throw (std::out_of_range)
void | reset ()
size_t | size () const
TStaticArray ()

Protected Attributes

__ValueType | m_acValues [__MaxSize]
size_t | m_nSize

Detailed Description

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
class TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >

static sized array of __ValueType

Template base for static arrays.

The type __ValueType needs to have at least this structure:

   class ValueTYpe
   {
   public:
       void clear();
       bool empty() const;
       const ValueType & operator = (_IN const ValueType & value);
   };

With:

  • ValueType::clear() is used to clear or reset the information stored in that data container.
  • ValueType::empty() returns true when the data in the container is empty or invalid.
  • ValueType::operator=() is used to assign data from append().

The template can hold up to __MaxSize data containers. This value can later be checked by calling getMaxSize(). The actual amount of valid or used data can be determined by using size().

The array can grant access beyond the last used data container using the overloaded array access if the template parameter __AccessBeyondEnd is non zero (use 1 or true, e.g. something the compiler can evaluate).

Note:
The difference type and the size type both use size_t. This is possible because we only implement a bidirectional iterator. If this will be changed to a random access iterator or algorithms are used where end < begin is allowed a signed type (e.g. ptrdiff_t) has to be used.

Member Typedef Documentation

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
typedef TStaticArray<__ValueType, __MaxSize> TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::_MyType

type itself

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
typedef __ValueType TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::_ValueType

value type

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
typedef const __ValueType& TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_reference

const reference to value type

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
typedef __ValueType* TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::pointer

pointer to value type

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
typedef __ValueType& TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::reference

reference to value type

Constructor & Destructor Documentation

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::TStaticArray ( ) [inline]

default constructor sets size to zero

Member Function Documentation

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
bool TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::append ( const_reference value ) [inline]

Append new data set if possible.

Parameters:
value new data to append
Returns:
whether data was appended

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
reference TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::back ( ) throw (std::out_of_range) [inline]

Returns:
reference to last element
Exceptions:
std::out_of_range if size() == 0

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const_reference TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::back ( ) const throw (std::out_of_range) [inline]

Returns:
const reference to last element
Exceptions:
std::out_of_range if size() == 0

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
iterator TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::begin ( ) [inline]

Returns:
iterator initialized to first element

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const_iterator TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::begin ( ) const [inline]

Returns:
const iterator initialized to first element

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
void TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::clear ( ) [inline]

clear all elements by calling their clear method

Note:
calls clear for unused elements too.

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
bool TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::empty ( ) const [inline]

Returns:
whether the array is empty (e.g. size() == 0).

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
iterator TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::end ( ) [inline]

Returns:
iterator that points beyond the end of the used elements

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const_iterator TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::end ( ) const [inline]

Returns:
const iterator that points beyond the end of the used elements

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
reference TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::front ( ) throw (std::out_of_range) [inline]

Returns:
reference to first element
Exceptions:
std::out_of_range if size() == 0

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const_reference TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::front ( ) const throw (std::out_of_range) [inline]

Returns:
const reference to first element
Exceptions:
std::out_of_range if size() == 0

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
bool TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::full ( ) const [inline]

Returns:
whether no more elements can be stored

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
size_t TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::maxSize ( ) const [inline]

Returns:
the maximum number of elements that can be stored

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
reference TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::nextElement ( ) throw (std::out_of_range) [inline]

Returns:
reference to next (or first free) element
Exceptions:
std::out_of_range if size() >= maxSize()

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
reference TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::operator[] ( size_t index ) throw (std::out_of_range) [inline]

Parameters:
index of element to access
Returns:
reference to value at specified index
Exceptions:
std::out_of_range if index is invalid

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const_reference TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::operator[] ( size_t index ) const throw (std::out_of_range) [inline]

Parameters:
index of element to access
Returns:
const reference to value at specified index
Exceptions:
std::out_of_range if size() == 0

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
void TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::reset ( ) [inline]

reset array. If the class instanciates the template with __AccessBeyondEnd == true then clear() will be called. If not simply size is set to zero.

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
size_t TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::size ( ) const [inline]

Returns:
the number of currently used or valid elements

Member Data Documentation

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
__ValueType TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::m_acValues[__MaxSize] [protected]

element storage

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
size_t TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::m_nSize [protected]

current size (number of used or valid elements)

The documentation for this class was generated from the following file:
  • TStaticArray.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator Class Reference

TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator Class Reference

constant bidirectional iterator More...

#include <TStaticArray.h>

Inheritance diagram for TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator:

iterator List of all members.

Public Member Functions

const_iterator (const _MyType &array, size_t pos=0)
const_reference | operator * () const
bool | operator!= (const_iterator &rhs) const
const_iterator | operator++ (int)
const_iterator & operator++ ()
const_iterator | operator-- (int)
const_iterator & operator-- ()
const pointer | operator-> () const
const_iterator & | operator= (const const_iterator &rhs)
bool | operator== (const_iterator &rhs) const

Protected Attributes

const _MyType & | m_array
size_t | m_pos

Detailed Description

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
class TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator

constant bidirectional iterator

Constructor & Destructor Documentation

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator::const_iterator | ( | const _MyType & | array,
 |  | size_t | pos = 0
 | ) | [inline]

Parameters:
array | const reference to static array
pos | index of start position

Member Function Documentation

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const_reference TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator::operator * ( ) const [inline]

Returns:
current data as const reference

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
bool TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator::operator!= ( const_iterator & rhs ) const [inline]

NE: non-equality operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether the two iterators are different

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const_iterator TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator::operator++ ( int ) [inline]

move forward

Returns:
copy of original iterator before moving

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const_iterator& TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator::operator++ ( ) [inline]

move forward

Returns:
modified self

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const_iterator TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator::operator-- ( int ) [inline]

move backward

Returns:
copy of original iterator before moving

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const_iterator& TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator::operator-- ( ) [inline]

move backward

Returns:
modified self

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const pointer TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator::operator-> ( ) const [inline]

Returns:
current data as const reference

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const_iterator& TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator::operator= ( const const_iterator & rhs ) [inline]

assignment (copies array reference and position)

Parameters:
rhs right hand side argument (iterator to copy)
Returns:
modified this

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
bool TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator::operator== ( const_iterator & rhs ) const [inline]

EQ: equality operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether the two iterators are equal

Member Data Documentation

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const _MyType& TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator::m_array [protected]

reference to array

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
size_t TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator::m_pos [protected]

current position

The documentation for this class was generated from the following file:
  • TStaticArray.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator Class Reference

TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator Class Reference

bidirectional iterator (non const) More...

#include <TStaticArray.h>

Inheritance diagram for TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator:

iterator List of all members.

Public Member Functions

iterator (_MyType &array, size_t pos=0)
reference operator * ()
reference | operator * () const
bool | operator!= (iterator &rhs) const
iterator | operator++ (int)
iterator & operator++ ()
iterator | operator-- (int)
iterator & operator-- ()
pointer operator-> ()
const pointer | operator-> () const
iterator & | operator= (const iterator &rhs)
bool | operator== (iterator &rhs) const

Protected Attributes

_MyType & m_array
size_t | m_pos

Detailed Description

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
class TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator

bidirectional iterator (non const)

Constructor & Destructor Documentation

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::iterator | ( | _MyType & | array,
 |  | size_t | pos = 0
 | ) | [inline]

Parameters:
array | const reference to static array
pos | index of start position

Member Function Documentation

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
reference TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::operator * ( ) [inline]

Returns:
current data as non const reference

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
reference TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::operator * ( ) const [inline]

Returns:
current data as const reference

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
bool TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::operator!= ( iterator & rhs ) const [inline]

NE: non-equality operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether the two iterators are different

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
iterator TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::operator++ ( int ) [inline]

move forward

Returns:
copy of original iterator before moving

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
iterator& TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::operator++ ( ) [inline]

move forward

Returns:
modified self

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
iterator TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::operator-- ( int ) [inline]

move backward

Returns:
copy of original iterator before moving

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
iterator& TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::operator-- ( ) [inline]

move backward

Returns:
modified self

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
pointer TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::operator-> ( ) [inline]

Returns:
current data as non const reference

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
const pointer TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::operator-> ( ) const [inline]

Returns:
current data as const reference

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
iterator& TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::operator= ( const iterator & rhs ) [inline]

assignment (copies array reference and position)

Parameters:
rhs right hand side argument (iterator to copy)
Returns:
modified this

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
bool TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::operator== ( iterator & rhs ) const [inline]

EQ: equality operator

Parameters:
rhs right hand side argument (other iterator)
Returns:
whether the two iterators are equal

Member Data Documentation

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
_MyType& TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::m_array [protected]

reference to array

template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
size_t TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator::m_pos [protected]

current position

The documentation for this class was generated from the following file:
  • TStaticArray.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: vector Class Reference

vector Class Reference

Inheritance diagram for vector:

mbo::MutexList
The documentation for this class was generated from the following file:
  • MboSynch.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::Vector< _Ty, _Cols > Class Template Reference

mbo::Vector< _Ty, _Cols > Class Template Reference

#include <MboMatrix.h>

Inheritance diagram for mbo::Vector< _Ty, _Cols >:

mbo::Matrix< _Ty, _Cols, 1 > List of all members.

Private Member Functions

Matrix< _Ty, _Cols, _Rows > | Adj () throw (MatrixException)
_Ty | Cofactor (size_t row, size_t col) throw (MatrixException)
_Ty | Cond ()
_Ty | Det () throw (MatrixException)
bool | IsDiagonal ()
bool | IsLowerTiangular ()
bool | IsNull ()
bool | IsScalar ()
bool | IsSingular ()
bool | IsSkewSymmetric ()
bool | IsSquare ()
bool | IsSymmetric ()
bool | IsUnit ()
bool | IsUpperTiangular ()
_Ty | Norm ()
void | Null ()
void | Null (const size_t &row, const size_t &col)
size_t | numCols ()
size_t | numRows ()
Matrix< _Ty, _Cols, _Rows > & | operator *= (const _Ty &c)
Matrix< _Ty, _Cols, _Rows > & | operator *= (const Matrix< _Ty, _Cols, _Rows > &m) throw (MatrixException)
_Ty & | operator() (size_t row, size_t col) throw (MatrixException)
Matrix< _Ty, _Cols, _Rows > | operator+ ()
Matrix< _Ty, _Cols, _Rows > & | operator+= (const Matrix< _Ty, _Cols, _Rows > &m) throw (MatrixException)
Matrix< _Ty, _Cols, _Rows > | operator- ()
Matrix< _Ty, _Cols, _Rows > & | operator-= (const Matrix< _Ty, _Cols, _Rows > &m) throw (MatrixException)
Matrix< _Ty, _Cols, _Rows > & | operator/= (const _Ty &c)
Matrix< _Ty, _Cols, _Rows > & | operator^= (const size_t &pow) throw (MatrixException)
Matrix< _Ty, _Cols, _Rows > | Solve (const Matrix< _Ty, _Cols, _Rows > &v) const throw (MatrixException)
void | Unit ()
void | Unit (const size_t &row)

Friends

Matrix< _Ty, _Cols2, _Rows1 > | _Cols
Matrix< _Ty, _Cols, _Rows > | operator * (const T &no, const Matrix< _Ty, _Cols, _Rows > &m)
Matrix< _Ty, _Cols, _Rows > | operator * (const Matrix< _Ty, _Cols, _Rows > &m, const T &no)
Matrix< _Ty, _Cols2, _Rows1
> _Rows Matrix< _Ty, _Cols,
_Rows > 		operator * (const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) throw (MatrixException)
Matrix< _Ty, _Cols2, _Rows1 > | operator * (const Matrix< _Ty, _Cols1Rows2, _Rows1 > &lhs, const Matrix< _Ty, _Cols2, _Cols1Rows2 > &rhs) friend template< class _Ty
Matrix< _Ty, _Cols, _Rows > | operator! (Matrix< _Ty, _Cols, _Rows > m) throw (MatrixException)
bool | operator!= (const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2)
Matrix< _Ty, _Cols, _Rows > | operator+ (const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) throw (MatrixException)
Matrix< _Ty, _Cols, _Rows > | operator- (const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) throw (MatrixException)
Matrix< _Ty, _Cols, _Rows > | operator/ (const T &no, const Matrix< _Ty, _Cols, _Rows > &m) throw (MatrixException)
Matrix< _Ty, _Cols, _Rows > | operator/ (const Matrix< _Ty, _Cols, _Rows > &m, const T &no)
Matrix< _Ty, _Cols, _Rows > | operator/ (const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) throw (MatrixException)
ostream & | operator<< (ostream &o, Matrix< _Ty, _Cols, _Rows > &m)
bool | operator== (const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2)
istream & | operator>> (istream &i, Matrix< _Ty, _Cols, _Rows > &m)
Matrix< _Ty, _Cols, _Rows > | operator^ (const Matrix< _Ty, _Cols, _Rows > &m, const size_t &pow) throw (MatrixException)
Matrix< _Ty, _Cols, _Rows > | operator~ (const Matrix< _Ty, _Cols, _Rows > &m)

template<class _Ty, size_t _Cols>
class mbo::Vector< _Ty, _Cols >

Member Function Documentation

Matrix<_Ty , _Cols, _Rows> mbo::Matrix< _Ty , _Cols, _Rows >::Adj ( ) throw (MatrixException) [inherited]

_Ty mbo::Matrix< _Ty , _Cols, _Rows >::Cofactor | ( | size_t | row,
 |  | size_t | col
 | ) | throw (MatrixException) [inherited]

_Ty mbo::Matrix< _Ty , _Cols, _Rows >::Cond ( ) [inherited]

_Ty mbo::Matrix< _Ty , _Cols, _Rows >::Det ( ) throw (MatrixException) [inherited]

bool mbo::Matrix< _Ty , _Cols, _Rows >::IsDiagonal ( ) [inherited]

bool mbo::Matrix< _Ty , _Cols, _Rows >::IsLowerTiangular ( ) [inherited]

bool mbo::Matrix< _Ty , _Cols, _Rows >::IsNull ( ) [inherited]

bool mbo::Matrix< _Ty , _Cols, _Rows >::IsScalar ( ) [inherited]

bool mbo::Matrix< _Ty , _Cols, _Rows >::IsSingular ( ) [inherited]

bool mbo::Matrix< _Ty , _Cols, _Rows >::IsSkewSymmetric ( ) [inherited]

bool mbo::Matrix< _Ty , _Cols, _Rows >::IsSquare ( ) [inline, inherited]

bool mbo::Matrix< _Ty , _Cols, _Rows >::IsSymmetric ( ) [inherited]

bool mbo::Matrix< _Ty , _Cols, _Rows >::IsUnit ( ) [inherited]

bool mbo::Matrix< _Ty , _Cols, _Rows >::IsUpperTiangular ( ) [inherited]

_Ty mbo::Matrix< _Ty , _Cols, _Rows >::Norm ( ) [inherited]

void mbo::Matrix< _Ty , _Cols, _Rows >::Null ( ) [inherited]

void mbo::Matrix< _Ty , _Cols, _Rows >::Null | ( | const size_t & | row,
 |  | const size_t & | col
 | ) | [inherited]

size_t mbo::Matrix< _Ty , _Cols, _Rows >::numCols ( ) [inline, inherited]

size_t mbo::Matrix< _Ty , _Cols, _Rows >::numRows ( ) [inline, inherited]

Matrix<_Ty , _Cols, _Rows>& mbo::Matrix< _Ty , _Cols, _Rows >::operator *= ( const _Ty & c ) [inherited]

Matrix<_Ty , _Cols, _Rows>& mbo::Matrix< _Ty , _Cols, _Rows >::operator *= ( const Matrix< _Ty , _Cols, _Rows > & m ) throw (MatrixException) [inherited]

_Ty & mbo::Matrix< _Ty , _Cols, _Rows >::operator() | ( | size_t | row,
 |  | size_t | col
 | ) | throw (MatrixException) [inherited]

Matrix<_Ty , _Cols, _Rows> mbo::Matrix< _Ty , _Cols, _Rows >::operator+ ( ) [inline, inherited]

Matrix<_Ty , _Cols, _Rows>& mbo::Matrix< _Ty , _Cols, _Rows >::operator+= ( const Matrix< _Ty , _Cols, _Rows > & m ) throw (MatrixException) [inherited]

Matrix<_Ty , _Cols, _Rows> mbo::Matrix< _Ty , _Cols, _Rows >::operator- ( ) [inherited]

Matrix<_Ty , _Cols, _Rows>& mbo::Matrix< _Ty , _Cols, _Rows >::operator-= ( const Matrix< _Ty , _Cols, _Rows > & m ) throw (MatrixException) [inherited]

Matrix<_Ty , _Cols, _Rows>& mbo::Matrix< _Ty , _Cols, _Rows >::operator/= ( const _Ty & c ) [inherited]

Matrix<_Ty , _Cols, _Rows>& mbo::Matrix< _Ty , _Cols, _Rows >::operator^= ( const size_t & pow ) throw (MatrixException) [inherited]

Matrix<_Ty , _Cols, _Rows> mbo::Matrix< _Ty , _Cols, _Rows >::Solve ( const Matrix< _Ty , _Cols, _Rows > & v ) const throw (MatrixException) [inherited]

void mbo::Matrix< _Ty , _Cols, _Rows >::Unit ( ) [inherited]

void mbo::Matrix< _Ty , _Cols, _Rows >::Unit ( const size_t & row ) [inherited]

Friends And Related Function Documentation

friend Matrix<_Ty , _Cols2, _Rows1> _Cols [friend, inherited]

Matrix<_Ty , _Cols, _Rows> operator * | ( | const T & | no,
 |  | const Matrix< _Ty , _Cols, _Rows > & | m
 | ) | [friend, inherited]

Matrix<_Ty , _Cols, _Rows> operator * | ( | const Matrix< _Ty , _Cols, _Rows > & | m,
 |  | const T & | no
 | ) | [friend, inherited]

Matrix<_Ty , _Cols2, _Rows1> _Rows Matrix<_Ty , _Cols, _Rows> operator * | ( | const Matrix< _Ty , _Cols, _Rows > & | m1,
 |  | const Matrix< _Ty , _Cols, _Rows > & | m2
 | ) | throw (MatrixException) [friend, inherited]

Matrix<_Ty , _Cols2, _Rows1> operator * | ( | const Matrix< _Ty , _Cols1Rows2, _Rows1 > & | lhs,
 |  | const Matrix< _Ty , _Cols2, _Cols1Rows2 > & | rhs
 | ) | [friend, inherited]

Matrix<_Ty , _Cols, _Rows> operator! ( Matrix< _Ty , _Cols, _Rows > m ) throw (MatrixException) [friend, inherited]

bool operator!= | ( | const Matrix< _Ty , _Cols, _Rows > & | m1,
 |  | const Matrix< _Ty , _Cols, _Rows > & | m2
 | ) | [friend, inherited]

Matrix<_Ty , _Cols, _Rows> operator+ | ( | const Matrix< _Ty , _Cols, _Rows > & | m1,
 |  | const Matrix< _Ty , _Cols, _Rows > & | m2
 | ) | throw (MatrixException) [friend, inherited]

Matrix<_Ty , _Cols, _Rows> operator- | ( | const Matrix< _Ty , _Cols, _Rows > & | m1,
 |  | const Matrix< _Ty , _Cols, _Rows > & | m2
 | ) | throw (MatrixException) [friend, inherited]

Matrix<_Ty , _Cols, _Rows> operator/ | ( | const T & | no,
 |  | const Matrix< _Ty , _Cols, _Rows > & | m
 | ) | throw (MatrixException) [friend, inherited]

Matrix<_Ty , _Cols, _Rows> operator/ | ( | const Matrix< _Ty , _Cols, _Rows > & | m,
 |  | const T & | no
 | ) | [friend, inherited]

Matrix<_Ty , _Cols, _Rows> operator/ | ( | const Matrix< _Ty , _Cols, _Rows > & | m1,
 |  | const Matrix< _Ty , _Cols, _Rows > & | m2
 | ) | throw (MatrixException) [friend, inherited]

ostream& operator<< | ( | ostream & | o,
 |  | Matrix< _Ty , _Cols, _Rows > & | m
 | ) | [friend, inherited]

bool operator== | ( | const Matrix< _Ty , _Cols, _Rows > & | m1,
 |  | const Matrix< _Ty , _Cols, _Rows > & | m2
 | ) | [friend, inherited]

istream& operator>> | ( | istream & | i,
 |  | Matrix< _Ty , _Cols, _Rows > & | m
 | ) | [friend, inherited]

Matrix<_Ty , _Cols, _Rows> operator^ | ( | const Matrix< _Ty , _Cols, _Rows > & | m,
 |  | const size_t & | pow
 | ) | throw (MatrixException) [friend, inherited]

Matrix<_Ty , _Cols, _Rows> operator~ ( const Matrix< _Ty , _Cols, _Rows > & m ) [friend, inherited]

The documentation for this class was generated from the following file:
  • MboMatrix.h
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: vector Class Reference

vector Class Reference

Inheritance diagram for vector:

std::vector2< _Ty, _Alloc >
The documentation for this class was generated from the following file:
  • vector2.h
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: std::vector2< _Ty, _Alloc > Class Template Reference

std::vector2< _Ty, _Alloc > Class Template Reference

expanded vector template class More...

#include <vector2.h>

Inheritance diagram for std::vector2< _Ty, _Alloc >:

vector List of all members.

Public Types

typedef vector< _Ty, _Alloc > | _Mybase
typedef vector2< _Ty, _Alloc > | _Myt

Public Member Functions

virtual bool | add_if_new (const _Ty &_Val)
bool | contains (const _Ty &_Val) const
bool | contains_no (const _Ty &_Val) const
virtual void | limit (size_type _Limit)
operator bool ()
pair< size_type, bool > | position (const _Ty &_Val) const
void | sort ()

Static Public Member Functions

_Myt | dyn_create (_Myt::size_type _Count,...)

Related Functions

(Note that these are not member functions.)

vector2< _Ty_a, _Alloc_a > & | operator+= (vector2< _Ty_a, _Alloc_a > &container, const vector< _Ty_b, _Alloc_b > &values)
vector2< _Ty_a, _Alloc_a > & | operator<< (vector2< _Ty_a, _Alloc_a > &container, const vector< _Ty_b, _Alloc_b > &values)

Detailed Description

template<class _Ty, class _Alloc = allocator<_Ty>>
class std::vector2< _Ty, _Alloc >

expanded vector template class

This specialisation supports:

  • limit() Decreases size to a given limit
  • contains() Checks whether or not a specific element is contained
  • add_if_new() Adds an element if it is not contained
  • sort() Sorts the elements

Note:
deque2, list2 and vector2 are designed to be replaceable by each other and hence have the same access methods. However the main differences of their stl base templates still apply.
Speed?
  • contains() O(n)
  • at(), [] O(1)
  • sort() O(n log(n))

Todo:
The vector2(_Count) & vector2(_Count, _Val) constructors do not exist.
Parameters:
__Ty | element/value type
__Alloc | element/value allocator

Member Typedef Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
typedef vector<_Ty, _Alloc> std::vector2< _Ty, _Alloc >::_Mybase

type abbrevation for parent class/template

template<class _Ty, class _Alloc = allocator<_Ty>>
typedef vector2<_Ty, _Alloc> std::vector2< _Ty, _Alloc >::_Myt

type abbrevation for this class

Member Function Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
virtual bool std::vector2< _Ty, _Alloc >::add_if_new ( const _Ty & _Val ) [inline, virtual]

Add _Val if it is not already contained in the vector Returns wether or not _Val was added

Parameters:
_Val element to add
Returns:
whether _Val was added or already contained

template<class _Ty, class _Alloc = allocator<_Ty>>
bool std::vector2< _Ty, _Alloc >::contains ( const _Ty & _Val ) const [inline]

Brute force test to check whether or not a specific value is contained in the vector.

Parameters:
_Val element to check for
Returns:
whether or not _Val is member of the vector

template<class _Ty, class _Alloc = allocator<_Ty>>
bool std::vector2< _Ty, _Alloc >::contains_no ( const _Ty & _Val ) const [inline]

Brute force test to check whether or not a specific value is contained in the vector. The inverted result is returned this can be used for map2 values(check_fun_t) to return a unique list.

Parameters:
_Val element to check for
Returns:
whether or not _Val is new = NOT contained in the vector

template<class _Ty, class _Alloc = allocator<_Ty>>
_Myt std::vector2< _Ty, _Alloc >::dyn_create | ( | _Myt::size_type | _Count,
 |  |  | ...
 | ) | [inline, static]

Dynamic vector creation.

Parameters:
_Count number of elemnts to put into vector2
... elements to put into the vector each of type _Ty (_Count times)

template<class _Ty, class _Alloc = allocator<_Ty>>
virtual void std::vector2< _Ty, _Alloc >::limit ( size_type _Limit ) [inline, virtual]

Limit does not grow if size() < _Limit as resize() does!

Parameters:
_Limit size limit for vector

template<class _Ty, class _Alloc = allocator<_Ty>>
std::vector2< _Ty, _Alloc >::operator bool ( ) [inline]

Check whether the vector contains any element

Returns:
element cout > 0

template<class _Ty, class _Alloc = allocator<_Ty>>
pair<size_type,bool> std::vector2< _Ty, _Alloc >::position ( const _Ty & _Val ) const [inline]

Brute force evaluation of element index in container. -1 is returned if element is not contained.

Parameters:
_Val element to search for
Returns:
  • position of _Val in vector or -1 if _VAL is not element of vector
  • whether or not _Val is element of vector

template<class _Ty, class _Alloc = allocator<_Ty>>
void std::vector2< _Ty, _Alloc >::sort ( ) [inline]

Sort the elements in the vector

Friends And Related Function Documentation

template<class _Ty, class _Alloc = allocator<_Ty>>
vector2< _Ty_a, _Alloc_a > & operator+= | ( | vector2< _Ty_a, _Alloc_a > & | container,
 |  | const vector< _Ty_b, _Alloc_b > & | values
 | ) | [related]

add (not store) the values of a container to another container

Note:
the receiver container will not be emptied
Warning:
this operator can only be instanciated if a conversion from _Ty_b to _Ty_a exists
See also:
vector2::operator<<
Parameters:
_Ty_a | element/value type of receiver container
_Alloc_a | element/value allocator of receiver container
_Ty_b | element/value type of input container
_Alloc_b | element/value allocator of input container
container | container that receives th e input values
values | container input values
Returns:
modified container

template<class _Ty, class _Alloc = allocator<_Ty>>
vector2< _Ty_a, _Alloc_a > & operator<< | ( | vector2< _Ty_a, _Alloc_a > & | container,
 |  | const vector< _Ty_b, _Alloc_b > & | values
 | ) | [related]

store (not add) the values of a container to another containert

Note:
the receiver container will be emptied
Warning:
this operator can only be instanciated if a conversion from _Ty_b to _Ty_a exists
See also:
vector2::operator+=
Parameters:
_Ty_a | element/value type of receiver container
_Alloc_a | element/value allocator of receiver container
_Ty_b | element/value type of input container
_Alloc_b | element/value allocator of input container
container | container that receives th e input values
values | container input values
Returns:
modified container

The documentation for this class was generated from the following file:
  • vector2.h
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: Hierarchical Index

mbo Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:
  • mbo::allocator< __ValueType, __ReferenceType >
  • mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other >
  • mbo::allocator< __ValueType >
    • mbo::reallocator< __ValueType >
      • mbo::mem_reallocator< __ValueType >
  • binary_function
    • mbo::less_cstr_ic
    • std::check_fun_t< _Tp, _Arg >
  • mbo::CIniData
  • deque
    • std::deque2< _Ty, _Alloc >
    • std::deque2< MboString >
      • mbo::CStrList
  • exception
    • mbo::MatrixException
  • mbo::ICriticalSection
    • mbo::CCriticalSectionFake
    • mbo::CCriticalSectionImpl
    • mbo::IMutex
      • mbo::CMutexFake
      • mbo::CMutexImpl
      • mbo::MutexList
  • mbo::IEvent
    • mbo::CEventFake
    • mbo::CEventImpl
  • mbo::ILock
    • mbo::CLock
    • mbo::CLockFake
    • mbo::CLockMulti
    • mbo::CLockSingle
    • mbo::CUnlock
  • iterator
    • mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • iterator
    • mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator
  • iterator
    • TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator
  • iterator
    • TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator
  • list
    • std::list2< _Ty, _Alloc >
  • mbo::LockedVar< T, _THREAD_MODEL >
  • mbo::LockedVar< bool, ThreadModel >
  • map
    • std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
    • std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc >
      • mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc >
    • std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > >
      • mbo::CStrMap< MboString >
        • mbo::CStrMapStr
  • mbo::Matrix< _Ty, _Cols, _Rows >
  • mbo::Matrix< _Ty, _Cols, 1 >
    • mbo::Vector< _Ty, _Cols >
  • mbo::MboThread
    • mbo::MboEventThread
      • mbo::MboDelayedEventThread
    • mbo::MboIntervalThread
    • mbo::MboWinMsgHandler
      • mbo::MboDrawWin
  • mbo::NullPointer< _Ty >
  • mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • runtime_error
    • mbo::NullPointer< _Ty >::nullptr_access
  • runtime_error
    • mbo::string_conversion_error
  • mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • mbo::MultiThreaded::ThreadModel
  • mbo::ThreadModel
  • mbo::SingleThreaded::ThreadModel
  • TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >
  • vector
    • mbo::MutexList
  • vector
    • std::vector2< _Ty, _Alloc >
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Class Members

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Related Functions
_ | a | b | c | d | e | f | g | i | k | l | m | n | o | p | r | s | t | u | v | w | ~

Here is a list of all class members with links to the classes they belong to:

- _ -

  • __assign() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • __clone() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • __exchange() : mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • __getLock() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • __referenceCount() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • __release() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • _Cols : mbo::Matrix< _Ty, _Cols, _Rows >
  • _Element : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _Element_check_fun_t : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _fun_type : std::check_fun_t< _Tp, _Arg >
  • _Kty : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _Kty_check_fun_t : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _Kty_container : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _M_f : std::check_fun_t< _Tp, _Arg >
  • _Mybase : std::vector2< _Ty, _Alloc >, std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • _Myt : std::vector2< _Ty, _Alloc >, std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • _MyType : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • _Ty : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _Ty_check_fun_t : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _Ty_container : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _ValueType : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >
  • _Xran() : std::list2< _Ty, _Alloc >

- a -

  • Action() : mbo::MboWinMsgHandler, mbo::MboThread
  • add_if_new() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • add_if_prefix_match() : mbo::CStrList
  • AddHWND() : mbo::MboWinMsgHandler
  • AddMutex() : mbo::CLockMulti
  • AddRef() : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • address() : mbo::allocator< __ValueType, __ReferenceType >
  • Adj() : mbo::Matrix< _Ty, _Cols, _Rows >
  • Alloc() : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • allocate() : mbo::mem_reallocator< __ValueType >, mbo::allocator< __ValueType, __ReferenceType >
  • allocator : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • append() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • assign() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • at() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, std::list2< _Ty, _Alloc >

- b -

  • back() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • begin() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >

- c -

  • CalcTextRect() : mbo::MboDrawWin
  • capacity() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • CCriticalSectionImpl() : mbo::CCriticalSectionImpl
  • CEventFake() : mbo::CEventFake
  • CEventImpl() : mbo::CEventImpl
  • check_fun_t() : std::check_fun_t< _Tp, _Arg >
  • check_resize() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • CIniData() : mbo::CIniData
  • clear() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • ClearSection() : mbo::CIniData
  • CLock : mbo::CLock, mbo::CLockSingle
  • CLockMulti() : mbo::CLockMulti
  • CLockMulti::CLockMulti() : mbo::CLockMulti
  • CLockSingle() : mbo::CLockSingle
  • CMutexFake() : mbo::CMutexFake
  • CMutexImpl() : mbo::CMutexImpl
  • Cofactor() : mbo::Matrix< _Ty, _Cols, _Rows >
  • Cond() : mbo::Matrix< _Ty, _Cols, _Rows >
  • const_iterator() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • const_pointer : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >
  • const_reference : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >
  • const_reverse_iterator : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • construct() : mbo::allocator< __ValueType, __ReferenceType >
  • contains() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • contains_key() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • contains_no() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • CriticalSection : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel, mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • CStrList() : mbo::CStrList
  • CStrMapStr() : mbo::CStrMapStr
  • CUnlock : mbo::CUnlock, mbo::CLock

- d -

  • Dealloc() : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • deallocate() : mbo::mem_reallocator< __ValueType >, mbo::allocator< __ValueType, __ReferenceType >
  • DecEntered() : mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::IMutex
  • Decrement() : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel
  • delete_at() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • destroy() : mbo::allocator< __ValueType, __ReferenceType >
  • Det() : mbo::Matrix< _Ty, _Cols, _Rows >
  • difference_type : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >
  • DrawBitmap() : mbo::MboDrawWin
  • DrawCircle() : mbo::MboDrawWin
  • DrawEllipse() : mbo::MboDrawWin
  • DrawIcon() : mbo::MboDrawWin
  • DrawLine() : mbo::MboDrawWin
  • DrawPolygon() : mbo::MboDrawWin
  • DrawRect() : mbo::MboDrawWin
  • DrawSetMode() : mbo::MboDrawWin
  • DrawText() : mbo::MboDrawWin
  • dyn_create() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >

- e -

  • empty() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • end() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • Enter() : mbo::CUnlock, mbo::CLockMulti, mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::CCriticalSectionFake, mbo::CCriticalSectionImpl, mbo::CLock, mbo::CLockSingle, mbo::CLockFake, mbo::IMutex, mbo::ICriticalSection, mbo::ILock
  • erase() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • EThreadPriority : mbo::MboThread
  • EventModel : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel
  • Explode() : mbo::CStrList
  • ExplodeZZString() : mbo::CStrList

- f -

  • first_elem() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • first_key() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • ForceThreadName() : mbo::MboThread
  • front() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • full() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >

- g -

  • g_mhwndList : mbo::MboWinMsgHandler
  • g_vWndClassList : mbo::MboWinMsgHandler
  • GetBool() : mbo::CIniData
  • GetColor() : mbo::CIniData
  • GetCounter() : mbo::MboEventThread, mbo::MboIntervalThread
  • GetDelay() : mbo::MboDelayedEventThread
  • GetFilename() : mbo::CIniData
  • GetFloat() : mbo::CIniData
  • GetHandle() : mbo::MutexList, mbo::CMutexImpl, mbo::IMutex
  • GetHeight() : mbo::MboDrawWin
  • GetHWND() : mbo::MboWinMsgHandler
  • GetIniBool() : mbo::CIniData
  • GetIniColor() : mbo::CIniData
  • GetIniFloat() : mbo::CIniData
  • GetIniInt() : mbo::CIniData
  • GetIniLong() : mbo::CIniData
  • GetIniMap() : mbo::CIniData
  • GetIniString() : mbo::CIniData
  • GetInt() : mbo::CIniData
  • GetInterval() : mbo::MboIntervalThread
  • GetKeyNames() : mbo::CIniData
  • GetLevel() : mbo::CUnlock, mbo::CLockMulti, mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::CCriticalSectionFake, mbo::CCriticalSectionImpl, mbo::CLock, mbo::CLockSingle, mbo::CLockFake, mbo::ICriticalSection, mbo::ILock
  • GetList() : mbo::CLockMulti
  • GetLock() : mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::CCriticalSectionFake, mbo::CCriticalSectionImpl, mbo::IMutex, mbo::ICriticalSection
  • GetLong() : mbo::CIniData
  • GetMap() : mbo::CIniData
  • GetMaxSizeX() : mbo::MboDrawWin
  • GetMaxSizeY() : mbo::MboDrawWin
  • GetMinSizeX() : mbo::MboDrawWin
  • GetMinSizeY() : mbo::MboDrawWin
  • GetModuleHandle() : mbo::MboWinMsgHandler
  • GetPositionX() : mbo::MboDrawWin
  • GetPositionY() : mbo::MboDrawWin
  • GetScreenSizeX() : mbo::MboDrawWin
  • GetScreenSizeY() : mbo::MboDrawWin
  • GetSectionNames() : mbo::CIniData
  • GetSectionPrefix() : mbo::CIniData
  • GetSizeX() : mbo::MboDrawWin
  • GetSizeY() : mbo::MboDrawWin
  • GetString() : mbo::CIniData
  • GetThreadId() : mbo::MboThread
  • GetThreadName() : mbo::MboThread
  • GetWidth() : mbo::MboDrawWin

- i -

  • IncEntered() : mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::IMutex
  • Increment() : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel
  • IniDataGetLock() : mbo::CIniData
  • insert_at() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • insert_elem() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • IsDiagonal() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsLowerTiangular() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsNull() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsRunning() : mbo::MboThread
  • IsScalar() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsSignaled() : mbo::MboEventThread
  • IsSingular() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsSkewSymmetric() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsSquare() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsStopping() : mbo::MboThread
  • IsSymmetric() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsUnit() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsUpperTiangular() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsWindow() : mbo::MboDrawWin
  • IsWindowVisible() : mbo::MboDrawWin
  • IsWndSizeable() : mbo::MboDrawWin
  • IsWndSizingOrMoving() : mbo::MboDrawWin
  • iterator() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator

- k -

  • KeyNameExists() : mbo::CIniData
  • keys() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • KillThread() : mbo::MboThread

- l -

  • Leave() : mbo::CUnlock, mbo::CLockMulti, mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::CCriticalSectionFake, mbo::CCriticalSectionImpl, mbo::CLock, mbo::CLockSingle, mbo::CLockFake, mbo::ICriticalSection, mbo::ILock
  • limit() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • Lock : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel
  • LockedVar() : mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • LockMulti : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel
  • LockSingle : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel

- m -

  • m_acValues : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • m_alloc : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • m_array : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • m_bInSizeMove : mbo::MboDrawWin
  • m_cs : mbo::CCriticalSectionImpl
  • m_dwThreadId : mbo::MboThread
  • m_hDelay : mbo::MboDelayedEventThread
  • m_hEvent : mbo::MboEventThread, mbo::CEventImpl
  • m_hIsStopping : mbo::MboThread
  • m_hMemDC : mbo::MboDrawWin
  • m_hMutex : mbo::CMutexImpl
  • m_hScrDC : mbo::MboDrawWin
  • m_hThread : mbo::MboThread
  • m_hwnd : mbo::MboWinMsgHandler
  • m_lEntered : mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl
  • m_lLevel : mbo::CUnlock
  • m_lx : mbo::CUnlock
  • m_mx : mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • m_mxDelay : mbo::MboDelayedEventThread
  • m_mxIniData : mbo::CIniData
  • m_mxStartStop : mbo::MboThread
  • m_nAppend : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • m_nCapacity : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • m_nCounter : mbo::MboEventThread, mbo::MboIntervalThread
  • m_nDelay : mbo::MboDelayedEventThread
  • m_nHeight : mbo::MboDrawWin
  • m_nInterval : mbo::MboIntervalThread
  • m_nMaxSize : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • m_nMaxSizeX : mbo::MboDrawWin
  • m_nMaxSizeY : mbo::MboDrawWin
  • m_nMinSizeX : mbo::MboDrawWin
  • m_nMinSizeY : mbo::MboDrawWin
  • m_nPos : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • m_nSize : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • m_nSizeX : mbo::MboDrawWin
  • m_nSizeY : mbo::MboDrawWin
  • m_nWidth : mbo::MboDrawWin
  • m_plx : mbo::CLock
  • m_pmx : mbo::CLock, mbo::CLockSingle
  • m_pos : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator
  • m_strFilename : mbo::CIniData
  • m_strSectionPrefix : mbo::CIniData
  • m_strWndClassName : mbo::MboWinMsgHandler
  • m_szThreadName : mbo::MboThread
  • m_vpme : mbo::CLockMulti
  • MAP_HWND : mbo::MboWinMsgHandler
  • Matrix() : mbo::Matrix< _Ty, _Cols, _Rows >
  • MatrixException() : mbo::MatrixException
  • max_size() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >
  • maxSize() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >
  • MboDelayedEventThread : mbo::MboDelayedEventThread, mbo::MboEventThread
  • MboDrawWin() : mbo::MboDrawWin
  • MboEventThread() : mbo::MboEventThread
  • MboIntervalThread() : mbo::MboIntervalThread
  • MboThread() : mbo::MboThread
  • MboThreadProc : mbo::MboThread
  • MboWinMsgHandler() : mbo::MboWinMsgHandler
  • MboWndProc : mbo::MboWinMsgHandler
  • MessageHandler() : mbo::MboWinMsgHandler
  • move() : mbo::mem_reallocator< __ValueType >, mbo::reallocator< __ValueType >
  • MutexList : mbo::MutexList, mbo::IMutex
  • MutexModel : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel
  • mx : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >

- n -

  • nextElement() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >
  • Norm() : mbo::Matrix< _Ty, _Cols, _Rows >
  • Null() : mbo::Matrix< _Ty, _Cols, _Rows >
  • NullPtr : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • nullptr_access() : mbo::NullPointer< _Ty >::nullptr_access
  • numCols() : mbo::Matrix< _Ty, _Cols, _Rows >
  • numRows() : mbo::Matrix< _Ty, _Cols, _Rows >

- o -

  • OnButtonDblClk() : mbo::MboDrawWin
  • OnButtonDown() : mbo::MboDrawWin
  • OnButtonUp() : mbo::MboDrawWin
  • OnThreadStart() : mbo::MboThread
  • OnThreadStop() : mbo::MboThread
  • OnWindowCreated() : mbo::MboWinMsgHandler, mbo::MboDrawWin
  • OnWndSized() : mbo::MboDrawWin
  • operator * : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::NullPointer< _Ty >, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator *=() : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator bool() : std::vector2< _Ty, _Alloc >, mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::NullPointer< _Ty >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • operator const T() : mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • operator T() : mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • operator! : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator!= : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator()() : mbo::less_cstr_ic, mbo::Matrix< _Ty, _Cols, _Rows >, std::check_fun_t< _Tp, _Arg >
  • operator+() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator++() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator+=() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator-() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator--() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator-=() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator->() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • operator/ : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator/=() : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator<() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator<< : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator<=() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator=() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::CStrList, mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::Matrix< _Ty, _Cols, _Rows >, mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • operator== : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator>() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator>=() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator>> : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator[]() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >, std::list2< _Ty, _Alloc >
  • operator^ : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator^=() : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator~ : mbo::Matrix< _Ty, _Cols, _Rows >
  • other : mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other >

- p -

  • pData : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • PeekValue() : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel
  • pivot() : mbo::Matrix< _Ty, _Cols, _Rows >
  • pointer : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >
  • pop_back() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • pop_front() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • position() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • PostMessage() : mbo::MboWinMsgHandler
  • pRep : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • PRIORITY_CRITICAL : mbo::MboThread
  • PRIORITY_HIGH : mbo::MboThread
  • PRIORITY_HIGHEST : mbo::MboThread
  • PRIORITY_IDLE : mbo::MboThread
  • PRIORITY_LOW : mbo::MboThread
  • PRIORITY_LOWEST : mbo::MboThread
  • PRIORITY_NORMAL : mbo::MboThread
  • ProcessDefault() : mbo::MboWinMsgHandler
  • ProcessMessage() : mbo::MboWinMsgHandler, mbo::MboDrawWin
  • Pulse() : mbo::CEventFake, mbo::CEventImpl, mbo::IEvent
  • push_back() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • push_front() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >

- r -

  • rbegin() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • ReadBool() : mbo::CIniData
  • ReadColor() : mbo::CIniData
  • ReadFloat() : mbo::CIniData
  • ReadInt() : mbo::CIniData
  • ReadLong() : mbo::CIniData
  • ReadMap() : mbo::CIniData
  • ReadString() : mbo::CIniData
  • reallocate() : mbo::mem_reallocator< __ValueType >, mbo::reallocator< __ValueType >
  • refCnt : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • RefCntPtr() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • RefCntRep() : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • reference : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >
  • Release() : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • rend() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • Rep : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • reserve() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • reset() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >
  • Reset() : mbo::CEventFake, mbo::CEventImpl, mbo::IEvent
  • resize() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • reverse_iterator : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >

- s -

  • Scan() : mbo::CStrMapStr
  • SectionExists() : mbo::CIniData
  • select() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • Set() : mbo::CEventFake, mbo::CEventImpl, mbo::IEvent
  • SetDelay() : mbo::MboDelayedEventThread
  • SetEvent() : mbo::MboEventThread
  • SetInterval() : mbo::MboIntervalThread
  • SetThreadName() : mbo::MboThread
  • SetThreadPriority() : mbo::MboThread
  • size() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::CLockMulti
  • size_type : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >
  • Solve() : mbo::Matrix< _Ty, _Cols, _Rows >
  • sort() : std::vector2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • Start() : mbo::MboThread
  • Stop() : mbo::MboWinMsgHandler, mbo::MboDelayedEventThread, mbo::MboEventThread, mbo::MboThread
  • string_conversion_error() : mbo::string_conversion_error

- t -

  • t : mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • TDynamicArray() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • ThreadProc() : mbo::MboDelayedEventThread, mbo::MboEventThread, mbo::MboIntervalThread, mbo::MboThread
  • ThreadProcCaller() : mbo::MboThread
  • ToCStr() : mbo::CStrMapStr, mbo::CStrList
  • Try() : mbo::CLockMulti, mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::IMutex
  • TStaticArray() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >
  • Type : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >

- u -

  • Unit() : mbo::Matrix< _Ty, _Cols, _Rows >
  • Unlock : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel

- v -

  • Val : mbo::Matrix< _Ty, _Cols, _Rows >
  • value_type : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >
  • values() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >

- w -

  • Wait() : mbo::CEventFake, mbo::CEventImpl, mbo::IEvent
  • WaitFor() : mbo::MboThread
  • WndCalcMetrics() : mbo::MboWinMsgHandler, mbo::MboDrawWin
  • WndClassList : mbo::MboWinMsgHandler
  • WndClassName() : mbo::MboWinMsgHandler
  • WndClear() : mbo::MboDrawWin
  • WndCreate() : mbo::MboWinMsgHandler, mbo::MboDrawWin
  • WndDestroy() : mbo::MboWinMsgHandler, mbo::MboDrawWin
  • WndDraw() : mbo::MboDrawWin
  • WndHide() : mbo::MboDrawWin
  • WndLoadExtent() : mbo::MboDrawWin
  • WndRegister() : mbo::MboWinMsgHandler
  • WndRegisterHandle() : mbo::MboDrawWin
  • WndRestore() : mbo::MboDrawWin
  • WndSaveExtent() : mbo::MboDrawWin
  • WndSetIconBig() : mbo::MboDrawWin
  • WndSetIconBoth() : mbo::MboDrawWin
  • WndSetIconSmall() : mbo::MboDrawWin
  • WndSetPosition() : mbo::MboDrawWin
  • WndSetSize() : mbo::MboDrawWin
  • WndSetTitle() : mbo::MboDrawWin
  • WndShow() : mbo::MboDrawWin
  • WndTitleText() : mbo::MboWinMsgHandler
  • WndUpdate() : mbo::MboDrawWin
  • WriteBool() : mbo::CIniData
  • WriteColor() : mbo::CIniData
  • WriteFloat() : mbo::CIniData
  • WriteInt() : mbo::CIniData
  • WriteLong() : mbo::CIniData
  • WriteMap() : mbo::CIniData
  • WriteString() : mbo::CIniData

- ~ -

  • ~CCriticalSectionImpl() : mbo::CCriticalSectionImpl
  • ~CIniData() : mbo::CIniData
  • ~CLock() : mbo::CLock
  • ~CLockMulti() : mbo::CLockMulti
  • ~CLockSingle() : mbo::CLockSingle
  • ~CMutexImpl() : mbo::CMutexImpl
  • ~CStrList() : mbo::CStrList
  • ~CStrMap() : mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc >
  • ~CStrMapStr() : mbo::CStrMapStr
  • ~CUnlock() : mbo::CUnlock
  • ~ICriticalSection() : mbo::ICriticalSection
  • ~IEvent() : mbo::IEvent
  • ~ILock() : mbo::ILock
  • ~MboDelayedEventThread() : mbo::MboDelayedEventThread
  • ~MboDrawWin() : mbo::MboDrawWin
  • ~MboEventThread() : mbo::MboEventThread
  • ~MboIntervalThread() : mbo::MboIntervalThread
  • ~MboThread() : mbo::MboThread
  • ~MboWinMsgHandler() : mbo::MboWinMsgHandler
  • ~MutexList() : mbo::MutexList
  • ~RefCntPtr() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • ~TDynamicArray() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Namespace Index

mbo Namespace List

Here is a list of all namespaces with brief descriptions:
mbo | Utility classes and functions by M. Börger
mbo::MultiThreaded | A namespace consistent of classes used in/for multithreaded environments
mbo::SingleThreaded | A namespace consistent of classes used in/for NON multithreaded environments
std |
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo Namespace Reference

mbo Namespace Reference

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

Classes

class | mbo::allocator< __ValueType, __ReferenceType >
Allocator base using uninitalized memory. More...
struct | mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other >
class | mbo::CCriticalSectionFake
Critical Section Fake. More...
class | mbo::CCriticalSectionImpl
Critical Section Implementation. More...
class | mbo::CEventFake
Event emulation. More...
class | mbo::CEventImpl
Event implementation. More...
class | mbo::CIniData
Storage/Retrieval of Initialisation data. More...
class | mbo::CLock
class | mbo::CLockFake
Fake Lock implementation. More...
class | mbo::CLockMulti
Multi-Lock implementation. More...
class | mbo::CLockSingle
Single-Lock implementation. More...
class | mbo::CMutexFake
Mutex emulation. More...
class | mbo::CMutexImpl
Mutex implementation. More...
class | mbo::CStrList
default CStr container More...
class | mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc >
map2 using CStr as Key type (case insenstive) More...
class | mbo::CStrMapStr
map2 using CStr as Key type (case insensitive) and as Value type More...
class | mbo::CUnlock
Automatic local Lock unlock. More...
class | mbo::ICriticalSection
Critical Section Interface. More...
class | mbo::IEvent
Event implementation. More...
class | mbo::ILock
Lock interface. More...
class | mbo::IMutex
Mutex Interface. More...
struct | mbo::less_cstr_ic
case insensitive prediction function based on CStr More...
class | mbo::LockedVar< T, _THREAD_MODEL >
locked variable More...
class | mbo::LockedVar< bool, ThreadModel >
locked boolean variable More...
class | mbo::Matrix< _Ty, _Cols, _Rows >
Matrix class. More...
class | mbo::MatrixException
Matrix exception class. More...
class | mbo::MboDelayedEventThread
An event driven thread implementation. More...
class | mbo::MboDrawWin
A draw window independant from main application. More...
class | mbo::MboEventThread
An event driven thread implementation. More...
class | mbo::MboIntervalThread
An interval thread implementation. More...
class | mbo::MboThread
A basic thread implementation. More...
class | mbo::MboWinMsgHandler
Windows message handler thread. More...
class | mbo::mem_reallocator< __ValueType >
Allocator that supports reallocation working on malloc(). More...
class | mbo::MutexList
MutexList implementation. More...
class | mbo::NullPointer< _Ty >
Incomplete null pointer type. More...
class | mbo::NullPointer< _Ty >::nullptr_access
exception for null-pointer access violations More...
class | mbo::reallocator< __ValueType >
Allocator that supports reallocation. More...
class | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
Reference counted pointer. More...
struct | mbo::RefCntRep< _Ty, _THREAD_MODEL >
Reference counted pointer representation. More...
class | mbo::string_conversion_error
class | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
dynamic array More...
class | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
constant bidirectional iterator More...
class | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator
bidirectional iterator (non const) More...
class | mbo::ThreadModel
automatic selection of correct thread model More...
class | mbo::Vector< _Ty, _Cols >

Typedefs

typedef ThreadModel::CriticalSection | CriticalSection
typedef ThreadModel::EventModel | EventModel
typedef LONG | IncDecVal
typedef ThreadModel::Lock | Lock
typedef ThreadModel::LockMulti | LockMulti
typedef ThreadModel::LockSingle | LockSingle
typedef mbo::tstring | MboString
typedef MultiThreaded::ThreadModel | MultiThreadedModel
typedef ThreadModel::MutexModel | MutexModel
typedef SingleThreaded::ThreadModel | SingleThreadedModel
typedef char | TCHAR
typedef SingleThreaded::ThreadModel | ThreadModel
typedef std::basic_string<
TCHAR > 		tstring
typedef ThreadModel::Unlock | Unlock

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<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr,
_A > 		LeftString (const std::basic_string< _E, _Tr, _A > &str, std::basic_string< _E, _Tr, _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>
std::basic_string< _E, _Tr,
_A > 		LeftString (const std::basic_string< _E, _Tr, _A > &str, std::basic_string< _E, _Tr, _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, std::basic_string< _E, _Tr, _A >::size_type nLength, const std::basic_string< _E, _Tr, _A > *strMore=0, const std::basic_string< _E, _Tr, _A > *strAppend=0)
RECT | NormalizeRect (RECT rect)
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 _Ty, size_t _Cols, size_t _Rows>
istream & | operator>> (istream &in, Matrix< _Ty, _Cols, _Rows > &m)
MboString & | StrApplyReplaceMap (MboString &str, const mbo::CStrMapStr &msstrReplaceMap)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr,
_A > 		StrCreate (const char *sz)
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<>
std::basic_string< char > | StrFrom (const bool &val)
template<>
std::basic_string< char > | StrFrom (const long &val)
template<>
std::basic_string< char > | StrFrom (const int &val)
template<class _E, typename _ValType>
std::basic_string< _E > | StrFrom (const _ValType &val)
template<class _E>
std::basic_string< _E > | StrFromBool (bool val)
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 _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, class _Tr, class _A>
std::basic_string< _E, _Tr,
_A > & 		StrLower (std::basic_string< _E, _Tr, _A > &str)
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 > & 		StrParseEnvVars (std::basic_string< _E, _Tr, _A > &str)
template<class _E, class _Tr, class _A>
void | 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>
bool | StrStartsWith (const std::basic_string< _E, _Tr, _A > &str, const std::basic_string< _E, _Tr, _A > &strPrefix, bool bCaseSensitive=true)
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>
COLORREF | StrToColor (const std::basic_string< _E, _Tr, _A > &str, COLORREF colDefault)
template<>
float | StrToFloat (const std::basic_string< char > &str)
template<class _E, class _Tr, class _A>
float | StrToFloat (const std::basic_string< _E, _Tr, _A > &str)
template<>
int | StrToInt (const std::basic_string< char > &str)
template<class _E, class _Tr, class _A>
int | StrToInt (const std::basic_string< _E, _Tr, _A > &str)
template<>
long | StrToLong (const std::basic_string< char > &str)
template<class _E, class _Tr, class _A>
long | StrToLong (const std::basic_string< _E, _Tr, _A > &str)
std::basic_string< wchar_t > | StrToWStr (const std::basic_string< char > &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, 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 > 		StrUCFirst (const std::basic_string< _E, _Tr, _A > &str)
template<class _E, class _Tr, class _A>
std::basic_string< _E, _Tr,
_A > & 		StrUpper (std::basic_string< _E, _Tr, _A > &str)
mbo::tstring | TStrCreate (const char *sz)
template<typename _ValType>
tstring | TStrFrom (const _ValType &val)
std::basic_string< char > | WStrToStr (const std::basic_string< wchar_t > &wstr)

Variables

return | true

Detailed Description

Utility classes and functions by M. Börger.

Note:
This namespace contains software distributed under the following license Mbo License.

Typedef Documentation

typedef ThreadModel::CriticalSection mbo::CriticalSection

Critical Section

typedef ThreadModel::EventModel mbo::EventModel

Event

typedef LONG mbo::IncDecVal

incrementation/decrementation type

typedef ThreadModel::Lock mbo::Lock

Automatic local Lock

typedef ThreadModel::LockMulti mbo::LockMulti

Multi Lock

typedef ThreadModel::LockSingle mbo::LockSingle

Single Lock

typedef mbo::tstring mbo::MboString

typedef MultiThreaded::ThreadModel mbo::MultiThreadedModel

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

typedef ThreadModel::MutexModel mbo::MutexModel

Mutex

typedef SingleThreaded::ThreadModel mbo::SingleThreadedModel

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

typedef char mbo::TCHAR

typedef SingleThreaded::ThreadModel mbo::ThreadModel

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

typedef ThreadModel::Unlock mbo::Unlock

Automatic local Lock unlock

Enumeration Type Documentation

enum DRAW_MODE

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

Enumeration values:
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

Function Documentation

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

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

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

RECT NormalizeRect ( RECT rect ) [inline, static]

Normalize window coordinates

Parameters:
rect
Returns:
normalized rect (right > left, bottom > top)

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 _Ty, size_t _Cols, size_t _Rows>
istream& operator>> | ( | istream & | in,
 |  | Matrix< _Ty, _Cols, _Rows > & | m
 | ) |

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

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

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
 | ) | [inline]

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

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

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

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

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

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 _E>
std::basic_string<_E> StrFromDouble | ( | double | val,
 |  | int | iWidth = -16,
 |  | int | iPrecision = 10
 | ) | [inline]

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

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

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

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

template<class _E, class _Tr, class _A>
void 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]

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
 | ) | [inline]

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

template<class _E, class _Tr, class _A>
COLORREF StrToColor | ( | const std::basic_string< _E, _Tr, _A > & | str,
 |  | COLORREF | colDefault
 | ) |

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

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

template<>
int StrToInt ( const std::basic_string< char > & str ) [inline]

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

template<>
long StrToLong ( const std::basic_string< char > & str ) [inline]

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

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

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

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

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

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

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

mbo::tstring TStrCreate ( const char * sz )

template<typename _ValType>
tstring TStrFrom ( const _ValType & val )

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

Variable Documentation

return mbo::true

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::MultiThreaded Namespace Reference

mbo::MultiThreaded Namespace Reference

A namespace consistent of classes used in/for multithreaded environments. More...

Classes

class mbo::MultiThreaded::ThreadModel
Class that defines types to be used in/for thread-safe environments. More...

Detailed Description

A namespace consistent of classes used in/for multithreaded environments.
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: mbo::SingleThreaded Namespace Reference

mbo::SingleThreaded Namespace Reference

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

Classes

class mbo::SingleThreaded::ThreadModel
Class that defines types to use in/for NON multithreaded environments. More...

Detailed Description

A namespace consistent of classes used in/for NON multithreaded environments.
Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: std Namespace Reference

std Namespace Reference

Classes

class | std::check_fun_t< _Tp, _Arg >
binary function adaptor for check functions used by map2 More...
class | std::deque2< _Ty, _Alloc >
expanded deque template class More...
class | std::list2< _Ty, _Alloc >
expanded list template class More...
class | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
expanded map template class More...
class | std::vector2< _Ty, _Alloc >
expanded vector template class More...

Functions

template<class _Tp, class _Arg>
check_fun_t< _Tp, _Arg > | check_fun (bool(_Tp::*__f)(const _Arg &) const)

Function Documentation

template<class _Tp, class _Arg>
check_fun_t<_Tp,_Arg> check_fun ( bool(_Tp::*)(const _Arg &) const __f )

Helper function to build parameters for map2.values(check_fun_t).

See also:
std::check_fun_t
Parameters:
_Tp | type of instances to execute the function
_Arg | type of function arguments
__f | method accessible in _Tp to be used as check function
Returns:
created check function that will return the result of the function

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Module Index

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

mbo Modules

Here is a list of all modules:
  • MBO
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: MBO

MBO

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

Files

file | deque2.h
file | enumset.hpp
file | list2.h
file | map2.h
file | Mbo.h
file | MboDrawWin.h
file | MboIniData.h
file | MboLockedVar.h
file | MboRefCntPtr.h
file | MboStrHelper.h
file | MboStrList.h
file | MboStrMap.h
file | MboSynch.h
file | MboThread.h
file | MboTString.h
file | reallocator.h
file | TDynamicArray.h
file | vector2.h

Detailed Description

Utility classes and functions by M. Börger.

Note:
This mudule is distributed under the following license Mbo License.

You must compile this source with RTTI enabled.

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: File Members

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines
_ | c | d | e | i | l | m | n | o | r | s | t | u | w

Here is a list of all file members with links to the files they belong to:

- _ -

  • __DEPRECATED : TDynamicArray.h
  • __THROW2 : Mbo.h
  • __THROWS : Mbo.h
  • __USE_FACET : MboTString.h
  • _TS : MboTString.h
  • _Ty_args_default : enumset.hpp
  • _Ty_list_default : enumset.hpp

- c -

  • check_fun() : map2.h
  • CriticalSection : MboSynch.h
  • CStrListContainer : MboStrList.h

- d -

  • DebugBreak : Mbo.h
  • DEPRECATED : Mbo.h
  • DRAW_MODE : MboDrawWin.h
  • DRAW_MODE_FILL : MboDrawWin.h
  • DRAW_MODE_HS_BDIAGONAL : MboDrawWin.h
  • DRAW_MODE_HS_CROSS : MboDrawWin.h
  • DRAW_MODE_HS_DIAGCROSS : MboDrawWin.h
  • DRAW_MODE_HS_FDIAGONAL : MboDrawWin.h
  • DRAW_MODE_HS_HORIZONTAL : MboDrawWin.h
  • DRAW_MODE_HS_VERTICAL : MboDrawWin.h
  • DRAW_MODE_TRANSPARENT : MboDrawWin.h

- e -

  • EventModel : MboSynch.h

- i -

  • IncDecVal : MboSynch.h

- l -

  • LeftString() : MboStrHelper.h
  • Lock : MboSynch.h
  • LockMulti : MboSynch.h
  • LockSingle : MboSynch.h

- m -

  • MAP_CONTAINER : map2.h
  • max : MboMatrix.h
  • MBO_API : Mbo.h
  • MBO_MAP2_CONST_ARRAY_ACCESS : map2.h
  • MBO_MEMBER_MUTEX_IMPL : MboSynch.h
  • MBO_MULTI_LOCK_SLEEPTIME : MboSynch.h
  • MBO_TDA_STL_ITERATOR : TDynamicArray.h
  • mbo_tda_throw_if_not : TDynamicArray.h
  • MBO_TDA_VERIFY : TDynamicArray.h
  • mbo_throw_if_not : Mbo.h
  • MBO_THROWS_EXCEPTIONS : Mbo.h
  • MboString : MboTString.h
  • MboStrList0 : MboStrList.h
  • MboStrList1 : MboStrList.h
  • MboStrList2 : MboStrList.h
  • MboStrList3 : MboStrList.h
  • MboStrList4 : MboStrList.h
  • MboStrList5 : MboStrList.h
  • min : MboMatrix.h
  • MultiThreadedModel : MboSynch.h
  • MutexModel : MboSynch.h

- n -

  • NormalizeRect() : MboDrawWin.h

- o -

  • operator *() : MboMatrix.h
  • operator!() : MboMatrix.h
  • operator!=() : MboMatrix.h
  • operator+() : MboMatrix.h
  • operator-() : MboMatrix.h
  • operator<<() : MboMatrix.h
  • operator==() : MboMatrix.h
  • operator>>() : MboMatrix.h
  • operator^() : MboMatrix.h
  • operator~() : MboMatrix.h

- r -

  • RGB_BLACK : MboDrawWin.h
  • RGB_BLUE : MboDrawWin.h
  • RGB_BROWN : MboDrawWin.h
  • RGB_CYAN : MboDrawWin.h
  • RGB_GRAY : MboDrawWin.h
  • RGB_GREEN : MboDrawWin.h
  • RGB_HINT : MboDrawWin.h
  • RGB_LTBLUE : MboDrawWin.h
  • RGB_LTCYAN : MboDrawWin.h
  • RGB_LTGRAY : MboDrawWin.h
  • RGB_LTGREEN : MboDrawWin.h
  • RGB_LTMAGENTA : MboDrawWin.h
  • RGB_LTRED : MboDrawWin.h
  • RGB_MAGENTA : MboDrawWin.h
  • RGB_RED : MboDrawWin.h
  • RGB_WHITE : MboDrawWin.h
  • RGB_YELLOW : MboDrawWin.h

- s -

  • SingleThreadedModel : MboSynch.h
  • snprintf : MboStrHelper.h
  • StrApplyReplaceMap() : MboStrMap.h
  • StrCreate() : MboTString.h
  • StrEndsWith() : MboStrHelper.h
  • StrFrom() : MboStrHelper.h
  • StrFromBool() : MboStrHelper.h
  • StrFromColor() : MboIniData.h
  • StrFromDouble() : MboStrHelper.h
  • StrFromFloat() : MboStrHelper.h
  • StrLower() : MboStrHelper.h
  • StrOccurences() : MboStrHelper.h
  • StrParseEnvVars() : MboStrHelper.h
  • StrSplit() : MboStrHelper.h
  • StrStartsWith() : MboStrHelper.h
  • StrTo() : MboStrHelper.h
  • StrToColor() : MboIniData.h
  • StrToFloat() : MboStrHelper.h
  • StrToInt() : MboStrHelper.h
  • StrToLong() : MboStrHelper.h
  • StrToWStr() : MboTString.h
  • StrTrim() : MboStrHelper.h
  • StrTrimLeft() : MboStrHelper.h
  • StrTrimRight() : MboStrHelper.h
  • StrUCFirst() : MboStrHelper.h
  • StrUpper() : MboStrHelper.h

- t -

  • TCHAR : MboTString.h
  • ThreadModel : MboSynch.h
  • throw_runtime_error_if_not : TStaticArray.h
  • true : MboMatrix.h
  • TStrCreate() : MboTString.h
  • TStrFrom() : MboTString.h
  • tstring : MboTString.h

- u -

  • Unlock : MboSynch.h

- w -

  • WStrToStr() : MboTString.h
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: Namespace Members

All | Functions | Variables | Typedefs | Enumerations | Enumeration values
c | d | e | i | l | m | n | o | s | t | u | w

Here is a list of all namespace members with links to the namespace documentation for each member:

- c -

  • check_fun() : std
  • CriticalSection : mbo

- d -

  • DRAW_MODE : mbo
  • DRAW_MODE_FILL : mbo
  • DRAW_MODE_HS_BDIAGONAL : mbo
  • DRAW_MODE_HS_CROSS : mbo
  • DRAW_MODE_HS_DIAGCROSS : mbo
  • DRAW_MODE_HS_FDIAGONAL : mbo
  • DRAW_MODE_HS_HORIZONTAL : mbo
  • DRAW_MODE_HS_VERTICAL : mbo
  • DRAW_MODE_TRANSPARENT : mbo

- e -

  • EventModel : mbo

- i -

  • IncDecVal : mbo

- l -

  • LeftString() : mbo
  • Lock : mbo
  • LockMulti : mbo
  • LockSingle : mbo

- m -

  • MboString : mbo
  • MultiThreadedModel : mbo
  • MutexModel : mbo

- n -

  • NormalizeRect() : mbo

- o -

  • operator<<() : mbo
  • operator==() : mbo
  • operator>>() : mbo

- s -

  • SingleThreadedModel : mbo
  • StrApplyReplaceMap() : mbo
  • StrCreate() : mbo
  • StrEndsWith() : mbo
  • StrFrom() : mbo
  • StrFromBool() : mbo
  • StrFromColor() : mbo
  • StrFromDouble() : mbo
  • StrFromFloat() : mbo
  • StrLower() : mbo
  • StrOccurences() : mbo
  • StrParseEnvVars() : mbo
  • StrSplit() : mbo
  • StrStartsWith() : mbo
  • StrTo() : mbo
  • StrToColor() : mbo
  • StrToFloat() : mbo
  • StrToInt() : mbo
  • StrToLong() : mbo
  • StrToWStr() : mbo
  • StrTrim() : mbo
  • StrTrimLeft() : mbo
  • StrTrimRight() : mbo
  • StrUCFirst() : mbo
  • StrUpper() : mbo

- t -

  • TCHAR : mbo
  • ThreadModel : mbo
  • true : mbo
  • TStrCreate() : mbo
  • TStrFrom() : mbo
  • tstring : mbo

- u -

  • Unlock : mbo

- w -

  • WStrToStr() : mbo
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: Page Index

mbo Related Pages

Here is a list of all related documentation pages:
  • enumset License
  • Mbo License
  • Deprecated List
  • Todo List
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: enumset License

enumset License

* Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
*    notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
*    notice, this list of conditions and the following disclaimer in
*    the documentation and/or other materials provided with the
*    distribution.
*
* 3. All advertising materials mentioning features or use of this
*    software must display the following acknowledgment:
*    "This product includes software developed by Marcus Boerger
*    (http://marcus-boerger.de/)."
*
* 4. The name "Marcus Boerger" must not be used to endorse or promote
*    products derived from this software without prior written permission.
*
* 5. Redistributions of any form whatsoever must retain the following
*    acknowledgment:
*    "This product includes software developed by Marcus Boerger
*    (http://marcus-boerger.de/)."
*
* 6. This is only intended to be used with enum or scalar types.
*
* THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Mbo License

Mbo License

* Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
*
* Redistribution and use in source, binary or any other forms,  with
* or without modification requires prior permission by Marcus Boerger
* (http://marcus-boerger.de). When permission is granted the following
* conditions must be met:
*
* 1. Redistributions of source code must retain the above copyright
*    notice, this list of conditions and the following disclaimer.
*    Redistribution in any form requires prior permission.
*
* 2. All advertising materials mentioning features or use of this
*    software must display the following acknowledgment:
*    "This product includes software developed by Marcus Boerger
*    (http://marcus-boerger.de/)."
*
* 3. The name "Marcus Boerger" must not be used to endorse or promote
*    products derived from this software without prior written permission.
*
* 4. Redistributions of any form whatsoever must retain the following
*    acknowledgment:
*    "This product includes software developed by Marcus Boerger
*    (http://marcus-boerger.de/)."
*    Redistribution in any form requires prior permission.
*
* THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Deprecated List

Deprecated List

Member mbo::TDynamicArray::const_iterator::operator++ (int)
use prefix operator++()

Member mbo::TDynamicArray::const_iterator::operator-- (int)
use prefix operator--()

Member mbo::TDynamicArray::iterator::operator++ (int)
use prefix operator++()

Member mbo::TDynamicArray::iterator::operator-- (int)
use prefix operator--()
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Todo List

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Todo List

Class std::vector2< _Ty, _Alloc >
The vector2(_Count) & vector2(_Count, _Val) constructors do not exist.
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Alphabetical List

mbo Class Index

A | B | C | D | E | I | L | M | N | R | S | T | V

A
CUnlock (mbo) LockedVar< bool, ThreadModel > (mbo) RefCntRep (mbo)
allocator (mbo)
D
M
runtime_error (std)
allocator::rebind (mbo) deque map runtime_error (std)
B
deque2 (std) map2 (std)
S
binary_function (std)
E
Matrix (mbo) string_conversion_error (mbo)
C
exception (std) MatrixException (mbo)
T
CCriticalSectionFake (mbo)
I
MboDelayedEventThread (mbo) TDynamicArray (mbo)
CCriticalSectionImpl (mbo) ICriticalSection (mbo) MboDrawWin (mbo) TDynamicArray::const_iterator (mbo)
CEventFake (mbo) IEvent (mbo) MboEventThread (mbo) TDynamicArray::iterator (mbo)
CEventImpl (mbo) ILock (mbo) MboIntervalThread (mbo) ThreadModel (mbo::MultiThreaded)
check_fun_t (std) IMutex (mbo) MboThread (mbo) ThreadModel (mbo)
CIniData (mbo) iterator (std) MboWinMsgHandler (mbo) ThreadModel (mbo::SingleThreaded)
CLock (mbo) iterator (std) mem_reallocator (mbo) TStaticArray
CLockFake (mbo) iterator (std) MutexList (mbo) TStaticArray::const_iterator
CLockMulti (mbo) iterator (std)
N
TStaticArray::iterator
CLockSingle (mbo)
L
NullPointer (mbo)
V
CMutexFake (mbo) less_cstr_ic (mbo) NullPointer::nullptr_access (mbo) vector (std)
CMutexImpl (mbo) list
R
Vector (mbo)
CStrList (mbo) list2 (std) reallocator (mbo) vector
CStrMap (mbo) LockedVar (mbo) RefCntPtr (mbo) vector2 (std)
CStrMapStr (mbo)

A | B | C | D | E | I | L | M | N | R | S | T | V

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::allocator< __ValueType, __ReferenceType > Member List

This is the complete list of members for mbo::allocator< __ValueType, __ReferenceType >, including all inherited members.

address(reference ref) | mbo::allocator< __ValueType, __ReferenceType > | [inline]
address(const_reference ref) | mbo::allocator< __ValueType, __ReferenceType > | [inline]
allocate(size_type size, allocator< void, char >::const_pointer hint=0L) | mbo::allocator< __ValueType, __ReferenceType > | [inline]
const_pointer typedef | mbo::allocator< __ValueType, __ReferenceType > |
const_reference typedef | mbo::allocator< __ValueType, __ReferenceType > |
construct(pointer ptr, const_reference oth) | mbo::allocator< __ValueType, __ReferenceType > | [inline]
deallocate(pointer ptr, size_type size) | mbo::allocator< __ValueType, __ReferenceType > | [inline]
destroy(pointer ptr) | mbo::allocator< __ValueType, __ReferenceType > | [inline]
difference_type typedef | mbo::allocator< __ValueType, __ReferenceType > |
max_size() const | mbo::allocator< __ValueType, __ReferenceType > | [inline]
pointer typedef | mbo::allocator< __ValueType, __ReferenceType > |
reference typedef | mbo::allocator< __ValueType, __ReferenceType > |
size_type typedef | mbo::allocator< __ValueType, __ReferenceType > |
value_type typedef | mbo::allocator< __ValueType, __ReferenceType > |

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CCriticalSectionFake Member List

This is the complete list of members for mbo::CCriticalSectionFake, including all inherited members.

Enter() const | mbo::CCriticalSectionFake | [inline, virtual]
GetLevel() const | mbo::CCriticalSectionFake | [inline, virtual]
GetLock() const | mbo::CCriticalSectionFake | [inline, virtual]
Leave() const | mbo::CCriticalSectionFake | [inline, virtual]
~ICriticalSection() | mbo::ICriticalSection | [inline, virtual]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CCriticalSectionImpl Member List

This is the complete list of members for mbo::CCriticalSectionImpl, including all inherited members.

CCriticalSectionImpl() | mbo::CCriticalSectionImpl | [inline]
Enter() const | mbo::CCriticalSectionImpl | [inline, virtual]
GetLevel() const | mbo::CCriticalSectionImpl | [inline, virtual]
GetLock() const | mbo::CCriticalSectionImpl | [inline, virtual]
Leave() const | mbo::CCriticalSectionImpl | [inline, virtual]
m_cs | mbo::CCriticalSectionImpl | [mutable, private]
~CCriticalSectionImpl() | mbo::CCriticalSectionImpl | [inline, virtual]
~ICriticalSection() | mbo::ICriticalSection | [inline, virtual]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CEventFake Member List

This is the complete list of members for mbo::CEventFake, including all inherited members.

CEventFake(const bool bManualReset, const bool bInitialState=false) | mbo::CEventFake | [inline, explicit]
Pulse() | mbo::CEventFake | [inline, virtual]
Reset() | mbo::CEventFake | [inline, virtual]
Set() | mbo::CEventFake | [inline, virtual]
Wait() const | mbo::CEventFake | [inline, virtual]
mbo::IEvent::Wait(size_t nTime=INFINITE) const =0 | mbo::IEvent | [pure virtual]
~IEvent() | mbo::IEvent | [inline, virtual]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CEventImpl Member List

This is the complete list of members for mbo::CEventImpl, including all inherited members.

CEventImpl(const bool bManualReset=true, const bool bInitialState=false) | mbo::CEventImpl | [explicit]
m_hEvent | mbo::CEventImpl | [private]
Pulse() | mbo::CEventImpl | [virtual]
Reset() | mbo::CEventImpl | [virtual]
Set() | mbo::CEventImpl | [virtual]
Wait(size_t nTime=INFINITE) const | mbo::CEventImpl | [virtual]
~IEvent() | mbo::IEvent | [inline, virtual]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CIniData Member List

This is the complete list of members for mbo::CIniData, including all inherited members.

CIniData(const MboString &strFilename, const MboString &strSectionPrefix="") | mbo::CIniData | [explicit]
ClearSection(const MboString &strSection) | mbo::CIniData | [virtual]
GetBool(const MboString &strSection, const MboString &strKeyname, bool bDefault=false, bool bWriteDefault=false) const | mbo::CIniData | [virtual]
GetColor(const MboString &strSection, const MboString &strKeyname, COLORREF colDefault=RGB(0, 0, 0), bool bWriteDefault=false) const | mbo::CIniData | [virtual]
GetFilename() const | mbo::CIniData | [virtual]
GetFloat(const MboString &strSection, const MboString &strKeyname, float fDefault=0.0f, bool bWriteDefault=false, float fMinimum=FLT_MIN, float fMaximum=FLT_MAX) const | mbo::CIniData | [virtual]
GetIniBool(const MboString &strFilename, const MboString &strSection, const MboString &strKeyname, bool bDefault=false, bool bWriteDefault=false) | mbo::CIniData | [static]
GetIniColor(const MboString &strFilename, const MboString &strSection, const MboString &strKeyname, COLORREF colDefault=RGB(0, 0, 0), bool bWriteDefault=false) | mbo::CIniData | [static]
GetIniFloat(const MboString &strFilename, const MboString &strSection, const MboString &strKeyname, float fDefault=0.0f, bool bWriteDefault=false, float fMinimum=FLT_MIN, float fMaximum=FLT_MAX) | mbo::CIniData | [static]
GetIniInt(const MboString &strFilename, const MboString &strSection, const MboString &strKeyname, int nDefault=0, bool bWriteDefault=false, int nMinimum=INT_MIN, int nMaximum=INT_MAX) | mbo::CIniData | [static]
GetIniLong(const MboString &strFilename, const MboString &strSection, const MboString &strKeyname, long lDefault=0L, bool bWriteDefault=false, long lMinimum=LONG_MIN, long lMaximum=LONG_MAX) | mbo::CIniData | [static]
GetIniMap(const MboString &strFilename, const MboString &strSection, const CStrMapStr &msstrDefault=CStrMapStr(), bool bWriteDefault=false, bool bWriteEmpty=false) | mbo::CIniData | [static]
GetIniString(const MboString &strFilename, const MboString &strSection, const MboString &strKeyname, const MboString &strDefault="", bool bWriteDefault=false, bool bParseEnvVars=false) | mbo::CIniData | [static]
GetInt(const MboString &strSection, const MboString &strKeyname, int nDefault=0, bool bWriteDefault=false, int nMinimum=INT_MIN, int nMaximum=INT_MAX) const | mbo::CIniData | [virtual]
GetKeyNames(const MboString &strSection, CStrList &vstrKeyNames) const | mbo::CIniData | [virtual]
GetLong(const MboString &strSection, const MboString &strKeyname, long lDefault=0L, bool bWriteDefault=false, long lMinimum=LONG_MIN, long lMaximum=LONG_MAX) const | mbo::CIniData | [virtual]
GetMap(const MboString &strSection, const CStrMapStr &msstrDefault=CStrMapStr(), bool bWriteDefault=false, bool bWriteEmpty=false) const | mbo::CIniData | [virtual]
GetSectionNames(const MboString &strSectionPrefix, CStrList &vstrSectionNames) const | mbo::CIniData |
GetSectionNames(CStrList &vstrSectionNames) const | mbo::CIniData |
GetSectionPrefix() const | mbo::CIniData | [virtual]
GetString(const MboString &strSection, const MboString &strKeyname, const MboString &strDefault="", bool bWriteDefault=false, bool bParseEnvVars=false) const | mbo::CIniData | [virtual]
IniDataGetLock() const | mbo::CIniData | [protected]
KeyNameExists(const MboString &strSection, const MboString &strKeyname) const | mbo::CIniData | [virtual]
m_mxIniData | mbo::CIniData | [private]
m_strFilename | mbo::CIniData | [private]
m_strSectionPrefix | mbo::CIniData | [private]
ReadBool(const MboString &strSection, const MboString &strKeyname, bool &bValue, bool bDefault=false, bool bWriteDefault=false) const | mbo::CIniData | [virtual]
ReadColor(const MboString &strSection, const MboString &strKeyname, COLORREF &colValue, COLORREF colDefault=RGB(0, 0, 0), bool bWriteDefault=false) const | mbo::CIniData | [virtual]
ReadFloat(const MboString &strSection, const MboString &strKeyname, float &fValue, float fDefault=0.0f, bool bWriteDefault=false, float fMinimum=FLT_MIN, float fMaximum=FLT_MAX) const | mbo::CIniData | [virtual]
ReadInt(const MboString &strSection, const MboString &strKeyname, int &nValue, int nDefault=0, bool bWriteDefault=false, int nMinimum=INT_MIN, int nMaximum=INT_MAX) const | mbo::CIniData | [virtual]
ReadLong(const MboString &strSection, const MboString &strKeyname, long &lValue, long lDefault=0, bool bWriteDefault=false, long lMinimum=LONG_MIN, long lMaximum=LONG_MAX) const | mbo::CIniData | [virtual]
ReadMap(const MboString &strSection, CStrMapStr &msstrValue, const CStrMapStr &msstrDefault=CStrMapStr(), bool bWriteDefault=false, bool bWriteEmpty=false) const | mbo::CIniData | [virtual]
ReadString(const MboString &strSection, const MboString &strKeyname, MboString &strValue, const MboString &strDefault="", bool bWriteDefault=false, bool bParseEnvVars=false) const | mbo::CIniData | [virtual]
SectionExists(const MboString &strSection) const | mbo::CIniData |
WriteBool(const MboString &strSection, const MboString &strKeyname, bool bValue) | mbo::CIniData | [virtual]
WriteColor(const MboString &strSection, const MboString &strKeyname, COLORREF colValue) | mbo::CIniData | [virtual]
WriteFloat(const MboString &strSection, const MboString &strKeyname, float fValue) | mbo::CIniData | [virtual]
WriteInt(const MboString &strSection, const MboString &strKeyname, int nValue) | mbo::CIniData | [virtual]
WriteLong(const MboString &strSection, const MboString &strKeyname, long lValue) | mbo::CIniData | [virtual]
WriteMap(const MboString &strSection, const CStrMapStr &msstrValue, bool bWriteEmpty=false) | mbo::CIniData | [virtual]
WriteString(const MboString &strSection, const MboString &strKeyname, const MboString &strValue) | mbo::CIniData | [virtual]
~CIniData() | mbo::CIniData | [virtual]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CLock Member List

This is the complete list of members for mbo::CLock, including all inherited members.

CLock(const ICriticalSection *pmx) | mbo::CLock | [inline, explicit]
CLock(const ILock *plx) | mbo::CLock | [explicit]
CLock(const CLockSingle &lx) | mbo::CLock | [inline, explicit]
CLock(const CLockMulti &lx) | mbo::CLock | [explicit]
CLock(const CLockFake &lx) | mbo::CLock | [explicit]
CLock(const CLock &lx) | mbo::CLock | [explicit]
CLock(const IMutex *pmx1, const IMutex *pmx2=0, const IMutex *pmx3=0, const IMutex *pmx4=0, const IMutex *pmx5=0) | mbo::CLock | [explicit]
CUnlock class | mbo::CLock | [friend]
Enter() const | mbo::CLock | [private, virtual]
GetLevel() const | mbo::CLock | [virtual]
Leave() const | mbo::CLock | [private, virtual]
m_plx | mbo::CLock | [private]
m_pmx | mbo::CLock | [private]
~CLock() | mbo::CLock | [virtual]
~ILock() | mbo::ILock | [inline, virtual]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CLockFake Member List

This is the complete list of members for mbo::CLockFake, including all inherited members.

Enter() const | mbo::CLockFake | [inline, virtual]
GetLevel() const | mbo::CLockFake | [inline, virtual]
Leave() const | mbo::CLockFake | [inline, virtual]
~ILock() | mbo::ILock | [inline, virtual]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CLockMulti Member List

This is the complete list of members for mbo::CLockMulti, including all inherited members.

AddMutex(const IMutex *pmx) const | mbo::CLockMulti | [virtual]
CLockMulti(const IMutex *pmx1=0, const IMutex *pmx2=0, const IMutex *pmx3=0, const IMutex *pmx4=0, const IMutex *pmx5=0) | mbo::CLockMulti | [explicit]
CLockMulti::CLockMulti(const CLockMulti &lx) | mbo::CLockMulti | [explicit]
Enter() const | mbo::CLockMulti | [virtual]
GetLevel() const | mbo::CLockMulti | [virtual]
GetList() const | mbo::CLockMulti | [virtual]
Leave() const | mbo::CLockMulti | [virtual]
m_vpme | mbo::CLockMulti | [mutable, private]
size() const | mbo::CLockMulti | [virtual]
Try(DWORD nMilliseconds=0) const | mbo::CLockMulti | [virtual]
~CLockMulti() | mbo::CLockMulti | [virtual]
~ILock() | mbo::ILock | [inline, virtual]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CLockSingle Member List

This is the complete list of members for mbo::CLockSingle, including all inherited members.

CLock | mbo::CLockSingle | [private]
CLockSingle(const ICriticalSection *pmx) | mbo::CLockSingle | [inline, explicit]
CLockSingle(const CLockSingle &lx) | mbo::CLockSingle | [inline, explicit]
Enter() const | mbo::CLockSingle | [inline, virtual]
GetLevel() const | mbo::CLockSingle | [inline, virtual]
Leave() const | mbo::CLockSingle | [inline, virtual]
m_pmx | mbo::CLockSingle | [private]
~CLockSingle() | mbo::CLockSingle | [inline, virtual]
~ILock() | mbo::ILock | [inline, virtual]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CMutexFake Member List

This is the complete list of members for mbo::CMutexFake, including all inherited members.

CMutexFake() | mbo::CMutexFake |
DecEntered() const | mbo::CMutexFake | [protected, virtual]
Enter() const | mbo::CMutexFake | [virtual]
GetHandle() const | mbo::IMutex | [inline, protected, virtual]
GetLevel() const | mbo::CMutexFake | [virtual]
GetLock() const | mbo::CMutexFake | [virtual]
IncEntered() const | mbo::CMutexFake | [protected, virtual]
Leave() const | mbo::CMutexFake | [virtual]
m_lEntered | mbo::CMutexFake | [mutable, protected]
Try(DWORD nMilliseconds=0) const | mbo::CMutexFake | [virtual]
~ICriticalSection() | mbo::ICriticalSection | [inline, virtual]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CMutexImpl Member List

This is the complete list of members for mbo::CMutexImpl, including all inherited members.

CMutexImpl() | mbo::CMutexImpl |
DecEntered() const | mbo::CMutexImpl | [protected, virtual]
Enter() const | mbo::CMutexImpl | [virtual]
GetHandle() const | mbo::CMutexImpl | [virtual]
GetLevel() const | mbo::CMutexImpl | [virtual]
GetLock() const | mbo::CMutexImpl | [virtual]
IncEntered() const | mbo::CMutexImpl | [protected, virtual]
Leave() const | mbo::CMutexImpl | [virtual]
m_hMutex | mbo::CMutexImpl | [private]
m_lEntered | mbo::CMutexImpl | [mutable, protected]
Try(DWORD nMilliseconds=0) const | mbo::CMutexImpl | [virtual]
~CMutexImpl() | mbo::CMutexImpl | [virtual]
~ICriticalSection() | mbo::ICriticalSection | [inline, virtual]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CStrList Member List

This is the complete list of members for mbo::CStrList, including all inherited members.

_Mybase typedef | std::deque2< MboString > |
_Myt typedef | std::deque2< MboString > |
add_if_new(const MboString &_Val) | std::deque2< MboString > | [inline, virtual]
add_if_prefix_match(const MboString &strValue, const MboString &strPrefix, bool bCaseSensitive=false, bool bOnlyNew=false) | mbo::CStrList | [virtual]
contains(const MboString &_Val) const | std::deque2< MboString > | [inline]
contains_no(const MboString &_Val) const | std::deque2< MboString > | [inline]
CStrList() | mbo::CStrList |
CStrList(const std::deque2< MboString > &other) | mbo::CStrList |
CStrList(const MboString &str) | mbo::CStrList | [explicit]
dyn_create(_Myt::size_type _Count,...) | std::deque2< MboString > | [inline, static]
Explode(const char *szInput, const char *szSplit, CStrList &vstrResult, bool bClearInput=true, bool bTrim=false) | mbo::CStrList | [static]
Explode(const MboString &strInput, const MboString &strSplit, CStrList &vstrResult, bool bClearInput=true, bool bTrim=false) | mbo::CStrList | [static]
ExplodeZZString(const char *szList, CStrList &vstrResult, bool bClearInput=true, bool bTrim=false) | mbo::CStrList | [static]
limit(size_type _Limit) | std::deque2< MboString > | [inline, virtual]
operator bool() | std::deque2< MboString > | [inline]
operator=(const std::deque< MboString > &values) | mbo::CStrList |
position(const MboString &_Val) const | std::deque2< MboString > | [inline]
sort() | std::deque2< MboString > | [inline]
ToCStr(const MboString &strSplit=",") const | mbo::CStrList |
~CStrList() | mbo::CStrList | [virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc > Member List

This is the complete list of members for mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc >, including all inherited members.

_Element typedef | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > |
_Element_check_fun_t typedef | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > |
_Kty typedef | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > |
_Kty_check_fun_t typedef | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > |
_Kty_container typedef | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > |
_Mybase typedef | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > |
_Myt typedef | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > |
_Ty typedef | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > |
_Ty_check_fun_t typedef | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > |
_Ty_container typedef | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > |
contains_key(const _Kty &key) const | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > | [inline]
first_elem(_Ty &if_empty) | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > | [inline]
first_elem(const _Ty &if_empty) const | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > | [inline]
first_key(const _Kty &if_empty) const | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > | [inline]
insert_elem(const _Kty &key, _Ty val) | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > | [inline]
keys() const | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > | [inline]
keys(_Kty_check_fun_t check) const | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > | [inline]
operator[](const _Kty &key) | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > | [inline]
operator[](const _Kty &key) const | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > | [inline]
select(_Element_check_fun_t check) const | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > | [inline]
values() const | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > | [inline]
values(_Ty_check_fun_t check) const | std::map2< MboString, __Ty, std::deque2< MboString >, __CTy, __Pr, __Alloc > | [inline]
~CStrMap() | mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc > | [inline, virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CStrMapStr Member List

This is the complete list of members for mbo::CStrMapStr, including all inherited members.

_Element typedef | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > |
_Element_check_fun_t typedef | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > |
_Kty typedef | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > |
_Kty_check_fun_t typedef | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > |
_Kty_container typedef | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > |
_Mybase typedef | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > |
_Myt typedef | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > |
_Ty typedef | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > |
_Ty_check_fun_t typedef | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > |
_Ty_container typedef | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > |
contains_key(const _Kty &key) const | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > | [inline]
CStrMapStr() | mbo::CStrMapStr |
CStrMapStr(const MboString &strList) | mbo::CStrMapStr |
first_elem(_Ty &if_empty) | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > | [inline]
first_elem(const _Ty &if_empty) const | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > | [inline]
first_key(const _Kty &if_empty) const | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > | [inline]
insert_elem(const _Kty &key, _Ty val) | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > | [inline]
keys() const | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > | [inline]
keys(_Kty_check_fun_t check) const | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > | [inline]
operator[](const _Kty &key) | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > | [inline]
operator[](const _Kty &key) const | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > | [inline]
Scan(const MboString &strList) | mbo::CStrMapStr |
select(_Element_check_fun_t check) const | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > | [inline]
ToCStr(size_t nMaxKeyLength=0, const MboString &strKeyMore="", const MboString &strSplit=",", const MboString &strSeparate="=", const MboString &strKeyAppend="") const | mbo::CStrMapStr |
values() const | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > | [inline]
values(_Ty_check_fun_t check) const | std::map2< MboString, MboString, std::deque2< MboString >, std::deque2< MboString >, less_cstr_ic, std::allocator< std::pair< const MboString, MboString > > > | [inline]
~CStrMap() | mbo::CStrMap< MboString > | [inline, virtual]
~CStrMapStr() | mbo::CStrMapStr | [inline, virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::CUnlock Member List

This is the complete list of members for mbo::CUnlock, including all inherited members.

CUnlock(const ILock &lx) | mbo::CUnlock | [inline, explicit]
Enter() const | mbo::CUnlock | [inline, private, virtual]
GetLevel() const | mbo::CUnlock | [inline, private, virtual]
Leave() const | mbo::CUnlock | [inline, private, virtual]
m_lLevel | mbo::CUnlock | [private]
m_lx | mbo::CUnlock | [private]
~CUnlock() | mbo::CUnlock | [inline, virtual]
~ILock() | mbo::ILock | [inline, virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::ICriticalSection Member List

This is the complete list of members for mbo::ICriticalSection, including all inherited members.

Enter() const =0 | mbo::ICriticalSection | [pure virtual]
GetLevel() const =0 | mbo::ICriticalSection | [pure virtual]
GetLock() const =0 | mbo::ICriticalSection | [pure virtual]
Leave() const =0 | mbo::ICriticalSection | [pure virtual]
~ICriticalSection() | mbo::ICriticalSection | [inline, virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::IEvent Member List

This is the complete list of members for mbo::IEvent, including all inherited members.

Pulse()=0 | mbo::IEvent | [pure virtual]
Reset()=0 | mbo::IEvent | [pure virtual]
Set()=0 | mbo::IEvent | [pure virtual]
Wait(size_t nTime=INFINITE) const =0 | mbo::IEvent | [pure virtual]
~IEvent() | mbo::IEvent | [inline, virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::ILock Member List

This is the complete list of members for mbo::ILock, including all inherited members.

Enter() const =0 | mbo::ILock | [pure virtual]
GetLevel() const =0 | mbo::ILock | [pure virtual]
Leave() const =0 | mbo::ILock | [pure virtual]
~ILock() | mbo::ILock | [inline, virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::IMutex Member List

This is the complete list of members for mbo::IMutex, including all inherited members.

DecEntered() const =0 | mbo::IMutex | [protected, pure virtual]
Enter() const | mbo::IMutex | [inline, virtual]
GetHandle() const | mbo::IMutex | [inline, protected, virtual]
GetLevel() const =0 | mbo::ICriticalSection | [pure virtual]
GetLock() const =0 | mbo::IMutex | [pure virtual]
IncEntered() const =0 | mbo::IMutex | [protected, pure virtual]
Leave() const =0 | mbo::ICriticalSection | [pure virtual]
MutexList class | mbo::IMutex | [friend]
Try(DWORD nMilliseconds=0) const =0 | mbo::IMutex | [pure virtual]
~ICriticalSection() | mbo::ICriticalSection | [inline, virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::LockedVar< T, _THREAD_MODEL > Member List

This is the complete list of members for mbo::LockedVar< T, _THREAD_MODEL >, including all inherited members.

__exchange(const T &tIn) | mbo::LockedVar< T, _THREAD_MODEL > | [inline]
__getLock() | mbo::LockedVar< T, _THREAD_MODEL > | [inline]
CriticalSection typedef | mbo::LockedVar< T, _THREAD_MODEL > | [private]
LockedVar(const T &tIn) | mbo::LockedVar< T, _THREAD_MODEL > | [inline]
m_mx | mbo::LockedVar< T, _THREAD_MODEL > | [mutable, private]
operator const T() const | mbo::LockedVar< T, _THREAD_MODEL > | [inline]
operator T() | mbo::LockedVar< T, _THREAD_MODEL > | [inline]
operator=(const T &tIn) | mbo::LockedVar< T, _THREAD_MODEL > | [inline]
t | mbo::LockedVar< T, _THREAD_MODEL > | [private]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::LockedVar< bool, ThreadModel > Member List

This is the complete list of members for mbo::LockedVar< bool, ThreadModel >, including all inherited members.

__exchange(const T &tIn) | mbo::LockedVar< bool, ThreadModel > | [inline]
__getLock() | mbo::LockedVar< bool, ThreadModel > | [inline]
CriticalSection typedef | mbo::LockedVar< bool, ThreadModel > | [private]
LockedVar(const T &tIn) | mbo::LockedVar< bool, ThreadModel > | [inline]
m_mx | mbo::LockedVar< bool, ThreadModel > | [mutable, private]
operator const T() const | mbo::LockedVar< bool, ThreadModel > | [inline]
operator T() | mbo::LockedVar< bool, ThreadModel > | [inline]
operator=(const T &tIn) | mbo::LockedVar< bool, ThreadModel > | [inline]
t | mbo::LockedVar< bool, ThreadModel > | [private]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::Matrix< _Ty, _Cols, _Rows > Member List

This is the complete list of members for mbo::Matrix< _Ty, _Cols, _Rows >, including all inherited members.

_Cols | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
Adj() | mbo::Matrix< _Ty, _Cols, _Rows > |
Cofactor(size_t row, size_t col) | mbo::Matrix< _Ty, _Cols, _Rows > |
Cond() | mbo::Matrix< _Ty, _Cols, _Rows > |
Det() | mbo::Matrix< _Ty, _Cols, _Rows > |
IsDiagonal() | mbo::Matrix< _Ty, _Cols, _Rows > |
IsLowerTiangular() | mbo::Matrix< _Ty, _Cols, _Rows > |
IsNull() | mbo::Matrix< _Ty, _Cols, _Rows > |
IsScalar() | mbo::Matrix< _Ty, _Cols, _Rows > |
IsSingular() | mbo::Matrix< _Ty, _Cols, _Rows > |
IsSkewSymmetric() | mbo::Matrix< _Ty, _Cols, _Rows > |
IsSquare() | mbo::Matrix< _Ty, _Cols, _Rows > | [inline]
IsSymmetric() | mbo::Matrix< _Ty, _Cols, _Rows > |
IsUnit() | mbo::Matrix< _Ty, _Cols, _Rows > |
IsUpperTiangular() | mbo::Matrix< _Ty, _Cols, _Rows > |
Matrix(const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, _Rows > | [inline]
Norm() | mbo::Matrix< _Ty, _Cols, _Rows > |
Null(const size_t &row, const size_t &col) | mbo::Matrix< _Ty, _Cols, _Rows > |
Null() | mbo::Matrix< _Ty, _Cols, _Rows > |
numCols() | mbo::Matrix< _Ty, _Cols, _Rows > | [inline]
numRows() | mbo::Matrix< _Ty, _Cols, _Rows > | [inline]
operator *(const Matrix< _Ty, _Cols1Rows2, _Rows1 > &lhs, const Matrix< _Ty, _Cols2, _Cols1Rows2 > &rhs) friend template< class _Ty | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator *(const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator *(const Matrix< _Ty, _Cols, _Rows > &m, const T &no) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator *(const T &no, const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator *=(const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, _Rows > |
operator *=(const _Ty &c) | mbo::Matrix< _Ty, _Cols, _Rows > |
operator!(Matrix< _Ty, _Cols, _Rows > m) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator!=(const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator()(size_t row, size_t col) | mbo::Matrix< _Ty, _Cols, _Rows > | [inline]
operator+() | mbo::Matrix< _Ty, _Cols, _Rows > | [inline]
operator+(const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator+=(const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, _Rows > |
operator-() | mbo::Matrix< _Ty, _Cols, _Rows > |
operator-(const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator-=(const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, _Rows > |
operator/(const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator/(const Matrix< _Ty, _Cols, _Rows > &m, const T &no) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator/(const T &no, const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator/=(const _Ty &c) | mbo::Matrix< _Ty, _Cols, _Rows > |
operator<<(ostream &o, Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator=(const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, _Rows > | [inline]
operator==(const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator>>(istream &i, Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator^(const Matrix< _Ty, _Cols, _Rows > &m, const size_t &pow) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
operator^=(const size_t &pow) | mbo::Matrix< _Ty, _Cols, _Rows > |
operator~(const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, _Rows > | [friend]
pivot(size_t row) | mbo::Matrix< _Ty, _Cols, _Rows > | [private]
Solve(const Matrix< _Ty, _Cols, _Rows > &v) const | mbo::Matrix< _Ty, _Cols, _Rows > |
Unit(const size_t &row) | mbo::Matrix< _Ty, _Cols, _Rows > |
Unit() | mbo::Matrix< _Ty, _Cols, _Rows > |
Val | mbo::Matrix< _Ty, _Cols, _Rows > | [private]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

mbo::MatrixException Member List

This is the complete list of members for mbo::MatrixException, including all inherited members.

MatrixException(_IN const char *szWhat) mbo::MatrixException [inline, private]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::MboDelayedEventThread Member List

This is the complete list of members for mbo::MboDelayedEventThread, including all inherited members.

Action()=0 | mbo::MboThread | [pure virtual]
EThreadPriority enum name | mbo::MboThread |
GetCounter() const | mbo::MboEventThread |
GetDelay() const | mbo::MboDelayedEventThread | [virtual]
GetThreadId() const | mbo::MboThread |
GetThreadName() | mbo::MboThread |
IsRunning() const | mbo::MboThread |
IsSignaled() const | mbo::MboEventThread | [virtual]
IsStopping() const | mbo::MboThread |
KillThread(DWORD nMilliseconds=0, DWORD dwExitCode=-1) | mbo::MboThread |
m_dwThreadId | mbo::MboThread | [protected]
m_hDelay | mbo::MboDelayedEventThread | [private]
m_hIsStopping | mbo::MboThread | [protected]
m_hThread | mbo::MboThread | [protected]
m_mxDelay | mbo::MboDelayedEventThread | [private]
m_mxStartStop | mbo::MboThread | [protected]
m_nDelay | mbo::MboDelayedEventThread | [private]
MboDelayedEventThread(size_t nMilliSeconds=0, bool bAutoStart=true, const char *szThreadName=0) | mbo::MboDelayedEventThread | [explicit]
MboEventThread(bool bAutoStart=true, const char *szThreadName=0) | mbo::MboEventThread | [explicit]
MboThread() | mbo::MboThread |
MboThread(const char *szThreadName) | mbo::MboThread | [explicit]
OnThreadStart() | mbo::MboThread | [virtual]
OnThreadStop() | mbo::MboThread | [virtual]
PRIORITY_CRITICAL enum value | mbo::MboThread |
PRIORITY_HIGH enum value | mbo::MboThread |
PRIORITY_HIGHEST enum value | mbo::MboThread |
PRIORITY_IDLE enum value | mbo::MboThread |
PRIORITY_LOW enum value | mbo::MboThread |
PRIORITY_LOWEST enum value | mbo::MboThread |
PRIORITY_NORMAL enum value | mbo::MboThread |
SetDelay(size_t nMilliSeconds=0) | mbo::MboDelayedEventThread | [virtual]
SetEvent() const | mbo::MboEventThread |
SetThreadName(const char *szThreadName, DWORD dwThreadID=-1) | mbo::MboThread | [static]
SetThreadPriority(EThreadPriority ePriority) | mbo::MboThread |
Start() | mbo::MboThread | [virtual]
Stop() | mbo::MboDelayedEventThread | [virtual]
ThreadProc() | mbo::MboDelayedEventThread | [private, virtual]
WaitFor(DWORD nMilliseconds=INFINITE) const | mbo::MboThread |
~MboDelayedEventThread() | mbo::MboDelayedEventThread | [virtual]
~MboEventThread() | mbo::MboEventThread | [virtual]
~MboThread() | mbo::MboThread | [virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::MboDrawWin Member List

This is the complete list of members for mbo::MboDrawWin, including all inherited members.

Action() | mbo::MboWinMsgHandler | [protected, virtual]
AddHWND() | mbo::MboWinMsgHandler | [protected]
CalcTextRect(RECT &rect, const MboString &strText, UINT uFormat=0) | mbo::MboDrawWin | [virtual]
DrawBitmap(int nLeft, int nTop, HBITMAP hBitmap) | mbo::MboDrawWin | [virtual]
DrawBitmap(int nLeft, int nTop, const MboString &strResId) | mbo::MboDrawWin | [virtual]
DrawBitmap(int nLeft, int nTop, UINT nResId) | mbo::MboDrawWin | [virtual]
DrawCircle(const POINT &ptCenter, const LONG nRadius, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL) | mbo::MboDrawWin | [virtual]
DrawCircle(const LONG nCenterX, const LONG nCenterY, const LONG nRadius, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL) | mbo::MboDrawWin | [virtual]
DrawEllipse(const RECT &rect, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL) | mbo::MboDrawWin | [virtual]
DrawIcon(int nLeft, int nTop, HICON hIcon) | mbo::MboDrawWin | [virtual]
DrawIcon(int nLeft, int nTop, const MboString &strResId) | mbo::MboDrawWin | [virtual]
DrawIcon(int nLeft, int nTop, UINT nResId) | mbo::MboDrawWin | [virtual]
DrawLine(LONG nX1, LONG nY1, LONG nX2, LONG nY2, int nPenWidth, COLORREF colInner, DRAW_MODE enMode=DRAW_MODE_FILL, int fnPenStyle=PS_INSIDEFRAME) | mbo::MboDrawWin | [virtual]
DrawLine(POINT pt1, POINT pt2, int nPenWidth, COLORREF colInner, DRAW_MODE enMode=DRAW_MODE_FILL, int fnPenStyle=PS_INSIDEFRAME) | mbo::MboDrawWin | [virtual]
DrawPolygon(const POINT *aptPoints, int nNumPoints, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL) | mbo::MboDrawWin | [virtual]
DrawRect(const RECT &rect, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL) | mbo::MboDrawWin | [virtual]
DrawRect(LONG nLeft, LONG nTop, LONG nRight, LONG nBottom, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL) | mbo::MboDrawWin | [virtual]
DrawSetMode(HBRUSH &hBrush, HPEN &hPen, COLORREF colInner, COLORREF colOuter=RGB(0, 0, 0), DRAW_MODE enMode=DRAW_MODE_FILL, int nPenWidth=0, int fnPenStyle=PS_SOLID) | mbo::MboDrawWin | [virtual]
DrawText(const RECT &rect, const MboString &strText, UINT uFormat=0, COLORREF colInner=RGB(0, 0, 0), COLORREF colOuter=RGB(255, 255, 255), DRAW_MODE enMode=DRAW_MODE_TRANSPARENT) | mbo::MboDrawWin | [virtual]
DrawText(LONG nLeft, LONG nTop, LONG nRight, LONG nBottom, const MboString &strText, UINT uFormat=0, COLORREF colInner=RGB(0, 0, 0), COLORREF colOuter=RGB(255, 255, 255), DRAW_MODE enMode=DRAW_MODE_TRANSPARENT) | mbo::MboDrawWin | [virtual]
EThreadPriority enum name | mbo::MboThread | [protected]
g_vWndClassList | mbo::MboWinMsgHandler | [protected, static]
GetHeight() const | mbo::MboDrawWin |
GetHWND() const | mbo::MboWinMsgHandler | [protected, virtual]
GetMaxSizeX() const | mbo::MboDrawWin |
GetMaxSizeY() const | mbo::MboDrawWin |
GetMinSizeX() const | mbo::MboDrawWin |
GetMinSizeY() const | mbo::MboDrawWin |
GetModuleHandle() const | mbo::MboWinMsgHandler | [protected, virtual]
GetPositionX() const | mbo::MboDrawWin |
GetPositionY() const | mbo::MboDrawWin |
GetScreenSizeX() const | mbo::MboDrawWin |
GetScreenSizeY() const | mbo::MboDrawWin |
GetSizeX() const | mbo::MboDrawWin |
GetSizeY() const | mbo::MboDrawWin |
GetThreadId() const | mbo::MboThread | [protected]
GetThreadName() | mbo::MboThread | [protected]
GetWidth() const | mbo::MboDrawWin |
IsRunning() const | mbo::MboThread | [protected]
IsStopping() const | mbo::MboThread | [protected]
IsWindow() const | mbo::MboDrawWin |
IsWindowVisible() const | mbo::MboDrawWin |
IsWndSizeable() const | mbo::MboDrawWin |
IsWndSizingOrMoving() const | mbo::MboDrawWin |
KillThread(DWORD nMilliseconds=0, DWORD dwExitCode=-1) | mbo::MboThread | [protected]
m_bInSizeMove | mbo::MboDrawWin | [private]
m_dwThreadId | mbo::MboThread | [protected]
m_hIsStopping | mbo::MboThread | [protected]
m_hMemDC | mbo::MboDrawWin | [protected]
m_hScrDC | mbo::MboDrawWin | [protected]
m_hThread | mbo::MboThread | [protected]
m_hwnd | mbo::MboWinMsgHandler | [protected]
m_mxStartStop | mbo::MboThread | [protected]
m_nHeight | mbo::MboDrawWin | [private]
m_nMaxSizeX | mbo::MboDrawWin | [private]
m_nMaxSizeY | mbo::MboDrawWin | [private]
m_nMinSizeX | mbo::MboDrawWin | [private]
m_nMinSizeY | mbo::MboDrawWin | [private]
m_nSizeX | mbo::MboDrawWin | [private]
m_nSizeY | mbo::MboDrawWin | [private]
m_nWidth | mbo::MboDrawWin | [private]
m_strWndClassName | mbo::MboWinMsgHandler | [protected]
MboDrawWin(int nSizeX=400, int nSizeY=300, const MboString &strWndClassName="MboDrawWin", bool bStart=true) | mbo::MboDrawWin | [explicit]
MboDrawWin(int nSizeX, int nSizeY, int nMinSizeX, int nMinSizeY, int nMaxSizeX, int nMaxSizeY, const MboString &strWndClassName="MboDrawWin", bool bStart=true) | mbo::MboDrawWin |
MboThread() | mbo::MboThread | [protected]
MboThread(const char *szThreadName) | mbo::MboThread | [explicit, protected]
MboWinMsgHandler(const MboString &strWndClassName="MboWinMsgHandler", bool bStart=true) | mbo::MboWinMsgHandler | [explicit, protected]
MessageHandler(MSG &msg) | mbo::MboWinMsgHandler | [protected, virtual]
OnButtonDblClk(UINT nFlags, int x, int y) | mbo::MboDrawWin | [virtual]
OnButtonDown(UINT nFlags, int x, int y) | mbo::MboDrawWin | [virtual]
OnButtonUp(UINT nFlags, int x, int y) | mbo::MboDrawWin | [virtual]
OnThreadStart() | mbo::MboThread | [protected, virtual]
OnThreadStop() | mbo::MboThread | [protected, virtual]
OnWindowCreated() | mbo::MboDrawWin | [virtual]
OnWndSized() | mbo::MboDrawWin | [virtual]
PostMessage(UINT uMsg, WPARAM wParam, LPARAM lParam) | mbo::MboWinMsgHandler | [protected, virtual]
PostMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) | mbo::MboWinMsgHandler | [protected, virtual]
PRIORITY_CRITICAL enum value | mbo::MboThread | [protected]
PRIORITY_HIGH enum value | mbo::MboThread | [protected]
PRIORITY_HIGHEST enum value | mbo::MboThread | [protected]
PRIORITY_IDLE enum value | mbo::MboThread | [protected]
PRIORITY_LOW enum value | mbo::MboThread | [protected]
PRIORITY_LOWEST enum value | mbo::MboThread | [protected]
PRIORITY_NORMAL enum value | mbo::MboThread | [protected]
ProcessDefault(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) | mbo::MboWinMsgHandler | [protected, virtual]
ProcessMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) | mbo::MboDrawWin | [virtual]
SetThreadName(const char *szThreadName, DWORD dwThreadID=-1) | mbo::MboThread | [protected, static]
SetThreadPriority(EThreadPriority ePriority) | mbo::MboThread | [protected]
Start() | mbo::MboThread | [protected, virtual]
Stop() | mbo::MboWinMsgHandler | [protected, virtual]
ThreadProc() | mbo::MboThread | [protected, virtual]
WaitFor(DWORD nMilliseconds=INFINITE) const | mbo::MboThread | [protected]
WndCalcMetrics() | mbo::MboDrawWin | [protected, virtual]
WndClassName() const | mbo::MboWinMsgHandler | [protected, virtual]
WndClear() | mbo::MboDrawWin | [virtual]
WndCreate() | mbo::MboDrawWin | [virtual]
WndDestroy() | mbo::MboDrawWin | [virtual]
WndDraw() | mbo::MboDrawWin | [virtual]
WndHide() | mbo::MboDrawWin | [virtual]
WndLoadExtent(const CIniData &cIniData, const MboString &strSection, bool bWriteDefault=false) | mbo::MboDrawWin | [virtual]
WndRegister() | mbo::MboWinMsgHandler | [protected, virtual]
WndRegisterHandle() | mbo::MboDrawWin | [protected, virtual]
WndRestore() | mbo::MboDrawWin | [virtual]
WndSaveExtent(CIniData &cIniData, const MboString &strSection) const | mbo::MboDrawWin | [virtual]
WndSetIconBig(UINT nResId) | mbo::MboDrawWin | [virtual]
WndSetIconBoth(UINT nResId) | mbo::MboDrawWin | [virtual]
WndSetIconSmall(UINT nResId) | mbo::MboDrawWin | [virtual]
WndSetPosition(int nPosX, int nPosY) | mbo::MboDrawWin | [virtual]
WndSetSize(int nSizeX, int nSizeY) | mbo::MboDrawWin | [virtual]
WndSetTitle(const MboString &strTitle) | mbo::MboDrawWin | [virtual]
WndShow(bool bActive=true) | mbo::MboDrawWin | [virtual]
WndTitleText() const | mbo::MboWinMsgHandler | [protected, virtual]
WndUpdate() | mbo::MboDrawWin | [virtual]
~MboDrawWin() | mbo::MboDrawWin | [virtual]
~MboThread() | mbo::MboThread | [protected, virtual]
~MboWinMsgHandler() | mbo::MboWinMsgHandler | [protected, virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::MboEventThread Member List

This is the complete list of members for mbo::MboEventThread, including all inherited members.

Action()=0 | mbo::MboThread | [pure virtual]
EThreadPriority enum name | mbo::MboThread |
GetCounter() const | mbo::MboEventThread |
GetThreadId() const | mbo::MboThread |
GetThreadName() | mbo::MboThread |
IsRunning() const | mbo::MboThread |
IsSignaled() const | mbo::MboEventThread | [virtual]
IsStopping() const | mbo::MboThread |
KillThread(DWORD nMilliseconds=0, DWORD dwExitCode=-1) | mbo::MboThread |
m_dwThreadId | mbo::MboThread | [protected]
m_hEvent | mbo::MboEventThread | [private]
m_hIsStopping | mbo::MboThread | [protected]
m_hThread | mbo::MboThread | [protected]
m_mxStartStop | mbo::MboThread | [protected]
m_nCounter | mbo::MboEventThread | [private]
MboDelayedEventThread class | mbo::MboEventThread | [friend]
MboEventThread(bool bAutoStart=true, const char *szThreadName=0) | mbo::MboEventThread | [explicit]
MboThread() | mbo::MboThread |
MboThread(const char *szThreadName) | mbo::MboThread | [explicit]
OnThreadStart() | mbo::MboThread | [virtual]
OnThreadStop() | mbo::MboThread | [virtual]
PRIORITY_CRITICAL enum value | mbo::MboThread |
PRIORITY_HIGH enum value | mbo::MboThread |
PRIORITY_HIGHEST enum value | mbo::MboThread |
PRIORITY_IDLE enum value | mbo::MboThread |
PRIORITY_LOW enum value | mbo::MboThread |
PRIORITY_LOWEST enum value | mbo::MboThread |
PRIORITY_NORMAL enum value | mbo::MboThread |
SetEvent() const | mbo::MboEventThread |
SetThreadName(const char *szThreadName, DWORD dwThreadID=-1) | mbo::MboThread | [static]
SetThreadPriority(EThreadPriority ePriority) | mbo::MboThread |
Start() | mbo::MboThread | [virtual]
Stop() | mbo::MboEventThread | [virtual]
ThreadProc() | mbo::MboEventThread | [private, virtual]
WaitFor(DWORD nMilliseconds=INFINITE) const | mbo::MboThread |
~MboEventThread() | mbo::MboEventThread | [virtual]
~MboThread() | mbo::MboThread | [virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::MboIntervalThread Member List

This is the complete list of members for mbo::MboIntervalThread, including all inherited members.

Action()=0 | mbo::MboThread | [pure virtual]
EThreadPriority enum name | mbo::MboThread |
GetCounter() const | mbo::MboIntervalThread |
GetInterval() const | mbo::MboIntervalThread | [protected, virtual]
GetThreadId() const | mbo::MboThread |
GetThreadName() | mbo::MboThread |
IsRunning() const | mbo::MboThread |
IsStopping() const | mbo::MboThread |
KillThread(DWORD nMilliseconds=0, DWORD dwExitCode=-1) | mbo::MboThread |
m_dwThreadId | mbo::MboThread | [protected]
m_hIsStopping | mbo::MboThread | [protected]
m_hThread | mbo::MboThread | [protected]
m_mxStartStop | mbo::MboThread | [protected]
m_nCounter | mbo::MboIntervalThread | [private]
m_nInterval | mbo::MboIntervalThread | [private]
MboIntervalThread(size_t nMilliSeconds=1000, const char *szThreadName=0) | mbo::MboIntervalThread | [explicit]
MboThread() | mbo::MboThread |
MboThread(const char *szThreadName) | mbo::MboThread | [explicit]
OnThreadStart() | mbo::MboThread | [virtual]
OnThreadStop() | mbo::MboThread | [virtual]
PRIORITY_CRITICAL enum value | mbo::MboThread |
PRIORITY_HIGH enum value | mbo::MboThread |
PRIORITY_HIGHEST enum value | mbo::MboThread |
PRIORITY_IDLE enum value | mbo::MboThread |
PRIORITY_LOW enum value | mbo::MboThread |
PRIORITY_LOWEST enum value | mbo::MboThread |
PRIORITY_NORMAL enum value | mbo::MboThread |
SetInterval(size_t nMilliSeconds=1000) | mbo::MboIntervalThread | [protected, virtual]
SetThreadName(const char *szThreadName, DWORD dwThreadID=-1) | mbo::MboThread | [static]
SetThreadPriority(EThreadPriority ePriority) | mbo::MboThread |
Start() | mbo::MboThread | [virtual]
Stop() | mbo::MboThread | [virtual]
ThreadProc() | mbo::MboIntervalThread | [private, virtual]
WaitFor(DWORD nMilliseconds=INFINITE) const | mbo::MboThread |
~MboIntervalThread() | mbo::MboIntervalThread | [virtual]
~MboThread() | mbo::MboThread | [virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::MboThread Member List

This is the complete list of members for mbo::MboThread, including all inherited members.

Action()=0 | mbo::MboThread | [pure virtual]
EThreadPriority enum name | mbo::MboThread |
ForceThreadName() | mbo::MboThread | [private, virtual]
GetThreadId() const | mbo::MboThread |
GetThreadName() | mbo::MboThread |
IsRunning() const | mbo::MboThread |
IsStopping() const | mbo::MboThread |
KillThread(DWORD nMilliseconds=0, DWORD dwExitCode=-1) | mbo::MboThread |
m_dwThreadId | mbo::MboThread | [protected]
m_hIsStopping | mbo::MboThread | [protected]
m_hThread | mbo::MboThread | [protected]
m_mxStartStop | mbo::MboThread | [protected]
m_szThreadName | mbo::MboThread | [private]
MboThread() | mbo::MboThread |
MboThread(const char *szThreadName) | mbo::MboThread | [explicit]
MboThreadProc(LPVOID lpParameter) | mbo::MboThread | [friend]
OnThreadStart() | mbo::MboThread | [virtual]
OnThreadStop() | mbo::MboThread | [virtual]
PRIORITY_CRITICAL enum value | mbo::MboThread |
PRIORITY_HIGH enum value | mbo::MboThread |
PRIORITY_HIGHEST enum value | mbo::MboThread |
PRIORITY_IDLE enum value | mbo::MboThread |
PRIORITY_LOW enum value | mbo::MboThread |
PRIORITY_LOWEST enum value | mbo::MboThread |
PRIORITY_NORMAL enum value | mbo::MboThread |
SetThreadName(const char *szThreadName, DWORD dwThreadID=-1) | mbo::MboThread | [static]
SetThreadPriority(EThreadPriority ePriority) | mbo::MboThread |
Start() | mbo::MboThread | [virtual]
Stop() | mbo::MboThread | [virtual]
ThreadProc() | mbo::MboThread | [protected, virtual]
ThreadProcCaller() | mbo::MboThread | [private, virtual]
WaitFor(DWORD nMilliseconds=INFINITE) const | mbo::MboThread |
~MboThread() | mbo::MboThread | [virtual]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::MboWinMsgHandler Member List

This is the complete list of members for mbo::MboWinMsgHandler, including all inherited members.

Action() | mbo::MboWinMsgHandler | [protected, virtual]
AddHWND() | mbo::MboWinMsgHandler | [protected]
EThreadPriority enum name | mbo::MboThread |
g_mhwndList | mbo::MboWinMsgHandler | [private, static]
g_vWndClassList | mbo::MboWinMsgHandler | [protected, static]
GetHWND() const | mbo::MboWinMsgHandler | [virtual]
GetModuleHandle() const | mbo::MboWinMsgHandler | [virtual]
GetThreadId() const | mbo::MboThread |
GetThreadName() | mbo::MboThread |
IsRunning() const | mbo::MboThread |
IsStopping() const | mbo::MboThread |
KillThread(DWORD nMilliseconds=0, DWORD dwExitCode=-1) | mbo::MboThread |
m_dwThreadId | mbo::MboThread | [protected]
m_hIsStopping | mbo::MboThread | [protected]
m_hThread | mbo::MboThread | [protected]
m_hwnd | mbo::MboWinMsgHandler | [protected]
m_mxStartStop | mbo::MboThread | [protected]
m_strWndClassName | mbo::MboWinMsgHandler | [protected]
MAP_HWND typedef | mbo::MboWinMsgHandler | [private]
MboThread() | mbo::MboThread |
MboThread(const char *szThreadName) | mbo::MboThread | [explicit]
MboWinMsgHandler(const MboString &strWndClassName="MboWinMsgHandler", bool bStart=true) | mbo::MboWinMsgHandler | [explicit]
MboWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) | mbo::MboWinMsgHandler | [friend]
MessageHandler(MSG &msg) | mbo::MboWinMsgHandler | [protected, virtual]
OnThreadStart() | mbo::MboThread | [virtual]
OnThreadStop() | mbo::MboThread | [virtual]
OnWindowCreated() | mbo::MboWinMsgHandler | [protected, virtual]
PostMessage(UINT uMsg, WPARAM wParam, LPARAM lParam) | mbo::MboWinMsgHandler | [virtual]
PostMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) | mbo::MboWinMsgHandler | [virtual]
PRIORITY_CRITICAL enum value | mbo::MboThread |
PRIORITY_HIGH enum value | mbo::MboThread |
PRIORITY_HIGHEST enum value | mbo::MboThread |
PRIORITY_IDLE enum value | mbo::MboThread |
PRIORITY_LOW enum value | mbo::MboThread |
PRIORITY_LOWEST enum value | mbo::MboThread |
PRIORITY_NORMAL enum value | mbo::MboThread |
ProcessDefault(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) | mbo::MboWinMsgHandler | [virtual]
ProcessMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) | mbo::MboWinMsgHandler | [virtual]
SetThreadName(const char *szThreadName, DWORD dwThreadID=-1) | mbo::MboThread | [static]
SetThreadPriority(EThreadPriority ePriority) | mbo::MboThread |
Start() | mbo::MboThread | [virtual]
Stop() | mbo::MboWinMsgHandler | [virtual]
ThreadProc() | mbo::MboThread | [protected, virtual]
WaitFor(DWORD nMilliseconds=INFINITE) const | mbo::MboThread |
WndCalcMetrics() | mbo::MboWinMsgHandler | [protected, virtual]
WndClassList typedef | mbo::MboWinMsgHandler | [private]
WndClassName() const | mbo::MboWinMsgHandler | [protected, virtual]
WndCreate() | mbo::MboWinMsgHandler | [protected, virtual]
WndDestroy() | mbo::MboWinMsgHandler | [protected, virtual]
WndRegister() | mbo::MboWinMsgHandler | [protected, virtual]
WndTitleText() const | mbo::MboWinMsgHandler | [protected, virtual]
~MboThread() | mbo::MboThread | [virtual]
~MboWinMsgHandler() | mbo::MboWinMsgHandler | [virtual]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::mem_reallocator< __ValueType > Member List

This is the complete list of members for mbo::mem_reallocator< __ValueType >, including all inherited members.

address(reference ref) | mbo::allocator< __ValueType > | [inline]
address(const_reference ref) | mbo::allocator< __ValueType > | [inline]
allocate(size_type size, std::allocator< void >::const_pointer hint=0L) | mbo::mem_reallocator< __ValueType > | [inline]
mbo::reallocator::allocate(size_type size, allocator< void, char >::const_pointer hint=0L) | mbo::allocator< __ValueType > | [inline]
const_pointer typedef | mbo::allocator< __ValueType > |
const_reference typedef | mbo::allocator< __ValueType > |
construct(pointer ptr, const_reference oth) | mbo::allocator< __ValueType > | [inline]
deallocate(pointer ptr, size_type size) | mbo::mem_reallocator< __ValueType > | [inline]
destroy(pointer ptr) | mbo::allocator< __ValueType > | [inline]
difference_type typedef | mbo::allocator< __ValueType > |
max_size() const | mbo::allocator< __ValueType > | [inline]
move(pointer dst, pointer src, size_type size) | mbo::mem_reallocator< __ValueType > | [inline]
pointer typedef | mbo::allocator< __ValueType > |
reallocate(pointer ptr, size_type old_size, size_type new_size) | mbo::mem_reallocator< __ValueType > | [inline]
reference typedef | mbo::allocator< __ValueType > |
size_type typedef | mbo::allocator< __ValueType > |
value_type typedef | mbo::allocator< __ValueType > |

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::MultiThreaded::ThreadModel Member List

This is the complete list of members for mbo::MultiThreaded::ThreadModel, including all inherited members.

CriticalSection typedef | mbo::MultiThreaded::ThreadModel |
Decrement(IncDecVal *p) | mbo::MultiThreaded::ThreadModel | [static]
EventModel typedef | mbo::MultiThreaded::ThreadModel |
Increment(IncDecVal *p) | mbo::MultiThreaded::ThreadModel | [static]
Lock typedef | mbo::MultiThreaded::ThreadModel |
LockMulti typedef | mbo::MultiThreaded::ThreadModel |
LockSingle typedef | mbo::MultiThreaded::ThreadModel |
MutexModel typedef | mbo::MultiThreaded::ThreadModel |
PeekValue(const IncDecVal *p) | mbo::MultiThreaded::ThreadModel | [static]
Unlock typedef | mbo::MultiThreaded::ThreadModel |

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::MutexList Member List

This is the complete list of members for mbo::MutexList, including all inherited members.

DecEntered() const | mbo::MutexList | [protected, virtual]
Enter() const | mbo::MutexList | [virtual]
GetHandle() const | mbo::MutexList | [private, virtual]
GetLevel() const | mbo::MutexList | [virtual]
GetLock() const | mbo::MutexList | [virtual]
IncEntered() const | mbo::MutexList | [protected, virtual]
Leave() const | mbo::MutexList | [virtual]
m_lEntered | mbo::MutexList | [mutable, private]
MutexList() | mbo::MutexList |
Try(DWORD nMilliseconds=0) const | mbo::MutexList | [virtual]
~ICriticalSection() | mbo::ICriticalSection | [inline, virtual]
~MutexList() | mbo::MutexList | [virtual]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::NullPointer< _Ty > Member List

This is the complete list of members for mbo::NullPointer< _Ty >, including all inherited members.

operator *() | mbo::NullPointer< _Ty > | [inline]
operator *() const | mbo::NullPointer< _Ty > | [inline]
operator bool() const | mbo::NullPointer< _Ty > | [inline]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

mbo::NullPointer< _Ty >::nullptr_access Member List

This is the complete list of members for mbo::NullPointer< _Ty >::nullptr_access, including all inherited members.

nullptr_access(const char *szWhat="Null pointer access") mbo::NullPointer< _Ty >::nullptr_access [inline, explicit]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::reallocator< __ValueType > Member List

This is the complete list of members for mbo::reallocator< __ValueType >, including all inherited members.

address(reference ref) | mbo::allocator< __ValueType > | [inline]
address(const_reference ref) | mbo::allocator< __ValueType > | [inline]
allocate(size_type size, allocator< void, char >::const_pointer hint=0L) | mbo::allocator< __ValueType > | [inline]
const_pointer typedef | mbo::allocator< __ValueType > |
const_reference typedef | mbo::allocator< __ValueType > |
construct(pointer ptr, const_reference oth) | mbo::allocator< __ValueType > | [inline]
deallocate(pointer ptr, size_type size) | mbo::allocator< __ValueType > | [inline]
destroy(pointer ptr) | mbo::allocator< __ValueType > | [inline]
difference_type typedef | mbo::allocator< __ValueType > |
max_size() const | mbo::allocator< __ValueType > | [inline]
move(pointer dst, pointer src, size_type size) | mbo::reallocator< __ValueType > | [inline]
pointer typedef | mbo::allocator< __ValueType > |
reallocate(pointer ptr, size_type old_size, size_type new_size) | mbo::reallocator< __ValueType > | [inline]
reference typedef | mbo::allocator< __ValueType > |
size_type typedef | mbo::allocator< __ValueType > |
value_type typedef | mbo::allocator< __ValueType > |

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > Member List

This is the complete list of members for mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, including all inherited members.

__assign(const _Ty &ref) | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
__clone(_Ty &ref) const | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
__getLock() const | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
__referenceCount() const | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
__release() | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline, private]
CriticalSection typedef | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > |
mx | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [mutable, private]
NullPtr typedef | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > |
operator *() | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
operator *() const | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
operator bool() const | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
operator!=(const RefCntPtr< _Ty, _THM, _THM_PTR > &lhs, const RefCntPtr< _Ty, _THM, _THM_PTR > &rhs) | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [related]
operator->() | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
operator->() const | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
operator<(const RefCntPtr< _Ty, _THM, _THM_PTR > &lhs, const RefCntPtr< _Ty, _THM, _THM_PTR > &rhs) | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [related]
operator=(_Ty *p) | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
operator=(const RefCntPtr &oth) | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
operator==(const RefCntPtr< _Ty, _THM, _THM_PTR > &lhs, const RefCntPtr< _Ty, _THM, _THM_PTR > &rhs) | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [related]
pRep | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [private]
RefCntPtr(_Ty *p=0) | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
RefCntPtr(const _Tx &x) | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
RefCntPtr(const RefCntPtr &oth) | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]
Rep typedef | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > |
Type typedef | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > |
~RefCntPtr() | mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | [inline]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::SingleThreaded::ThreadModel Member List

This is the complete list of members for mbo::SingleThreaded::ThreadModel, including all inherited members.

CriticalSection typedef | mbo::SingleThreaded::ThreadModel |
Decrement(IncDecVal *p) | mbo::SingleThreaded::ThreadModel | [static]
EventModel typedef | mbo::SingleThreaded::ThreadModel |
Increment(IncDecVal *p) | mbo::SingleThreaded::ThreadModel | [static]
Lock typedef | mbo::SingleThreaded::ThreadModel |
LockMulti typedef | mbo::SingleThreaded::ThreadModel |
LockSingle typedef | mbo::SingleThreaded::ThreadModel |
MutexModel typedef | mbo::SingleThreaded::ThreadModel |
PeekValue(const IncDecVal *p) | mbo::SingleThreaded::ThreadModel | [static]
Unlock typedef | mbo::SingleThreaded::ThreadModel |

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

mbo::string_conversion_error Member List

This is the complete list of members for mbo::string_conversion_error, including all inherited members.

string_conversion_error() mbo::string_conversion_error [inline]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > Member List

This is the complete list of members for mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, including all inherited members.

_MyType typedef | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > |
allocator typedef | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > |
append() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
assign(size_type count, const_reference val) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
assign(InputIterator first, InputIterator end) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
at(size_type index) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
at(size_type index) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
back() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
back() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
begin() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
begin() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
capacity() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
check_resize() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline, protected]
clear() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
const_pointer typedef | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > |
const_reference typedef | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > |
const_reverse_iterator typedef | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > |
delete_at(size_type nPos) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline, protected]
difference_type typedef | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > |
empty() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
end() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
end() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
erase(size_t where) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
erase(iterator where) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
erase(iterator first, iterator end) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
front() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
front() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
insert_at(size_type nPos, const_reference value) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline, protected]
m_acValues | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [protected]
m_alloc | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [protected]
m_nAppend | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [protected]
m_nCapacity | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [protected]
m_nMaxSize | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [protected]
m_nSize | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [protected]
max_size() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
operator=(const TDynamicArray &oth) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
operator[](size_type index) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
operator[](size_type index) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
pointer typedef | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > |
pop_back() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
pop_front() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
push_back(const_reference value) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
push_front(const_reference value) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
rbegin() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
rbegin() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
reference typedef | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > |
rend() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
rend() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
reserve(size_type nNewCapacity) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
resize(size_type nNewSize) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
resize(size_type nNewSize, value_type value) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
reverse_iterator typedef | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > |
size() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
size_type typedef | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > |
TDynamicArray(size_type nMinSize=__MinSize, size_type nAppend=__Append, size_type nMaxSize=0) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline, explicit]
TDynamicArray(const TDynamicArray &oth) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline]
value_type typedef | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > |
~TDynamicArray() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append > | [inline, virtual]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator Member List

This is the complete list of members for mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, including all inherited members.

const_iterator(const _MyType &array, size_type nPos=0) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
m_array | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [protected]
m_nPos | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [protected]
operator *() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator!=(const const_iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator+(difference_type diff) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator++() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator++(int) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator+=(difference_type diff) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator-(const const_iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator-(difference_type diff) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator--() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator--(int) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator-=(difference_type diff) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator->() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator<(const const_iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator<=(const const_iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator=(const const_iterator &rhs) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator==(const const_iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator>(const const_iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator>=(const const_iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]
operator[](size_type nPos) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator | [inline]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator Member List

This is the complete list of members for mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, including all inherited members.

iterator(_MyType &array, size_type nPos=0) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
m_array | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [protected]
m_nPos | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [protected]
operator *() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator *() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator!=(const iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator+(difference_type diff) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator++() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator++(int) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator+=(difference_type diff) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator-(const iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator-(difference_type diff) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator--() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator--(int) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator-=(difference_type diff) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator->() const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator->() | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator<(const iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator<=(const iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator=(const iterator &rhs) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator==(const iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator>(const iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator>=(const iterator &rhs) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator[](size_type nPos) | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]
operator[](size_type nPos) const | mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator | [inline]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::Vector< _Ty, _Cols > Member List

This is the complete list of members for mbo::Vector< _Ty, _Cols >, including all inherited members.

_Cols | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
Adj() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
Cofactor(size_t row, size_t col) | mbo::Matrix< _Ty, _Cols, 1 > | [private]
Cond() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
Det() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
IsDiagonal() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
IsLowerTiangular() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
IsNull() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
IsScalar() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
IsSingular() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
IsSkewSymmetric() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
IsSquare() | mbo::Matrix< _Ty, _Cols, 1 > | [inline, private]
IsSymmetric() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
IsUnit() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
IsUpperTiangular() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
Matrix(const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, 1 > | [private]
Norm() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
Null(const size_t &row, const size_t &col) | mbo::Matrix< _Ty, _Cols, 1 > | [private]
Null() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
numCols() | mbo::Matrix< _Ty, _Cols, 1 > | [inline, private]
numRows() | mbo::Matrix< _Ty, _Cols, 1 > | [inline, private]
operator *(const Matrix< _Ty, _Cols1Rows2, _Rows1 > &lhs, const Matrix< _Ty, _Cols2, _Cols1Rows2 > &rhs) friend template< class _Ty | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator *(const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator *(const Matrix< _Ty, _Cols, _Rows > &m, const T &no) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator *(const T &no, const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator *=(const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, 1 > | [private]
operator *=(const _Ty &c) | mbo::Matrix< _Ty, _Cols, 1 > | [private]
operator!(Matrix< _Ty, _Cols, _Rows > m) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator!=(const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator()(size_t row, size_t col) | mbo::Matrix< _Ty, _Cols, 1 > | [private]
operator+() | mbo::Matrix< _Ty, _Cols, 1 > | [inline, private]
operator+(const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator+=(const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, 1 > | [private]
operator-() | mbo::Matrix< _Ty, _Cols, 1 > | [private]
operator-(const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator-=(const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, 1 > | [private]
operator/(const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator/(const Matrix< _Ty, _Cols, _Rows > &m, const T &no) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator/(const T &no, const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator/=(const _Ty &c) | mbo::Matrix< _Ty, _Cols, 1 > | [private]
operator<<(ostream &o, Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator=(const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, 1 > | [private]
operator==(const Matrix< _Ty, _Cols, _Rows > &m1, const Matrix< _Ty, _Cols, _Rows > &m2) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator>>(istream &i, Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator^(const Matrix< _Ty, _Cols, _Rows > &m, const size_t &pow) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
operator^=(const size_t &pow) | mbo::Matrix< _Ty, _Cols, 1 > | [private]
operator~(const Matrix< _Ty, _Cols, _Rows > &m) | mbo::Matrix< _Ty, _Cols, 1 > | [friend]
Solve(const Matrix< _Ty, _Cols, _Rows > &v) const | mbo::Matrix< _Ty, _Cols, 1 > | [private]
Unit(const size_t &row) | mbo::Matrix< _Ty, _Cols, 1 > | [private]
Unit() | mbo::Matrix< _Ty, _Cols, 1 > | [private]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

std::check_fun_t< _Tp, _Arg > Member List

This is the complete list of members for std::check_fun_t< _Tp, _Arg >, including all inherited members.

_fun_type typedef | std::check_fun_t< _Tp, _Arg > | [private]
_M_f | std::check_fun_t< _Tp, _Arg > | [private]
check_fun_t(_fun_type __pf) | std::check_fun_t< _Tp, _Arg > | [inline, explicit]
operator()(const _Tp &__r, const _Arg &__x) const | std::check_fun_t< _Tp, _Arg > | [inline]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

std::deque2< _Ty, _Alloc > Member List

This is the complete list of members for std::deque2< _Ty, _Alloc >, including all inherited members.

_Mybase typedef | std::deque2< _Ty, _Alloc > |
_Myt typedef | std::deque2< _Ty, _Alloc > |
add_if_new(const _Ty &_Val) | std::deque2< _Ty, _Alloc > | [inline, virtual]
contains(const _Ty &_Val) const | std::deque2< _Ty, _Alloc > | [inline]
contains_no(const _Ty &_Val) const | std::deque2< _Ty, _Alloc > | [inline]
dyn_create(_Myt::size_type _Count,...) | std::deque2< _Ty, _Alloc > | [inline, static]
limit(size_type _Limit) | std::deque2< _Ty, _Alloc > | [inline, virtual]
operator bool() | std::deque2< _Ty, _Alloc > | [inline]
operator+=(deque2< _Ty_a, _Alloc_a > &container, const deque< _Ty_b, _Alloc_b > &values) | std::deque2< _Ty, _Alloc > | [related]
operator<<(deque2< _Ty_a, _Alloc_a > &container, const deque< _Ty_b, _Alloc_b > &values) | std::deque2< _Ty, _Alloc > | [related]
position(const _Ty &_Val) const | std::deque2< _Ty, _Alloc > | [inline]
sort() | std::deque2< _Ty, _Alloc > | [inline]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

std::list2< _Ty, _Alloc > Member List

This is the complete list of members for std::list2< _Ty, _Alloc >, including all inherited members.

_Mybase typedef | std::list2< _Ty, _Alloc > | [private]
_Myt typedef | std::list2< _Ty, _Alloc > | [private]
_Xran() const | std::list2< _Ty, _Alloc > | [inline, protected]
add_if_new(const _Ty &_Val) | std::list2< _Ty, _Alloc > | [inline, virtual]
at(size_type _Off) | std::list2< _Ty, _Alloc > | [inline]
at(size_type _Off) const | std::list2< _Ty, _Alloc > | [inline]
contains(const _Ty &_Val) const | std::list2< _Ty, _Alloc > | [inline]
contains_no(const _Ty &_Val) const | std::list2< _Ty, _Alloc > | [inline]
dyn_create(size_type _Count,...) | std::list2< _Ty, _Alloc > | [inline, static]
limit(size_type _Limit) | std::list2< _Ty, _Alloc > | [inline, virtual]
operator bool() | std::list2< _Ty, _Alloc > | [inline]
operator+=(list2< _Ty_a, _Alloc_a > &container, const list< _Ty_b, _Alloc_b > &values) | std::list2< _Ty, _Alloc > | [related]
operator<<(list2< _Ty_a, _Alloc_a > &container, const list< _Ty_b, _Alloc_b > &values) | std::list2< _Ty, _Alloc > | [related]
operator[](size_type _Off) | std::list2< _Ty, _Alloc > | [inline]
operator[](size_type _Off) const | std::list2< _Ty, _Alloc > | [inline]
position(const _Ty &_Val) const | std::list2< _Ty, _Alloc > | [inline]

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > Member List

This is the complete list of members for std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >, including all inherited members.

_Element typedef | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > |
_Element_check_fun_t typedef | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > |
_Kty typedef | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > |
_Kty_check_fun_t typedef | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > |
_Kty_container typedef | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > |
_Mybase typedef | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > |
_Myt typedef | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > |
_Ty typedef | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > |
_Ty_check_fun_t typedef | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > |
_Ty_container typedef | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > |
contains_key(const _Kty &key) const | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | [inline]
first_elem(_Ty &if_empty) | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | [inline]
first_elem(const _Ty &if_empty) const | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | [inline]
first_key(const _Kty &if_empty) const | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | [inline]
insert_elem(const _Kty &key, _Ty val) | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | [inline]
keys() const | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | [inline]
keys(_Kty_check_fun_t check) const | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | [inline]
operator[](const _Kty &key) | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | [inline]
operator[](const _Kty &key) const | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | [inline]
select(_Element_check_fun_t check) const | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | [inline]
values() const | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | [inline]
values(_Ty_check_fun_t check) const | std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc > | [inline]

Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

std::vector2< _Ty, _Alloc > Member List

This is the complete list of members for std::vector2< _Ty, _Alloc >, including all inherited members.

_Mybase typedef | std::vector2< _Ty, _Alloc > |
_Myt typedef | std::vector2< _Ty, _Alloc > |
add_if_new(const _Ty &_Val) | std::vector2< _Ty, _Alloc > | [inline, virtual]
contains(const _Ty &_Val) const | std::vector2< _Ty, _Alloc > | [inline]
contains_no(const _Ty &_Val) const | std::vector2< _Ty, _Alloc > | [inline]
dyn_create(_Myt::size_type _Count,...) | std::vector2< _Ty, _Alloc > | [inline, static]
limit(size_type _Limit) | std::vector2< _Ty, _Alloc > | [inline, virtual]
operator bool() | std::vector2< _Ty, _Alloc > | [inline]
operator+=(vector2< _Ty_a, _Alloc_a > &container, const vector< _Ty_b, _Alloc_b > &values) | std::vector2< _Ty, _Alloc > | [related]
operator<<(vector2< _Ty_a, _Alloc_a > &container, const vector< _Ty_b, _Alloc_b > &values) | std::vector2< _Ty, _Alloc > | [related]
position(const _Ty &_Val) const | std::vector2< _Ty, _Alloc > | [inline]
sort() | std::vector2< _Ty, _Alloc > | [inline]

Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > Member List

This is the complete list of members for TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, including all inherited members.

_MyType typedef | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > |
_ValueType typedef | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > |
append(const_reference value) | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
back() const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
back() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
begin() const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
begin() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
clear() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
const_reference typedef | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > |
empty() const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
end() const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
end() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
front() const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
front() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
full() const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
m_acValues | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [protected]
m_nSize | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [protected]
maxSize() const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
nextElement() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
operator[](size_t index) const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
operator[](size_t index) | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
pointer typedef | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > |
reference typedef | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > |
reset() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
size() const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]
TStaticArray() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd > | [inline]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator Member List

This is the complete list of members for TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, including all inherited members.

const_iterator(const _MyType &array, size_t pos=0) | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | [inline]
m_array | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | [protected]
m_pos | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | [protected]
operator *() const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | [inline]
operator!=(const_iterator &rhs) const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | [inline]
operator++() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | [inline]
operator++(int) | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | [inline]
operator--() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | [inline]
operator--(int) | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | [inline]
operator->() const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | [inline]
operator=(const const_iterator &rhs) | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | [inline]
operator==(const_iterator &rhs) const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator | [inline]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator Member List

This is the complete list of members for TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, including all inherited members.

iterator(_MyType &array, size_t pos=0) | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [inline]
m_array | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [protected]
m_pos | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [protected]
operator *() const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [inline]
operator *() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [inline]
operator!=(iterator &rhs) const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [inline]
operator++() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [inline]
operator++(int) | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [inline]
operator--() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [inline]
operator--(int) | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [inline]
operator->() const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [inline]
operator->() | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [inline]
operator=(const iterator &rhs) | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [inline]
operator==(iterator &rhs) const | TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator | [inline]

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: deque2.h Source File

deque2.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      deque2.h
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  */
00057 /* ------------------------------------------------------------------------ */
00058
00059 #ifndef _DEQUE2_H_
00060 #define _DEQUE2_H_
00061
00062 #include "Mbo.h"
00063
00064 #include <algorithm>
00065 #include <deque>
00066
00067 namespace std
00068 {
00069
00085 template <class _Ty, class _Alloc = allocator<_Ty> >
00086 class deque2 : public deque<_Ty, _Alloc>
00087 {
00088 public:
00089     typedef deque2<_Ty, _Alloc>   _Myt;
00090     typedef deque<_Ty, _Alloc>    _Mybase;
00096     virtual void limit(
00097             _IN size_type   _Limit
00098         )
00099     {
00100         if (size()>_Limit)
00101         {
00102             resize(_Limit);
00103         }
00104     }
00105
00114     pair<size_type,bool> position(
00115             _IN  const _Ty  &_Val
00116         ) const
00117     {
00118         size_type _Index = 0;
00119         for (const_iterator iter = begin(); iter != end(); iter++, _Index++)
00120         {
00121             if (*iter == _Val)
00122                 return pair<size_type,bool>(_Index,true);
00123         }
00124         return pair<size_type,bool>(-1,false);
00125     }
00126
00133     bool contains(
00134             _IN  const _Ty  &_Val
00135         ) const
00136     {
00137         return position(_Val).second;
00138     }
00139
00147     bool contains_no(
00148             _IN  const _Ty  &_Val
00149         ) const
00150     {
00151         return !position(_Val).second;
00152     }
00153
00160     virtual bool add_if_new(
00161             _IN  const _Ty  &_Val
00162         )
00163     {
00164         if (!contains(_Val))
00165         {
00166             push_back(_Val);
00167             return true;
00168         }
00169         return false;
00170     }
00171
00176     operator bool()
00177     {
00178         return size() > 0;
00179     }
00180
00185     void sort()
00186     {
00187         if (size()>1)
00188             std::sort(begin(), end());
00189     }
00190
00197     static _Myt dyn_create(
00198             _IN _Myt::size_type   _Count,
00199             ...
00200         )
00201     {
00202         _Myt       _Deque;
00203         va_list    _Args;
00204
00205         va_start(_Args, _Count);
00206         while(_Count--)
00207         {
00208             _Deque.push_back(va_arg(_Args, const _Ty));
00209         }
00210         va_end(_Args);
00211         return _Deque;
00212     }
00213
00214 };
00215
00231 template < class _Ty_a, class _Alloc_a
00232          , class _Ty_b, class _Alloc_b
00233          >
00234 deque2<_Ty_a, _Alloc_a> & operator += (
00235         _IN deque2<_Ty_a, _Alloc_a> & container,
00236         _IN const deque<_Ty_b, _Alloc_b> & values
00237     )
00238 {
00239     // NO clear
00240     for (deque2<_Ty_b, _Alloc_b>::const_iterator it = values.begin(); it != values.end(); ++it) {
00241         container.push_back((_Ty_a)*it);
00242     }
00243     return container;
00244 };
00245
00261 template < class _Ty_a, class _Alloc_a
00262          , class _Ty_b, class _Alloc_b
00263          >
00264 deque2<_Ty_a, _Alloc_a> & operator << (
00265         _IN deque2<_Ty_a, _Alloc_a> & container,
00266         _IN const deque<_Ty_b, _Alloc_b> & values
00267     )
00268 {
00269     container.clear();
00270     container += values;
00271     return container;
00272 };
00273
00274 }; // namespace std
00275
00276 #endif //_DEQUE2_H_
Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: enumset.hpp Source File

enumset.hpp

Go to the documentation of this file.
00001 /****************************************************************************//* ====================================================================== */
00047
00048 /* ------------------------------------------------------------------------ */
00076 /* ------------------------------------------------------------------------ */
00077
00083 /* ------------------------------------------------------------------------ */
00084
00085 #ifndef _ENUMSET_HPP_
00086 #define _ENUMSET_HPP_
00087
00088 #ifdef __MSC_VER
00089 #pragma comment (exestr, "This software includes material by M.Boerger (http://marcus-boerger.de/)")
00090 #endif
00091
00092 #include <stdarg.h>
00093 #include <exception>
00094
00095 #ifndef _Ty_list_default
00096
00099 #define _Ty_list_default size_t
00100 #endif
00101
00102 #ifndef _Ty_args_default
00103
00106 #define _Ty_args_default int
00107 #endif
00108
00109 /* ------------------------------------------------------------------------ */
00114 namespace mbo {
00115
00118 class enumset_exception: public std::exception{};
00119
00122 class input_range_exception: public enumset_exception {};
00123
00129 class demap_value_exception: public enumset_exception {};
00130
00136 class multi_value_exception: public demap_value_exception {};
00137
00143 class empty_value_exception: public demap_value_exception {};
00144
00150 class operator_na_exception: public enumset_exception {};
00151
00157 class iterator_exception: public enumset_exception {};
00158
00159 /* ------------------------------------------------------------------------ */
00237 template < typename _TEnum
00238          , typename _Ty_list  = _Ty_list_default
00239          , typename _Ty_args  = _Ty_args_default
00240          >
00241 class enumset
00242 {
00243 typedef enumset<_TEnum, _Ty_list, _Ty_args>  _MyType;
00244 public:
00245
00250     typedef _TEnum   TEnum;
00251
00256     typedef _Ty_list Ty_list;
00257
00262     typedef _Ty_args Ty_args;
00263
00266     static const Ty_list invalid_pos;
00267
00270     inline enumset () : list(0)
00271     {
00272     }
00273
00277     inline enumset (const enumset & set) : list(set.list)
00278     {
00279     }
00280
00287     inline explicit enumset (size_t count, ...)
00288         throw(input_range_exception)
00289         : list(0)
00290     {
00291         va_list   args;
00292         Ty_list   val;
00293
00294         va_start(args, count);
00295         while (count--)
00296         {
00297             val = (Ty_list)va_arg(args, Ty_args);
00298             list |= map(val);
00299         }
00300         va_end(args);
00301     }
00302
00309     inline enumset (const TEnum array[], size_t count)
00310         throw(input_range_exception)
00311         : list(0)
00312     {
00313         while (count)
00314         {
00315             list |= map(array[--count]);
00316         }
00317     }
00318
00323     inline enumset (const TEnum & value)
00324         throw(input_range_exception)
00325     {
00326         list = map(value);
00327     }
00328
00333     inline bool contains(const TEnum & value) const
00334     {
00335         return (*this >= value);
00336     }
00337
00343     inline bool contains(const enumset & set) const
00344     {
00345         return (*this >= set);
00346     }
00347
00354     inline int count() const
00355     {
00356         register int i = 0;
00357         register Ty_list p = 1;
00358
00359         while (p)
00360         {
00361             i += (list & p) ? 1 : 0;
00362             p *=2;
00363         }
00364         return i;
00365     }
00366
00370     inline bool empty() const
00371     {
00372         return count() == 0;
00373     }
00374
00378     inline enumset & clear()
00379     {
00380         list = 0;
00381         return *this;
00382     }
00383
00388     inline enumset & operator = (const TEnum & value)
00389         throw(input_range_exception)
00390     {
00391         list = map(value);
00392         return *this;
00393     }
00394
00399     inline enumset & operator = (const enumset & set)
00400     {
00401         list = set.list;
00402         return *this;
00403     }
00404
00409     inline enumset & operator += (const TEnum & value)
00410         throw(input_range_exception)
00411     {
00412         list |= map(value);
00413         return *this;
00414     }
00415
00420     inline enumset & operator += (const enumset & set)
00421     {
00422         list |= set.list;
00423         return *this;
00424     }
00425
00430     inline enumset operator + (const TEnum & value) const
00431     {
00432         register enumset ret = enumset(*this);
00433         ret += value;
00434         return ret;
00435     }
00436
00441     inline enumset operator + (const enumset & set) const
00442     {
00443         register enumset ret = enumset(*this);
00444         ret += set;
00445         return ret;
00446     }
00447
00452     inline enumset & operator -= (const TEnum &value)
00453         throw(input_range_exception)
00454     {
00455         list &= ~map(value);
00456         return *this;
00457     }
00458
00463     inline enumset & operator -= (const enumset &set)
00464     {
00465         list &= ~set.list;
00466         return *this;
00467     }
00468
00473     inline enumset operator - (const TEnum & value) const
00474     {
00475         enumset ret = enumset(*this);
00476         ret -= value;
00477         return ret;
00478     }
00479
00484     inline enumset operator - (const enumset & set) const
00485     {
00486         enumset ret = enumset(*this);
00487         ret -= set;
00488         return ret;
00489     }
00490
00495     inline enumset & operator *= (const TEnum &value)
00496         throw(input_range_exception)
00497     {
00498         list &= map(value);
00499         return *this;
00500     }
00501
00506     inline enumset & operator *= (const enumset &set)
00507     {
00508         list &= set.list;
00509         return *this;
00510     }
00511
00516     inline enumset operator * (const TEnum & value) const
00517     {
00518         register enumset ret = enumset(*this);
00519         ret *= value;
00520         return ret;
00521     }
00522
00527     inline enumset operator * (const enumset & set) const
00528     {
00529         register enumset ret = enumset(*this);
00530         ret *= set;
00531         return ret;
00532     }
00533
00538     inline enumset & operator ^= (const TEnum &value)
00539         throw(input_range_exception)
00540     {
00541         list ^= map(value);
00542         return *this;
00543     }
00544
00549     inline enumset & operator ^= (const enumset &set)
00550     {
00551         list ^= set.list;
00552         return *this;
00553     }
00554
00559     inline enumset operator ^ (const TEnum & value) const
00560     {
00561         register enumset ret = enumset(*this);
00562         ret ^= value;
00563         return ret;
00564     }
00565
00570     inline enumset operator ^ (const enumset & set) const
00571     {
00572         register enumset ret = enumset(*this);
00573         ret ^= set;
00574         return ret;
00575     }
00576
00581     inline bool operator & (const TEnum & value) const
00582         throw(input_range_exception)
00583     {
00584         return (list & map(value)) != 0;
00585     }
00586
00591     inline bool operator & (const enumset & set) const
00592     {
00593         return (list & set.list) != 0;
00594     }
00595
00600     inline bool operator | (const TEnum & value) const
00601         throw(input_range_exception)
00602     {
00603         return (list | map(value)) != 0;
00604     }
00605
00610     inline bool operator | (const enumset & set) const
00611     {
00612         return (list | set.list) != 0;
00613     }
00614
00619     inline bool operator == (const TEnum & value) const
00620         throw(input_range_exception)
00621     {
00622         return list == map(value);
00623     }
00624
00629     inline bool operator == (const enumset & set) const
00630     {
00631         return list == set.list;
00632     }
00633
00638     inline bool operator != (const TEnum & value) const
00639         throw(input_range_exception)
00640     {
00641         return list != map(value);
00642     }
00643
00648     inline bool operator != (const enumset & set) const
00649     {
00650         return list != set.list;
00651     }
00652
00657     inline bool operator < (const TEnum & value) const
00658         throw(input_range_exception)
00659     {
00660         register Ty_list comp = map(value);
00661         return ((list & comp) == list) && (list < comp);
00662     }
00663
00668     inline bool operator < (const enumset & set) const
00669     {
00670         return ((list & set.list) == list) && (list < set.list);
00671     }
00672
00677     inline bool operator <= (const TEnum & value) const
00678         throw(input_range_exception)
00679     {
00680         register Ty_list comp = map(value);
00681         return ((list & comp) == list) && (list <= comp);
00682     }
00683
00688     inline bool operator <= (const enumset & set) const
00689     {
00690         return ((list & set.list) == list) && (list <= set.list);
00691     }
00692
00697     inline bool operator > (const TEnum & value) const
00698         throw(input_range_exception)
00699     {
00700         register Ty_list comp = map(value);
00701         return ((list & comp) == comp) && (list > comp);
00702     }
00703
00708     inline bool operator > (const enumset & set) const
00709     {
00710         return ((list & set.list) == set.list) && (list > set.list);
00711     }
00712
00717     inline bool operator >= (const TEnum & value) const
00718         throw(input_range_exception)
00719     {
00720         register Ty_list comp = map(value);
00721         return ((list & comp) == comp) && (list >= comp);
00722     }
00723
00728     inline bool operator >= (const enumset & set) const
00729     {
00730         return ((list & set.list) == set.list) && (list >= set.list);
00731     }
00732
00737     inline Ty_list to_set() const
00738     {
00739         return list;
00740     }
00741
00744     inline operator Ty_list() const
00745     {
00746         return list;
00747     }
00748
00799     inline TEnum to_enum() const
00800         throw(demap_value_exception, multi_value_exception, multi_value_exception)
00801     {
00802         return static_cast<TEnum>(demap(list));
00803     }
00804
00817     inline operator TEnum() const
00818         throw(demap_value_exception, multi_value_exception, multi_value_exception)
00819     {
00820         return static_cast<TEnum>(demap(list));
00821     }
00822
00825     class const_iterator
00826         : public std::iterator<std::bidirectional_iterator_tag, TEnum, _Ty_list>
00827     {
00828     public:
00829         inline const_iterator(const _MyType & tenum, _Ty_list pos = 0)
00830             : m_tenum(tenum), m_pos(pos)
00831         {
00832             /* forward to first element or invalid_pos */
00833             while (m_pos != invalid_pos && !(m_tenum.list & _MyType::map(m_pos)))
00834             {
00835                 ++m_pos;
00836             }
00837         }
00838
00839         inline const TEnum operator * () const throw(iterator_exception)
00840         {
00841             if (m_pos == invalid_pos)
00842             {
00843                 throw iterator_exception();
00844             }
00845             return static_cast<TEnum>(m_pos);
00846         }
00847
00848         /* no -> operator */
00849
00850         inline const_iterator & operator ++ ()
00851         {
00852             while ((m_pos + 1) < invalid_pos)
00853             {
00854                 if (m_tenum.list & _MyType::map(++m_pos))
00855                 {
00856                     return *this;
00857                 }
00858             }
00859             m_pos = invalid_pos;
00860             return *this;
00861         }
00862
00863         inline const_iterator operator ++ (int)
00864         {
00865             /* postfix operator return an unchanged copy prior to the operaration */
00866             const_iterator it = const_iterator(m_array, m_pos);
00867             operator ++ ();
00868             return it;
00869         }
00870
00871         inline const_iterator & operator -- ()
00872         {
00873             while(m_pos && m_pos != invalid_pos)
00874             {
00875                 if (m_tenum.list & _MyType::map(--m_pos))
00876                 {
00877                     return *this;
00878                 }
00879             }
00880             m_pos = invalid_pos;
00881             return *this;
00882         }
00883
00884         inline const_iterator operator -- (int)
00885         {
00886             /* postfix operator return an unchanged copy prior to the operaration */
00887             const_iterator it = const_iterator(m_array, m_pos);
00888             operator -- ();
00889             return it;
00890         }
00891
00892         inline bool operator == (const_iterator &rhs) const
00893         {
00894             return &m_tenum == &rhs.m_tenum && m_pos == rhs.m_pos;
00895         }
00896
00897         inline bool operator != (const_iterator &rhs) const
00898         {
00899             return !operator == (rhs);
00900         }
00901
00902         inline const_iterator & operator = (const const_iterator & rhs)
00903         {
00904             new (this) const_iterator(rhs.m_tenum, rhs.m_pos);
00905             return *this;
00906         }
00907
00908     protected:
00909         const _MyType &   m_tenum;
00910         _Ty_list          m_pos;
00911     };
00912
00913     inline const_iterator begin() const
00914     {
00915         return const_iterator(*this, 0);
00916     }
00917
00918     inline const_iterator end() const
00919     {
00920         return const_iterator(*this, invalid_pos);
00921     }
00922
00923 friend class const_iterator;
00924
00925 private:
00926
00935     inline enumset & operator ~(void)
00936         throw(operator_na_exception)
00937     {
00938         throw operator_na_exception();
00939     }
00940
00943     Ty_list list;
00944
00950     inline static Ty_list map(Ty_list value)
00951         throw(input_range_exception)
00952     {
00953         if (value >= invalid_pos)
00954         {
00955             throw input_range_exception();
00956         }
00957         return (1L << value);
00958     }
00959
00971     inline static Ty_list /* not TEnum see comment */ demap(Ty_list mapping)
00972         throw(demap_value_exception, multi_value_exception, empty_value_exception)
00973     {
00974         register Ty_list i = 0;
00975         register Ty_list p = 1;
00976
00977         while (p)
00978         {
00979             if (mapping & p)
00980             {
00981                 if (mapping & (~p))
00982                 {
00983                     throw multi_value_exception();
00984                 }
00985                 return i;
00986             }
00987             i++;
00988             p <<= 1;
00989         }
00990         throw empty_value_exception();
00991         return 0;
00992     }
00993
00994 }; // template class enumset
00995
00996 template <typename _TEnum, typename _Ty_list, typename _Ty_args>
00997 const _Ty_list enumset<_TEnum, _Ty_list, _Ty_args>::invalid_pos = 8 * sizeof(Ty_list);
00998
00999 /****************************************************************************//**************************************************************************/
01062
01063 /****************************************************************************//**************************************************************************/
01183
01184 }; // namespace mbo
01185
01186 #endif // _ENUMSET_HPP_
Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: Class Members - Enumerations

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Related Functions

  • EThreadPriority : mbo::MboThread
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Class Members - Enumeration values

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Related Functions

  • PRIORITY_CRITICAL : mbo::MboThread
  • PRIORITY_HIGH : mbo::MboThread
  • PRIORITY_HIGHEST : mbo::MboThread
  • PRIORITY_IDLE : mbo::MboThread
  • PRIORITY_LOW : mbo::MboThread
  • PRIORITY_LOWEST : mbo::MboThread
  • PRIORITY_NORMAL : mbo::MboThread
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Class Members - Functions

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Related Functions
_ | a | b | c | d | e | f | g | i | k | l | m | n | o | p | r | s | t | u | v | w | ~

- _ -

  • __assign() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • __clone() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • __exchange() : mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • __getLock() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • __referenceCount() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • __release() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • _Xran() : std::list2< _Ty, _Alloc >

- a -

  • Action() : mbo::MboWinMsgHandler, mbo::MboThread
  • add_if_new() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • add_if_prefix_match() : mbo::CStrList
  • AddHWND() : mbo::MboWinMsgHandler
  • AddMutex() : mbo::CLockMulti
  • AddRef() : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • address() : mbo::allocator< __ValueType, __ReferenceType >
  • Adj() : mbo::Matrix< _Ty, _Cols, _Rows >
  • Alloc() : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • allocate() : mbo::mem_reallocator< __ValueType >, mbo::allocator< __ValueType, __ReferenceType >
  • append() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • assign() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • at() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, std::list2< _Ty, _Alloc >

- b -

  • back() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • begin() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >

- c -

  • CalcTextRect() : mbo::MboDrawWin
  • capacity() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • CCriticalSectionImpl() : mbo::CCriticalSectionImpl
  • CEventFake() : mbo::CEventFake
  • CEventImpl() : mbo::CEventImpl
  • check_fun_t() : std::check_fun_t< _Tp, _Arg >
  • check_resize() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • CIniData() : mbo::CIniData
  • clear() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • ClearSection() : mbo::CIniData
  • CLock() : mbo::CLock, mbo::CLockSingle
  • CLockMulti() : mbo::CLockMulti
  • CLockMulti::CLockMulti() : mbo::CLockMulti
  • CLockSingle() : mbo::CLockSingle
  • CMutexFake() : mbo::CMutexFake
  • CMutexImpl() : mbo::CMutexImpl
  • Cofactor() : mbo::Matrix< _Ty, _Cols, _Rows >
  • Cond() : mbo::Matrix< _Ty, _Cols, _Rows >
  • const_iterator() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • construct() : mbo::allocator< __ValueType, __ReferenceType >
  • contains() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • contains_key() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • contains_no() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • CStrList() : mbo::CStrList
  • CStrMapStr() : mbo::CStrMapStr
  • CUnlock() : mbo::CUnlock, mbo::CLock

- d -

  • Dealloc() : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • deallocate() : mbo::mem_reallocator< __ValueType >, mbo::allocator< __ValueType, __ReferenceType >
  • DecEntered() : mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::IMutex
  • Decrement() : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel
  • delete_at() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • destroy() : mbo::allocator< __ValueType, __ReferenceType >
  • Det() : mbo::Matrix< _Ty, _Cols, _Rows >
  • DrawBitmap() : mbo::MboDrawWin
  • DrawCircle() : mbo::MboDrawWin
  • DrawEllipse() : mbo::MboDrawWin
  • DrawIcon() : mbo::MboDrawWin
  • DrawLine() : mbo::MboDrawWin
  • DrawPolygon() : mbo::MboDrawWin
  • DrawRect() : mbo::MboDrawWin
  • DrawSetMode() : mbo::MboDrawWin
  • DrawText() : mbo::MboDrawWin
  • dyn_create() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >

- e -

  • empty() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • end() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • Enter() : mbo::CUnlock, mbo::CLockMulti, mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::CCriticalSectionFake, mbo::CCriticalSectionImpl, mbo::CLock, mbo::CLockSingle, mbo::CLockFake, mbo::IMutex, mbo::ICriticalSection, mbo::ILock
  • erase() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • Explode() : mbo::CStrList
  • ExplodeZZString() : mbo::CStrList

- f -

  • first_elem() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • first_key() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • ForceThreadName() : mbo::MboThread
  • front() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • full() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >

- g -

  • GetBool() : mbo::CIniData
  • GetColor() : mbo::CIniData
  • GetCounter() : mbo::MboEventThread, mbo::MboIntervalThread
  • GetDelay() : mbo::MboDelayedEventThread
  • GetFilename() : mbo::CIniData
  • GetFloat() : mbo::CIniData
  • GetHandle() : mbo::MutexList, mbo::CMutexImpl, mbo::IMutex
  • GetHeight() : mbo::MboDrawWin
  • GetHWND() : mbo::MboWinMsgHandler
  • GetIniBool() : mbo::CIniData
  • GetIniColor() : mbo::CIniData
  • GetIniFloat() : mbo::CIniData
  • GetIniInt() : mbo::CIniData
  • GetIniLong() : mbo::CIniData
  • GetIniMap() : mbo::CIniData
  • GetIniString() : mbo::CIniData
  • GetInt() : mbo::CIniData
  • GetInterval() : mbo::MboIntervalThread
  • GetKeyNames() : mbo::CIniData
  • GetLevel() : mbo::CUnlock, mbo::CLockMulti, mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::CCriticalSectionFake, mbo::CCriticalSectionImpl, mbo::CLock, mbo::CLockSingle, mbo::CLockFake, mbo::ICriticalSection, mbo::ILock
  • GetList() : mbo::CLockMulti
  • GetLock() : mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::CCriticalSectionFake, mbo::CCriticalSectionImpl, mbo::IMutex, mbo::ICriticalSection
  • GetLong() : mbo::CIniData
  • GetMap() : mbo::CIniData
  • GetMaxSizeX() : mbo::MboDrawWin
  • GetMaxSizeY() : mbo::MboDrawWin
  • GetMinSizeX() : mbo::MboDrawWin
  • GetMinSizeY() : mbo::MboDrawWin
  • GetModuleHandle() : mbo::MboWinMsgHandler
  • GetPositionX() : mbo::MboDrawWin
  • GetPositionY() : mbo::MboDrawWin
  • GetScreenSizeX() : mbo::MboDrawWin
  • GetScreenSizeY() : mbo::MboDrawWin
  • GetSectionNames() : mbo::CIniData
  • GetSectionPrefix() : mbo::CIniData
  • GetSizeX() : mbo::MboDrawWin
  • GetSizeY() : mbo::MboDrawWin
  • GetString() : mbo::CIniData
  • GetThreadId() : mbo::MboThread
  • GetThreadName() : mbo::MboThread
  • GetWidth() : mbo::MboDrawWin

- i -

  • IncEntered() : mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::IMutex
  • Increment() : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel
  • IniDataGetLock() : mbo::CIniData
  • insert_at() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • insert_elem() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • IsDiagonal() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsLowerTiangular() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsNull() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsRunning() : mbo::MboThread
  • IsScalar() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsSignaled() : mbo::MboEventThread
  • IsSingular() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsSkewSymmetric() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsSquare() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsStopping() : mbo::MboThread
  • IsSymmetric() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsUnit() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsUpperTiangular() : mbo::Matrix< _Ty, _Cols, _Rows >
  • IsWindow() : mbo::MboDrawWin
  • IsWindowVisible() : mbo::MboDrawWin
  • IsWndSizeable() : mbo::MboDrawWin
  • IsWndSizingOrMoving() : mbo::MboDrawWin
  • iterator() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator

- k -

  • KeyNameExists() : mbo::CIniData
  • keys() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • KillThread() : mbo::MboThread

- l -

  • Leave() : mbo::CUnlock, mbo::CLockMulti, mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::CCriticalSectionFake, mbo::CCriticalSectionImpl, mbo::CLock, mbo::CLockSingle, mbo::CLockFake, mbo::ICriticalSection, mbo::ILock
  • limit() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • LockedVar() : mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >

- m -

  • Matrix() : mbo::Matrix< _Ty, _Cols, _Rows >
  • MatrixException() : mbo::MatrixException
  • max_size() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >
  • maxSize() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >
  • MboDelayedEventThread() : mbo::MboDelayedEventThread, mbo::MboEventThread
  • MboDrawWin() : mbo::MboDrawWin
  • MboEventThread() : mbo::MboEventThread
  • MboIntervalThread() : mbo::MboIntervalThread
  • MboThread() : mbo::MboThread
  • MboWinMsgHandler() : mbo::MboWinMsgHandler
  • MessageHandler() : mbo::MboWinMsgHandler
  • move() : mbo::mem_reallocator< __ValueType >, mbo::reallocator< __ValueType >
  • MutexList() : mbo::MutexList, mbo::IMutex

- n -

  • nextElement() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >
  • Norm() : mbo::Matrix< _Ty, _Cols, _Rows >
  • Null() : mbo::Matrix< _Ty, _Cols, _Rows >
  • nullptr_access() : mbo::NullPointer< _Ty >::nullptr_access
  • numCols() : mbo::Matrix< _Ty, _Cols, _Rows >
  • numRows() : mbo::Matrix< _Ty, _Cols, _Rows >

- o -

  • OnButtonDblClk() : mbo::MboDrawWin
  • OnButtonDown() : mbo::MboDrawWin
  • OnButtonUp() : mbo::MboDrawWin
  • OnThreadStart() : mbo::MboThread
  • OnThreadStop() : mbo::MboThread
  • OnWindowCreated() : mbo::MboWinMsgHandler, mbo::MboDrawWin
  • OnWndSized() : mbo::MboDrawWin
  • operator *() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::NullPointer< _Ty >, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator *=() : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator bool() : std::vector2< _Ty, _Alloc >, mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::NullPointer< _Ty >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • operator const T() : mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • operator T() : mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • operator!=() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator()() : mbo::less_cstr_ic, mbo::Matrix< _Ty, _Cols, _Rows >, std::check_fun_t< _Tp, _Arg >
  • operator+() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator++() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator+=() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator-() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator--() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator-=() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator->() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • operator/=() : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator<() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator<<() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator<=() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator=() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::CStrList, mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::Matrix< _Ty, _Cols, _Rows >, mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • operator==() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator>() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator>=() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator[]() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >, std::list2< _Ty, _Alloc >
  • operator^=() : mbo::Matrix< _Ty, _Cols, _Rows >

- p -

  • PeekValue() : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel
  • pivot() : mbo::Matrix< _Ty, _Cols, _Rows >
  • pop_back() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • pop_front() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • position() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • PostMessage() : mbo::MboWinMsgHandler
  • ProcessDefault() : mbo::MboWinMsgHandler
  • ProcessMessage() : mbo::MboWinMsgHandler, mbo::MboDrawWin
  • Pulse() : mbo::CEventFake, mbo::CEventImpl, mbo::IEvent
  • push_back() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • push_front() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >

- r -

  • rbegin() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • ReadBool() : mbo::CIniData
  • ReadColor() : mbo::CIniData
  • ReadFloat() : mbo::CIniData
  • ReadInt() : mbo::CIniData
  • ReadLong() : mbo::CIniData
  • ReadMap() : mbo::CIniData
  • ReadString() : mbo::CIniData
  • reallocate() : mbo::mem_reallocator< __ValueType >, mbo::reallocator< __ValueType >
  • RefCntPtr() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • RefCntRep() : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • Release() : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • rend() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • reserve() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • reset() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >
  • Reset() : mbo::CEventFake, mbo::CEventImpl, mbo::IEvent
  • resize() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >

- s -

  • Scan() : mbo::CStrMapStr
  • SectionExists() : mbo::CIniData
  • select() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • Set() : mbo::CEventFake, mbo::CEventImpl, mbo::IEvent
  • SetDelay() : mbo::MboDelayedEventThread
  • SetEvent() : mbo::MboEventThread
  • SetInterval() : mbo::MboIntervalThread
  • SetThreadName() : mbo::MboThread
  • SetThreadPriority() : mbo::MboThread
  • size() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::CLockMulti
  • Solve() : mbo::Matrix< _Ty, _Cols, _Rows >
  • sort() : std::vector2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • Start() : mbo::MboThread
  • Stop() : mbo::MboWinMsgHandler, mbo::MboDelayedEventThread, mbo::MboEventThread, mbo::MboThread
  • string_conversion_error() : mbo::string_conversion_error

- t -

  • TDynamicArray() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • ThreadProc() : mbo::MboDelayedEventThread, mbo::MboEventThread, mbo::MboIntervalThread, mbo::MboThread
  • ThreadProcCaller() : mbo::MboThread
  • ToCStr() : mbo::CStrMapStr, mbo::CStrList
  • Try() : mbo::CLockMulti, mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl, mbo::IMutex
  • TStaticArray() : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >

- u -

  • Unit() : mbo::Matrix< _Ty, _Cols, _Rows >

- v -

  • values() : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >

- w -

  • Wait() : mbo::CEventFake, mbo::CEventImpl, mbo::IEvent
  • WaitFor() : mbo::MboThread
  • WndCalcMetrics() : mbo::MboWinMsgHandler, mbo::MboDrawWin
  • WndClassName() : mbo::MboWinMsgHandler
  • WndClear() : mbo::MboDrawWin
  • WndCreate() : mbo::MboWinMsgHandler, mbo::MboDrawWin
  • WndDestroy() : mbo::MboWinMsgHandler, mbo::MboDrawWin
  • WndDraw() : mbo::MboDrawWin
  • WndHide() : mbo::MboDrawWin
  • WndLoadExtent() : mbo::MboDrawWin
  • WndRegister() : mbo::MboWinMsgHandler
  • WndRegisterHandle() : mbo::MboDrawWin
  • WndRestore() : mbo::MboDrawWin
  • WndSaveExtent() : mbo::MboDrawWin
  • WndSetIconBig() : mbo::MboDrawWin
  • WndSetIconBoth() : mbo::MboDrawWin
  • WndSetIconSmall() : mbo::MboDrawWin
  • WndSetPosition() : mbo::MboDrawWin
  • WndSetSize() : mbo::MboDrawWin
  • WndSetTitle() : mbo::MboDrawWin
  • WndShow() : mbo::MboDrawWin
  • WndTitleText() : mbo::MboWinMsgHandler
  • WndUpdate() : mbo::MboDrawWin
  • WriteBool() : mbo::CIniData
  • WriteColor() : mbo::CIniData
  • WriteFloat() : mbo::CIniData
  • WriteInt() : mbo::CIniData
  • WriteLong() : mbo::CIniData
  • WriteMap() : mbo::CIniData
  • WriteString() : mbo::CIniData

- ~ -

  • ~CCriticalSectionImpl() : mbo::CCriticalSectionImpl
  • ~CIniData() : mbo::CIniData
  • ~CLock() : mbo::CLock
  • ~CLockMulti() : mbo::CLockMulti
  • ~CLockSingle() : mbo::CLockSingle
  • ~CMutexImpl() : mbo::CMutexImpl
  • ~CStrList() : mbo::CStrList
  • ~CStrMap() : mbo::CStrMap< __Ty, __CTy, __Pr, __Alloc >
  • ~CStrMapStr() : mbo::CStrMapStr
  • ~CUnlock() : mbo::CUnlock
  • ~ICriticalSection() : mbo::ICriticalSection
  • ~IEvent() : mbo::IEvent
  • ~ILock() : mbo::ILock
  • ~MboDelayedEventThread() : mbo::MboDelayedEventThread
  • ~MboDrawWin() : mbo::MboDrawWin
  • ~MboEventThread() : mbo::MboEventThread
  • ~MboIntervalThread() : mbo::MboIntervalThread
  • ~MboThread() : mbo::MboThread
  • ~MboWinMsgHandler() : mbo::MboWinMsgHandler
  • ~MutexList() : mbo::MutexList
  • ~RefCntPtr() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >
  • ~TDynamicArray() : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Class Members - Related Functions

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Related Functions

  • _Cols : mbo::Matrix< _Ty, _Cols, _Rows >
  • CUnlock : mbo::CUnlock, mbo::CLock
  • MboDelayedEventThread : mbo::MboDelayedEventThread, mbo::MboEventThread
  • MboThreadProc : mbo::MboThread
  • MboWndProc : mbo::MboWinMsgHandler
  • MutexList : mbo::MutexList, mbo::IMutex
  • operator * : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::NullPointer< _Ty >, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator! : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator!= : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator+ : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator+=() : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator- : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator/ : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator<() : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • operator<< : std::vector2< _Ty, _Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator== : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator, mbo::Matrix< _Ty, _Cols, _Rows >
  • operator>> : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator^ : mbo::Matrix< _Ty, _Cols, _Rows >
  • operator~ : mbo::Matrix< _Ty, _Cols, _Rows >
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Class Members - Typedefs

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Related Functions
_ | a | c | d | e | l | m | n | o | p | r | s | t | u | v | w

- _ -

  • _Element : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _Element_check_fun_t : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _fun_type : std::check_fun_t< _Tp, _Arg >
  • _Kty : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _Kty_check_fun_t : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _Kty_container : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _Mybase : std::vector2< _Ty, _Alloc >, std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • _Myt : std::vector2< _Ty, _Alloc >, std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >, std::list2< _Ty, _Alloc >, std::deque2< _Ty, _Alloc >
  • _MyType : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • _Ty : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _Ty_check_fun_t : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _Ty_container : std::map2< __Kty, __Ty, __Kty_container, __Ty_container, __Pr, __Alloc >
  • _ValueType : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >

- a -

  • allocator : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >

- c -

  • const_pointer : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >
  • const_reference : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >
  • const_reverse_iterator : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • CriticalSection : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel, mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >

- d -

  • difference_type : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >

- e -

  • EventModel : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel

- l -

  • Lock : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel
  • LockMulti : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel
  • LockSingle : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel

- m -

  • MAP_HWND : mbo::MboWinMsgHandler
  • MutexModel : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel

- n -

  • NullPtr : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >

- o -

  • other : mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other >

- p -

  • pointer : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >

- r -

  • reference : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >
  • Rep : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >, mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • reverse_iterator : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >

- s -

  • size_type : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >

- t -

  • Type : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >

- u -

  • Unlock : mbo::SingleThreaded::ThreadModel, mbo::MultiThreaded::ThreadModel

- v -

  • value_type : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >, mbo::allocator< __ValueType, __ReferenceType >

- w -

  • WndClassList : mbo::MboWinMsgHandler
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Class Members - Variables

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Related Functions
_ | c | g | m | p | r | t | v

- _ -

  • _M_f : std::check_fun_t< _Tp, _Arg >

- c -

  • CLock : mbo::CLock, mbo::CLockSingle

- g -

  • g_mhwndList : mbo::MboWinMsgHandler
  • g_vWndClassList : mbo::MboWinMsgHandler

- m -

  • m_acValues : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • m_alloc : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • m_array : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • m_bInSizeMove : mbo::MboDrawWin
  • m_cs : mbo::CCriticalSectionImpl
  • m_dwThreadId : mbo::MboThread
  • m_hDelay : mbo::MboDelayedEventThread
  • m_hEvent : mbo::MboEventThread, mbo::CEventImpl
  • m_hIsStopping : mbo::MboThread
  • m_hMemDC : mbo::MboDrawWin
  • m_hMutex : mbo::CMutexImpl
  • m_hScrDC : mbo::MboDrawWin
  • m_hThread : mbo::MboThread
  • m_hwnd : mbo::MboWinMsgHandler
  • m_lEntered : mbo::MutexList, mbo::CMutexFake, mbo::CMutexImpl
  • m_lLevel : mbo::CUnlock
  • m_lx : mbo::CUnlock
  • m_mx : mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >
  • m_mxDelay : mbo::MboDelayedEventThread
  • m_mxIniData : mbo::CIniData
  • m_mxStartStop : mbo::MboThread
  • m_nAppend : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • m_nCapacity : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • m_nCounter : mbo::MboEventThread, mbo::MboIntervalThread
  • m_nDelay : mbo::MboDelayedEventThread
  • m_nHeight : mbo::MboDrawWin
  • m_nInterval : mbo::MboIntervalThread
  • m_nMaxSize : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • m_nMaxSizeX : mbo::MboDrawWin
  • m_nMaxSizeY : mbo::MboDrawWin
  • m_nMinSizeX : mbo::MboDrawWin
  • m_nMinSizeY : mbo::MboDrawWin
  • m_nPos : mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::iterator, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >::const_iterator
  • m_nSize : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >, mbo::TDynamicArray< __ValueType, __Allocator, __MinSize, __Append >
  • m_nSizeX : mbo::MboDrawWin
  • m_nSizeY : mbo::MboDrawWin
  • m_nWidth : mbo::MboDrawWin
  • m_plx : mbo::CLock
  • m_pmx : mbo::CLock, mbo::CLockSingle
  • m_pos : TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::iterator, TStaticArray< __ValueType, __MaxSize, __AccessBeyondEnd >::const_iterator
  • m_strFilename : mbo::CIniData
  • m_strSectionPrefix : mbo::CIniData
  • m_strWndClassName : mbo::MboWinMsgHandler
  • m_szThreadName : mbo::MboThread
  • m_vpme : mbo::CLockMulti
  • mx : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >

- p -

  • pData : mbo::RefCntRep< _Ty, _THREAD_MODEL >
  • pRep : mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >

- r -

  • refCnt : mbo::RefCntRep< _Ty, _THREAD_MODEL >

- t -

  • t : mbo::LockedVar< bool, ThreadModel >, mbo::LockedVar< T, _THREAD_MODEL >

- v -

  • Val : mbo::Matrix< _Ty, _Cols, _Rows >
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: File Members - Defines

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines
_ | c | d | m | r | s | t

- _ -

  • __DEPRECATED : TDynamicArray.h
  • __THROW2 : Mbo.h
  • __THROWS : Mbo.h
  • __USE_FACET : MboTString.h
  • _TS : MboTString.h
  • _Ty_args_default : enumset.hpp
  • _Ty_list_default : enumset.hpp

- c -

  • CStrListContainer : MboStrList.h

- d -

  • DebugBreak : Mbo.h
  • DEPRECATED : Mbo.h

- m -

  • MAP_CONTAINER : map2.h
  • max : MboMatrix.h
  • MBO_API : Mbo.h
  • MBO_MAP2_CONST_ARRAY_ACCESS : map2.h
  • MBO_MEMBER_MUTEX_IMPL : MboSynch.h
  • MBO_MULTI_LOCK_SLEEPTIME : MboSynch.h
  • MBO_TDA_STL_ITERATOR : TDynamicArray.h
  • mbo_tda_throw_if_not : TDynamicArray.h
  • MBO_TDA_VERIFY : TDynamicArray.h
  • mbo_throw_if_not : Mbo.h
  • MBO_THROWS_EXCEPTIONS : Mbo.h
  • MboStrList0 : MboStrList.h
  • MboStrList1 : MboStrList.h
  • MboStrList2 : MboStrList.h
  • MboStrList3 : MboStrList.h
  • MboStrList4 : MboStrList.h
  • MboStrList5 : MboStrList.h
  • min : MboMatrix.h

- r -

  • RGB_BLACK : MboDrawWin.h
  • RGB_BLUE : MboDrawWin.h
  • RGB_BROWN : MboDrawWin.h
  • RGB_CYAN : MboDrawWin.h
  • RGB_GRAY : MboDrawWin.h
  • RGB_GREEN : MboDrawWin.h
  • RGB_HINT : MboDrawWin.h
  • RGB_LTBLUE : MboDrawWin.h
  • RGB_LTCYAN : MboDrawWin.h
  • RGB_LTGRAY : MboDrawWin.h
  • RGB_LTGREEN : MboDrawWin.h
  • RGB_LTMAGENTA : MboDrawWin.h
  • RGB_LTRED : MboDrawWin.h
  • RGB_MAGENTA : MboDrawWin.h
  • RGB_RED : MboDrawWin.h
  • RGB_WHITE : MboDrawWin.h
  • RGB_YELLOW : MboDrawWin.h

- s -

  • snprintf : MboStrHelper.h

- t -

  • throw_runtime_error_if_not : TStaticArray.h
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: File Members - Enumerations

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines

  • DRAW_MODE : MboDrawWin.h
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: File Members - Enumeration values

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines

  • DRAW_MODE_FILL : MboDrawWin.h
  • DRAW_MODE_HS_BDIAGONAL : MboDrawWin.h
  • DRAW_MODE_HS_CROSS : MboDrawWin.h
  • DRAW_MODE_HS_DIAGCROSS : MboDrawWin.h
  • DRAW_MODE_HS_FDIAGONAL : MboDrawWin.h
  • DRAW_MODE_HS_HORIZONTAL : MboDrawWin.h
  • DRAW_MODE_HS_VERTICAL : MboDrawWin.h
  • DRAW_MODE_TRANSPARENT : MboDrawWin.h
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: File Members - Functions

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines
c | l | n | o | s | t | w

- c -

  • check_fun() : map2.h

- l -

  • LeftString() : MboStrHelper.h

- n -

  • NormalizeRect() : MboDrawWin.h

- o -

  • operator *() : MboMatrix.h
  • operator!() : MboMatrix.h
  • operator!=() : MboMatrix.h
  • operator+() : MboMatrix.h
  • operator-() : MboMatrix.h
  • operator<<() : MboMatrix.h
  • operator==() : MboMatrix.h
  • operator>>() : MboMatrix.h
  • operator^() : MboMatrix.h
  • operator~() : MboMatrix.h

- s -

  • StrApplyReplaceMap() : MboStrMap.h
  • StrCreate() : MboTString.h
  • StrEndsWith() : MboStrHelper.h
  • StrFrom() : MboStrHelper.h
  • StrFromBool() : MboStrHelper.h
  • StrFromColor() : MboIniData.h
  • StrFromDouble() : MboStrHelper.h
  • StrFromFloat() : MboStrHelper.h
  • StrLower() : MboStrHelper.h
  • StrOccurences() : MboStrHelper.h
  • StrParseEnvVars() : MboStrHelper.h
  • StrSplit() : MboStrHelper.h
  • StrStartsWith() : MboStrHelper.h
  • StrTo() : MboStrHelper.h
  • StrToColor() : MboIniData.h
  • StrToFloat() : MboStrHelper.h
  • StrToInt() : MboStrHelper.h
  • StrToLong() : MboStrHelper.h
  • StrToWStr() : MboTString.h
  • StrTrim() : MboStrHelper.h
  • StrTrimLeft() : MboStrHelper.h
  • StrTrimRight() : MboStrHelper.h
  • StrUCFirst() : MboStrHelper.h
  • StrUpper() : MboStrHelper.h

- t -

  • TStrCreate() : MboTString.h
  • TStrFrom() : MboTString.h

- w -

  • WStrToStr() : MboTString.h
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: File Members - Typedefs

All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines

  • CriticalSection : MboSynch.h
  • EventModel : MboSynch.h
  • IncDecVal : MboSynch.h
  • Lock : MboSynch.h
  • LockMulti : MboSynch.h
  • LockSingle : MboSynch.h
  • MboString : MboTString.h
  • MultiThreadedModel : MboSynch.h
  • MutexModel : MboSynch.h
  • SingleThreadedModel : MboSynch.h
  • TCHAR : MboTString.h
  • ThreadModel : MboSynch.h
  • tstring : MboTString.h
  • Unlock : MboSynch.h
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: File Members - Variables

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
All | Functions | Variables | Typedefs | Enumerations | Enumeration values | Defines

  • true : MboMatrix.h
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: list2.h Source File

list2.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      list2.h
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  */
00057 /* ------------------------------------------------------------------------ */
00058
00059 #ifndef _LIST2_H_
00060 #define _LIST2_H_
00061
00062 #include "Mbo.h"
00063
00064 #include <list>
00065 #include <stdexcept>
00066
00067 namespace std
00068 {
00069
00090 template <class _Ty, class _Alloc = allocator<_Ty> >
00091 class list2 : public list<_Ty, _Alloc>
00092 {
00093 typedef list2<_Ty, _Alloc>   _Myt;
00094 typedef list<_Ty, _Alloc>    _Mybase;
00095 public:
00096
00101     virtual void limit(
00102             _IN size_type   _Limit
00103         )
00104     {
00105         if (size()>_Limit)
00106         {
00107             resize(_Limit);
00108         }
00109     }
00110
00119     pair<size_type,bool> position(
00120             _IN  const _Ty  &_Val
00121         ) const
00122     {
00123         size_type _Index = 0;
00124         for (const_iterator iter = begin(); iter != end(); iter++, _Index++)
00125         {
00126             if (*iter == _Val)
00127                 return pair<size_type,bool>(_Index,true);
00128         }
00129         return pair<size_type,bool>(-1,false);
00130     }
00131
00138     bool contains(
00139             _IN  const _Ty  &_Val
00140         ) const
00141     {
00142         return position(_Val).second;
00143     }
00144
00152     bool contains_no(
00153             _IN  const _Ty  &_Val
00154         ) const
00155     {
00156         return !position(_Val).second;
00157     }
00158
00165     virtual bool add_if_new(
00166             _IN  const _Ty  &_Val
00167         )
00168     {
00169         if (!contains(_Val))
00170         {
00171             push_back(_Val);
00172             return true;
00173         }
00174         return false;
00175     }
00176
00181     operator bool()
00182     {
00183         return size() > 0;
00184     }
00185
00190     reference at(
00191             _IN size_type _Off
00192         )
00193     {   // subscript mutable sequence with checking
00194         if (size() <= _Off)
00195             _Xran();
00196         iterator it = begin();
00197         while(_Off--) ++it;
00198         return *it;
00199     }
00200
00205     const_reference at(
00206             _IN size_type _Off
00207         ) const
00208     {   // subscript nonmutable sequence with checking
00209         if (size() <= _Off)
00210             _Xran();
00211         const_iterator it = begin();
00212         while(_Off--) ++it;
00213         return *it;
00214     }
00215
00220     reference operator[](
00221             _IN size_type _Off
00222         )
00223     {   // subscript mutable sequence
00224         return at(_Off);
00225     }
00226
00231     const_reference operator[](
00232             _IN size_type _Off
00233         ) const
00234     {   // subscript nonmutable sequence
00235         return at(_Off);
00236     }
00237
00243     static list2<_Ty, _Alloc> dyn_create(
00244             _IN size_type   _Count,
00245             ...
00246         )
00247     {
00248         _Myt       _List;
00249         va_list    _Args;
00250
00251         va_start(_Args, _Count);
00252         while(_Count--)
00253         {
00254             _List.push_back(va_arg(_Args, const _Ty));
00255         }
00256         va_end(_Args);
00257         return _List;
00258     }
00259
00260 protected:
00261
00264     void _Xran() const
00265     {   // report an out_of_range error
00266         _THROW(out_of_range, "invalid list2<T> subscript");
00267     }
00268
00269 };
00270
00286 template < class _Ty_a, class _Alloc_a
00287          , class _Ty_b, class _Alloc_b
00288          >
00289 list2<_Ty_a, _Alloc_a> & operator += (
00290         _IN list2<_Ty_a, _Alloc_a> & container,
00291         _IN const list<_Ty_b, _Alloc_b> & values
00292     )
00293 {
00294     // NO clear
00295     for (list2<_Ty_b, _Alloc_b>::const_iterator it = values.begin(); it != values.end(); ++it) {
00296         container.push_back((_Ty_a)*it);
00297     }
00298     return container;
00299 };
00300
00316 template < class _Ty_a, class _Alloc_a
00317          , class _Ty_b, class _Alloc_b
00318          >
00319 list2<_Ty_a, _Alloc_a> & operator << (
00320         _IN list2<_Ty_a, _Alloc_a> & container,
00321         _IN const list<_Ty_b, _Alloc_b> & values
00322     )
00323 {
00324     container.clear();
00325     container += values;
00326     return container;
00327 };
00328
00329 }; // namespace std
00330
00331 #endif // _LIST2_H_
Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: map2.h Source File

map2.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      map2.h
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  * - list2.h
00046  * - vector2.h
00047  * - deque2.h
00048  */
00060 /* ------------------------------------------------------------------------ */
00061
00062 #if defined(_MSC_VER) && _MSC_VER >= 1200
00063 #pragma once
00064 #endif
00065
00066 #ifndef MBO_MAP2_CONST_ARRAY_ACCESS
00067 #define MBO_MAP2_CONST_ARRAY_ACCESS 1
00068 #endif
00069
00070 #ifndef _MAP2_H_
00071 #define _MAP2_H_
00072
00073 #include "Mbo.h"
00074
00075 #include "list2.h"
00076 #include "vector2.h"
00077 #include "deque2.h"
00078 #include <map>
00079 #include <functional>
00080 #include <stdexcept>
00081
00082 namespace std
00083 {
00084
00096 template <class _Tp, class _Arg>
00097 class check_fun_t
00098     : public binary_function<_Tp,const _Arg&,bool>
00099 {
00100 typedef bool (_Tp::*_fun_type)(const _Arg&) const;
00101 public:
00104     explicit check_fun_t(_fun_type __pf) : _M_f(__pf) {}
00105
00113     bool operator()(const _Tp& __r, const _Arg & __x) const
00114     {
00115         return (__r.*_M_f)(__x);
00116     }
00117 private:
00118     _fun_type _M_f;
00119 };
00120
00130 template <class _Tp, class _Arg>
00131 check_fun_t<_Tp,_Arg> check_fun(bool (_Tp::*__f)(const _Arg&) const)
00132 {
00133     return check_fun_t<_Tp,_Arg>(__f);
00134 };
00135
00142 #define MAP_CONTAINER std::deque2
00143
00168 template <class __Kty,
00169     class __Ty,
00170     class __Kty_container = MAP_CONTAINER<__Kty>,
00171     class __Ty_container  = MAP_CONTAINER<__Ty>,
00172     class __Pr            = less<__Kty>,
00173     class __Alloc         = allocator<pair<const __Kty, __Ty> > >
00174 class map2
00175     : public map<__Kty, __Ty, __Pr, __Alloc> // ms<_Ty>
00176 {
00177 public:
00178     typedef typename __Kty_container                     _Kty_container;
00179     typedef typename __Ty_container                      _Ty_container;
00180     typedef map2<__Kty, __Ty, _Kty_container, _Ty_container, __Pr, __Alloc> _Myt;
00181     typedef map<__Kty, __Ty, __Pr, __Alloc>              _Mybase;
00182     typedef pair<const __Kty, __Ty>                      _Element;
00183     typedef typename __Kty                               _Kty;
00184     typedef typename __Ty                                _Ty;
00185     typedef typename check_fun_t<_Myt,_Element>          _Element_check_fun_t;
00186     typedef typename check_fun_t<_Kty_container,__Kty>   _Kty_check_fun_t;
00187     typedef typename check_fun_t<_Ty_container,__Ty>     _Ty_check_fun_t;
00189     // inherit array operator
00190     _Ty& operator[] (const _Kty & key)
00191     {
00192         iterator it = find(key);
00193         if (it == end())
00194         {
00195             it = insert_elem(key, _Ty()).first;
00196         }
00197         return (*it).second;
00198     }
00199
00200 #if MBO_MAP2_CONST_ARRAY_ACCESS
00201     // const array access does not work with VC.6
00202 # ifdef _MSC_VER
00203 # pragma warning(disable: 4290)
00204 # endif
00205
00211     const _Ty& operator[] (const _Kty & key) const throw(std::out_of_range)
00212     {
00213         const_iterator it = find(key);
00214         if (it == end())
00215         {
00216             throw std::out_of_range("Key does not exist");
00217         }
00218         return (*it).second;
00219     }
00220 # ifdef _MSC_VER
00221 # pragma warning(default: 4290)
00222 # endif
00223 #endif
00224
00240     _Kty_container keys() const
00241     {
00242         _Kty_container __container;
00243         for (const_iterator it=begin(); it!=end(); ++it)
00244             __container.push_back(it->first);
00245         return __container;
00246     }
00247
00267     _Kty_container keys(_IN _Kty_check_fun_t check) const
00268     {
00269         _Kty_container container;
00270         for (const_iterator it=begin(); it!=end(); ++it)
00271             if (check(container, it->first))
00272                 container.push_back(it->first);
00273         return container;
00274     }
00275
00291     _Ty_container values() const
00292     {
00293         _Ty_container container;
00294         for (const_iterator it=begin(); it!=end(); ++it)
00295             container.push_back(it->second);
00296         return container;
00297     }
00298
00326     _Ty_container values(_IN _Ty_check_fun_t check) const
00327     {
00328         _Ty_container container;
00329         for (const_iterator it=begin(); it!=end(); ++it)
00330             if (check(container, it->second))
00331                 container.push_back(it->second);
00332         return container;
00333     }
00334
00348     inline pair<iterator,bool> insert_elem(_IN const _Kty & key, _IN _Ty val)
00349     {
00350         return /*_Mybase::*/insert(make_pair(key,val));
00351     }
00352
00359     _Myt select(_IN _Element_check_fun_t check) const
00360     {
00361         _Myt container;
00362         for (const_iterator it=begin(); it!=end(); ++it)
00363             if (check(container, *it))
00364                 container.insert(*it);
00365         return container;
00366     }
00367
00372     inline bool contains_key(_IN const _Kty & key) const
00373     {
00374         return find(key) != end();
00375     }
00376
00386     const _Kty& first_key(_IN const _Kty& if_empty) const
00387     {
00388         if (size())
00389         {
00390             return begin()->first;
00391         }
00392         else
00393         {
00394             return if_empty;
00395         }
00396     }
00397
00407     _Ty& first_elem(_IN _Ty& if_empty)
00408     {
00409         if (size())
00410         {
00411             return begin()->second;
00412         }
00413         else
00414         {
00415             return if_empty;
00416         }
00417     }
00418
00428     const _Ty& first_elem(_IN const _Ty& if_empty) const
00429     {
00430         if (size())
00431         {
00432             return begin()->second;
00433         }
00434         else
00435         {
00436             return if_empty;
00437         }
00438     }
00439 };
00440
00441 }; // namespace std
00442
00443 #endif // _MAP2_H_
Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: Mbo.h Source File

Mbo.h

Go to the documentation of this file.
00001 /****************************************************************************//* ====================================================================== */
00042
00043 /* ------------------------------------------------------------------------ */
00044 /* Name:      Mbo.h
00045  */
00066 /* ------------------------------------------------------------------------ */
00067
00068 /* ------------------------------------------------------------------------ */
00080 /* ------------------------------------------------------------------------ */
00081
00085 /* ------------------------------------------------------------------------ */
00086
00087 #ifndef _MBO_H_
00088 #define _MBO_H_
00089
00090 #ifdef __MSC_VER
00091 #pragma comment (exestr, "This software includes material by M.Boerger (http://marcus-boerger.de/)")
00092 #endif
00093
00094 #ifdef DOXYGEN
00095 # define MBO_API
00096 #else
00097 # ifdef WIN32
00098 #  if !defined(MBO_API)
00099 #   if defined(MBO_LIB)
00100 #    define MBO_API
00101 #   elif defined(MBO_EXPORTS)
00102 #    define MBO_API __declspec(dllexport)
00103 #   else
00104 #    define MBO_API __declspec(dllimport)
00105 #   endif
00106 #  endif
00107 #  if defined(_MFC_VER) || defined(USE_MFC) || defined(_AFXDLL)
00108 #   include <afx.h>
00109 #   include <afxwin.h>              // MFC core and standard components
00110 #   include <afxext.h>              // MFC extensions
00111 #   include <afxdisp.h>             // MFC Automation classes
00112 #   include <afxdtctl.h>            // MFC support for Internet Explorer 4 Common Controls
00113 #   include <afxdlgs.h>             // MFC support for Internet Explorer 4 Common Controls
00114 #   ifndef _AFX_NO_AFXCMN_SUPPORT
00115 #    include <afxcmn.h>             // MFC support for Windows Common Controls
00116 #   endif // _AFX_NO_AFXCMN_SUPPORT
00117 #  else // _MFC_VER
00118 #   define WIN32_LEAN_AND_MEAN      // Seldom used parts of Windows-Header will be ignored
00119 #   include <windows.h>
00120 #  endif // _MFC_VER
00121 # else // WIN32
00122 #  define MBO_API
00123 # endif // WIN32
00124 #endif // MBO_API
00125
00126 // Parameter defines used for source-browsing
00127 #ifndef _IN
00128
00129 # define _IN
00130 #endif
00131 #ifndef _OUT
00132
00133 # define _OUT
00134 #endif
00135 #ifndef _FREE
00136
00137 # define _FREE
00138 #endif
00139
00140 // Mark deprecated functions
00141 #ifndef DEPRECATED
00142 # if defined(_MSC_VER) && !defined(DOXYGEN)
00143 #  if _MSC_VER >= 1300
00144 #   define DEPRECATED __declspec(deprecated)
00145 #  else
00146 #   define DEPRECATED
00147 #  endif // _MSC_VER
00148 # else
00149 #  define DEPRECATED
00150 # endif
00151 #endif // deprecated
00152
00153 // avoid compiler warnings for program database entries longer 255 chars
00154 #if _MSC_VER < 1300
00155 #pragma warning (disable: 4786)
00156 #endif
00157
00158 #include <string>
00159 #ifdef _MSC_VER
00160 # include <crtdbg.h>
00161 #endif
00162
00163 #ifndef DebugBreak
00164 # if defined(_MSC_VER) && defined(_DEBUG)
00165 #  define DebugBreak() _asm { int 3 }
00166 # else
00167 #  define DebugBreak()
00168 # endif
00169 #endif
00170
00176 #ifndef MBO_THROWS_EXCEPTIONS
00177 # define MBO_THROWS_EXCEPTIONS 1
00178 #endif
00179
00180 #if MBO_THROWS_EXCEPTIONS
00181
00182 # include <exception>
00183 # include <stdexcept>
00184
00185 #define __THROWS(ex)         throw(ex)
00186 #define __THROW2(ex1,ex2)    throw(ex1,ex2)
00187
00188 # define mbo_throw_if_not(exception, condition) \
00189     if (!(condition)) { \
00190         char szMessage[256]; \
00191         _snprintf(szMessage, sizeof(szMessage)-1, "%s(%d): %s", __FILE__, __LINE__, #condition); \
00192         throw exception(szMessage); \
00193     }
00194
00195 #else // MBO_THROWS_EXCEPTIONS
00196
00197 #include "assert.h"  /* for assert() */
00198
00199 #define __THROWS(ex)         throw()
00200 #define __THROW2(ex1,ex2)    throw()
00201
00202 # define mbo_throw_if_not(exception, condition) \
00203     if (!(condition)) { \
00204         assert(condition); \
00205         abort(); \
00206     }
00207
00208 #endif // MBO_THROWS_EXCEPTIONS
00209
00216 namespace mbo
00217 {
00218
00219 } // namespace mbo
00220
00221 // define mbo::tstring and mbo::Mbostring
00222 #ifndef MBO_NO_MBOTSTRING
00223 # include "MboTString.h"
00224 #endif
00225
00226 #endif // _MBO_H_
Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: MboDrawWin.h Source File

MboDrawWin.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      MboDrawWin.h / MboDrawWin.cpp
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  * - MboSynch.h
00046  * - MboThread.h
00047  * - MboIniData.h
00048  */
00063 /* ------------------------------------------------------------------------ */
00064
00065 #ifndef _MBOWIN_H_
00066 #define _MBOWIN_H_
00067
00068 #include "Mbo.h"
00069 #include "MboThread.h"
00070 #include "MboIniData.h"
00071 #include <list>
00072
00073 #ifdef _MSC_VER
00074 // disable warning C4251: '...' : class '...' needs to have dll-interface to be used by clients of class '...'
00075 #pragma warning (disable: 4251)
00076 // non dll-interface class '...' used as base for dll-interface class '...'
00077 #pragma warning (disable: 4275)
00078
00079 # ifndef _CPPRTTI
00080 #  error You must compile using RTTI
00081 # endif // _CPPRTTI
00082 #endif // _MSC_VER
00083
00084 #define RGB_BLACK     RGB(  0,  0,  0)
00085 #define RGB_BLUE      RGB(  0,  0,128)
00086 #define RGB_GREEN     RGB(  0,128,  0)
00087 #define RGB_CYAN      RGB(  0,128,128)
00088 #define RGB_RED       RGB(128,  0,  0)
00089 #define RGB_MAGENTA   RGB(128,  0,128)
00090 #define RGB_BROWN     RGB(128,128,  0)
00091 #define RGB_LTGRAY    RGB(192,192,192)
00092 #define RGB_GRAY      RGB(128,128,128)
00093 #define RGB_LTBLUE    RGB(  0,  0,255)
00094 #define RGB_LTRED     RGB(255,  0,  0)
00095 #define RGB_LTCYAN    RGB(  0,255,255)
00096 #define RGB_LTGREEN   RGB(  0,255,  0)
00097 #define RGB_LTMAGENTA RGB(255,  0,255)
00098 #define RGB_YELLOW    RGB(255,255,  0)
00099 #define RGB_WHITE     RGB(255,255,255)
00100
00101 #define RGB_HINT      RGB(255,255,204)
00102
00103 namespace mbo
00104 {
00105
00111 static inline RECT NormalizeRect(RECT rect)
00112 {
00113     if (rect.left > rect.right)
00114     {
00115         LONG t      = rect.left;
00116         rect.left   = rect.right;
00117         rect.right  = t;
00118     }
00119     if (rect.top > rect.bottom)
00120     {
00121         LONG t      = rect.top;
00122         rect.top    = rect.bottom;
00123         rect.bottom = t;
00124     }
00125     return rect;
00126 }
00127
00130 enum DRAW_MODE {
00131     DRAW_MODE_FILL,
00132     DRAW_MODE_TRANSPARENT,
00133     DRAW_MODE_HS_BDIAGONAL,
00134     DRAW_MODE_HS_CROSS,
00135     DRAW_MODE_HS_DIAGCROSS,
00136     DRAW_MODE_HS_FDIAGONAL,
00137     DRAW_MODE_HS_HORIZONTAL,
00138     DRAW_MODE_HS_VERTICAL
00139 };
00140
00141
00155 class MBO_API MboDrawWin
00156     : protected MboWinMsgHandler
00157 {
00158 public:
00159
00160     MboWinMsgHandler::GetHWND;
00161     MboWinMsgHandler::PostMessage;
00162
00182     explicit MboDrawWin(
00183             _IN int               nSizeX          = 400,
00184             _IN int               nSizeY          = 300,
00185             _IN const MboString&  strWndClassName = "MboDrawWin",
00186             _IN bool              bStart          = true
00187         );
00188
00219     MboDrawWin(
00220             _IN int                nSizeX,
00221             _IN int                nSizeY,
00222             _IN int                nMinSizeX,
00223             _IN int                nMinSizeY,
00224             _IN int                nMaxSizeX,
00225             _IN int                nMaxSizeY,
00226             _IN const MboString&   strWndClassName = "MboDrawWin",
00227             _IN bool               bStart          = true
00228         );
00229
00232     virtual ~MboDrawWin();
00233
00236     bool IsWindowVisible() const; // winapi name
00237
00240     bool IsWindow() const; // winapi name
00241
00244     bool IsWndSizeable() const;
00245
00248     bool IsWndSizingOrMoving() const;
00249
00259     virtual void WndShow(_IN bool bActive = true);
00260
00263     virtual void WndHide();
00264
00269     virtual void WndRestore();
00270
00285     virtual void WndSetSize(_IN int nSizeX, _IN int nSizeY);
00286
00295     virtual void WndSetPosition(_IN int nPosX, _IN int nPosY);
00296
00307     virtual void WndDraw();
00308
00314     virtual void OnWndSized();
00315
00325     virtual void DrawRect(
00326             _IN const RECT&        rect,
00327             _IN COLORREF           colInner,
00328             _IN COLORREF           colOuter  = RGB_BLACK,
00329             _IN DRAW_MODE          enMode    = DRAW_MODE_FILL
00330         );
00331
00344     virtual void DrawRect(
00345             _IN LONG               nLeft,
00346             _IN LONG               nTop,
00347             _IN LONG               nRight,
00348             _IN LONG               nBottom,
00349             _IN COLORREF           colInner,
00350             _IN COLORREF           colOuter  = RGB_BLACK,
00351             _IN DRAW_MODE          enMode    = DRAW_MODE_FILL
00352         );
00353
00365     virtual void DrawLine(
00366             _IN LONG               nX1,
00367             _IN LONG               nY1,
00368             _IN LONG               nX2,
00369             _IN LONG               nY2,
00370             _IN int                nPenWidth,
00371             _IN COLORREF           colInner,
00372             _IN DRAW_MODE          enMode    = DRAW_MODE_FILL,
00373             _IN int                fnPenStyle= PS_INSIDEFRAME
00374         );
00375
00385     virtual void DrawLine(
00386             _IN POINT              pt1,
00387             _IN POINT              pt2,
00388             _IN int                nPenWidth,
00389             _IN COLORREF           colInner,
00390             _IN DRAW_MODE          enMode    = DRAW_MODE_FILL,
00391             _IN int                fnPenStyle= PS_INSIDEFRAME
00392         );
00393
00403     virtual void DrawEllipse(
00404             _IN const RECT&        rect,
00405             _IN COLORREF           colInner,
00406             _IN COLORREF           colOuter  = RGB_BLACK,
00407             _IN DRAW_MODE          enMode    = DRAW_MODE_FILL
00408         );
00409
00418     virtual void DrawCircle(
00419             _IN const POINT&       ptCenter,
00420             _IN const LONG         nRadius,
00421             _IN COLORREF           colInner,
00422             _IN COLORREF           colOuter  = RGB_BLACK,
00423             _IN DRAW_MODE          enMode    = DRAW_MODE_FILL
00424         );
00425
00435     virtual void DrawCircle(
00436             _IN const LONG         nCenterX,
00437             _IN const LONG         nCenterY,
00438             _IN const LONG         nRadius,
00439             _IN COLORREF           colInner,
00440             _IN COLORREF           colOuter  = RGB_BLACK,
00441             _IN DRAW_MODE          enMode    = DRAW_MODE_FILL
00442         );
00443
00453     virtual void DrawPolygon(
00454             _IN const POINT*       aptPoints,
00455             _IN int                nNumPoints,
00456             _IN COLORREF           colInner,
00457             _IN COLORREF           colOuter  = RGB_BLACK,
00458             _IN DRAW_MODE          enMode    = DRAW_MODE_FILL
00459         );
00460
00469     virtual void CalcTextRect(
00470             _IN _OUT RECT &        rect,
00471             _IN const MboString&   strText,
00472             _IN UINT               uFormat   = 0
00473         );
00474
00485     virtual void DrawText(
00486             _IN const RECT &       rect,
00487             _IN const MboString&   strText,
00488             _IN UINT               uFormat   = 0,
00489             _IN COLORREF           colInner  = RGB_BLACK,
00490             _IN COLORREF           colOuter  = RGB_WHITE,
00491             _IN DRAW_MODE          enMode    = DRAW_MODE_TRANSPARENT
00492         );
00493
00507     virtual void DrawText(
00508             _IN LONG               nLeft,
00509             _IN LONG               nTop,
00510             _IN LONG               nRight,
00511             _IN LONG               nBottom,
00512             _IN const MboString&   strText,
00513             _IN UINT               uFormat   = 0,
00514             _IN COLORREF           colInner  = RGB_BLACK,
00515             _IN COLORREF           colOuter  = RGB_WHITE,
00516             _IN DRAW_MODE          enMode    = DRAW_MODE_TRANSPARENT
00517         );
00518
00526     virtual bool DrawBitmap(
00527             _IN int           nLeft,
00528             _IN int           nTop,
00529             _IN HBITMAP       hBitmap
00530         );
00531
00539     virtual bool DrawBitmap(
00540             _IN int           nLeft,
00541             _IN int           nTop,
00542             _IN const MboString& strResId
00543         );
00544
00552     virtual bool DrawBitmap(
00553             _IN int           nLeft,
00554             _IN int           nTop,
00555             _IN UINT          nResId
00556         );
00557
00565     virtual bool DrawIcon(
00566             _IN int                nLeft,
00567             _IN int                nTop,
00568             _IN HICON              hIcon
00569         );
00570
00578     virtual bool DrawIcon(
00579             _IN int                nLeft,
00580             _IN int                nTop,
00581             _IN const MboString&   strResId
00582         );
00583
00591     virtual bool DrawIcon(
00592             _IN int                nLeft,
00593             _IN int                nTop,
00594             _IN UINT               nResId
00595         );
00596
00602     virtual bool WndSetIconBig(_IN UINT nResId);
00603
00609     virtual bool WndSetIconSmall(_IN UINT nResId);
00610
00620     virtual bool WndSetIconBoth(_IN UINT nResId);
00621
00634     virtual void DrawSetMode(
00635             _OUT HBRUSH &          hBrush,
00636             _OUT HPEN &            hPen,
00637             _IN COLORREF           colInner,
00638             _IN COLORREF           colOuter  = RGB_BLACK,
00639             _IN DRAW_MODE          enMode    = DRAW_MODE_FILL,
00640             _IN int                nPenWidth = 0,
00641             _IN int                fnPenStyle= PS_SOLID
00642         );
00643
00660     virtual bool WndCreate();
00661
00665     virtual void WndClear();
00666
00680     virtual void OnWindowCreated();
00681
00695     virtual void OnButtonDown(_IN UINT nFlags, _IN int x, _IN int y);
00696
00710     virtual void OnButtonDblClk(_IN UINT nFlags, _IN int x, _IN int y);
00711
00725     virtual void OnButtonUp(_IN UINT nFlags, _IN int x, _IN int y);
00726
00729     virtual void WndDestroy();
00730
00733     virtual void WndUpdate();
00734
00750     virtual LRESULT ProcessMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
00751
00756     virtual void WndSetTitle(_IN const MboString& strTitle);
00757
00758     int GetPositionX() const;
00759     int GetPositionY() const;
00760     int GetSizeX() const;
00761     int GetSizeY() const;
00762     int GetMinSizeX() const;
00763     int GetMinSizeY() const;
00764     int GetMaxSizeX() const;
00765     int GetMaxSizeY() const;
00767     int GetWidth() const;
00768     int GetHeight() const;
00770     int GetScreenSizeX() const;
00771     int GetScreenSizeY() const;
00784     virtual void WndLoadExtent(
00785             _IN const CIniData &   cIniData,
00786             _IN const MboString &  strSection,
00787             _IN bool               bWriteDefault = false
00788         );
00789
00800     virtual void WndSaveExtent(
00801             _IN CIniData &         cIniData,
00802             _IN const MboString &  strSection
00803         ) const;
00804
00805 protected:
00806
00809     virtual bool WndCalcMetrics();
00810
00816     virtual void WndRegisterHandle();
00817
00818     HDC    m_hScrDC;
00819     HDC    m_hMemDC;
00821 private:
00822     int    m_nSizeX;
00823     int    m_nSizeY;
00824     int    m_nMinSizeX;
00825     int    m_nMinSizeY;
00826     int    m_nMaxSizeX;
00827     int    m_nMaxSizeY;
00829     int    m_nHeight;
00830     int    m_nWidth;
00832     bool   m_bInSizeMove;
00833 };
00834
00835 }; // namespace mbo
00836
00837 #ifdef _MSC_VER
00838 # pragma warning (default: 4251)
00839 # pragma warning (default: 4275)
00840 #endif
00841
00842 #endif // _MBOWIN_H_
Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: MboIniData.h Source File

MboIniData.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      MboStrMap.h / MboStrMapStr.cpp
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  * - MboSynch.h
00046  * - MboStrHelper.h
00047  * - MboTString.h
00048  * - MboStrList.h
00049  * - MboStrMap.h
00050  * - list2.h
00051  * - vector2.h
00052  * - map2.h
00053  */
00200 /* ------------------------------------------------------------------------ */
00201
00202 #ifndef _MBOINIDATA_H_
00203 #define _MBOINIDATA_H_
00204
00205 #include "Mbo.h"
00206 #include "MboSynch.h"
00207 #include "MboStrList.h"
00208 #include "MboStrMap.h"
00209 #include <vector>
00210 #include <float.h>
00211
00212 #ifdef _MSC_VER
00213 // disable warning C4251: '...' : class '...' needs to have dll-interface to be used by clients of class '...'
00214 # pragma warning (disable: 4251)
00215 // non dll-interface class '...' used as base for dll-interface class '...'
00216 # pragma warning (disable: 4275)
00217
00218 # ifndef _CPPRTTI
00219 #  error You must compile using RTTI
00220 # endif // _CPPRTTI
00221 #endif // _MSC_VER
00222
00223 namespace mbo
00224 {
00225
00226 template<class _E, class _Tr, class _A>
00227 COLORREF StrToColor(
00228         const std::basic_string<_E, _Tr, _A >& str,
00229         _IN COLORREF                           colDefault
00230     )
00231 {
00232     CStrMapStr msstrColor(str);
00233     return RGB( msstrColor["R"].length() ? StrToInt(msstrColor["R"]) : GetRValue(colDefault)
00234               , msstrColor["G"].length() ? StrToInt(msstrColor["G"]) : GetGValue(colDefault)
00235               , msstrColor["B"].length() ? StrToInt(msstrColor["B"]) : GetBValue(colDefault)
00236               );
00237 }
00238
00239 template<class _E, class _Tr, class _A>
00240 std::basic_string<_E, _Tr, _A > & StrFromColor(
00241         std::basic_string<_E, _Tr, _A > & str,
00242         _IN COLORREF                      col
00243     )
00244 {
00245     str = "R="  + StrFrom<_E>(max(0, min(GetRValue(col), 255)))
00246         + ",G=" + StrFrom<_E>(max(0, min(GetGValue(col), 255)))
00247         + ",B=" + StrFrom<_E>(max(0, min(GetBValue(col), 255)));
00248     return str;
00249 }
00250
00261 class MBO_API CIniData // cini
00262 {
00263 public:
00283     explicit CIniData(
00284             _IN const MboString & strFilename,
00285             _IN const MboString & strSectionPrefix = ""
00286         );
00287
00291     virtual ~CIniData();
00292
00297     virtual const MboString & GetFilename() const;
00298
00303     virtual const MboString & GetSectionPrefix() const;
00304
00314     bool GetSectionNames(
00315             _IN  const MboString &  strSectionPrefix,
00316             _OUT CStrList &         vstrSectionNames
00317         ) const;
00318
00326     bool GetSectionNames(
00327             _OUT CStrList &         vstrSectionNames
00328         ) const;
00329
00335     bool SectionExists(
00336             _IN const MboString &   strSection
00337         ) const;
00338
00345     virtual bool GetKeyNames(
00346             _IN  const MboString &  strSection,
00347             _OUT CStrList &         vstrKeyNames
00348         ) const;
00349
00356     virtual bool KeyNameExists(
00357             _IN  const MboString &  strSection,
00358             _IN  const MboString &  strKeyname
00359         ) const;
00360
00381     virtual bool ReadString(
00382             _IN  const MboString &  strSection,
00383             _IN  const MboString &  strKeyname,
00384             _OUT MboString &        strValue,
00385             _IN  const MboString &  strDefault    = "",
00386             _IN  bool               bWriteDefault = false,
00387             _IN  bool               bParseEnvVars = false
00388         ) const;
00389
00402     virtual MboString GetString(
00403             _IN  const MboString &  strSection,
00404             _IN  const MboString &  strKeyname,
00405             _IN  const MboString &  strDefault    = "",
00406             _IN  bool               bWriteDefault = false,
00407             _IN  bool               bParseEnvVars = false
00408         ) const;
00409
00425     static MboString GetIniString(
00426             _IN  const MboString &  strFilename,
00427             _IN  const MboString &  strSection,
00428             _IN  const MboString &  strKeyname,
00429             _IN  const MboString &  strDefault    = "",
00430             _IN  bool               bWriteDefault = false,
00431             _IN  bool               bParseEnvVars = false
00432         );
00433
00453     virtual bool ReadInt(
00454             _IN  const MboString &  strSection,
00455             _IN  const MboString &  strKeyname,
00456             _OUT int &              nValue,
00457             _IN  int                nDefault      = 0,
00458             _IN  bool               bWriteDefault = false,
00459             _IN  int                nMinimum      = INT_MIN,
00460             _IN  int                nMaximum      = INT_MAX
00461         ) const;
00462
00474     virtual int GetInt(
00475             _IN  const MboString &  strSection,
00476             _IN  const MboString &  strKeyname,
00477             _IN  int                nDefault      = 0,
00478             _IN  bool               bWriteDefault = false,
00479             _IN  int                nMinimum      = INT_MIN,
00480             _IN  int                nMaximum      = INT_MAX
00481         ) const;
00482
00497     static int GetIniInt(
00498             _IN  const MboString &  strFilename,
00499             _IN  const MboString &  strSection,
00500             _IN  const MboString &  strKeyname,
00501             _IN  int                nDefault      = 0,
00502             _IN  bool               bWriteDefault = false,
00503             _IN  int                nMinimum      = INT_MIN,
00504             _IN  int                nMaximum      = INT_MAX
00505         );
00506
00526     virtual bool ReadLong(
00527             _IN  const MboString &  strSection,
00528             _IN  const MboString &  strKeyname,
00529             _OUT long &             lValue,
00530             _IN  long               lDefault      = 0,
00531             _IN  bool               bWriteDefault = false,
00532             _IN  long               lMinimum      = LONG_MIN,
00533             _IN  long               lMaximum      = LONG_MAX
00534         ) const;
00535
00547     virtual long GetLong(
00548             _IN  const MboString &  strSection,
00549             _IN  const MboString &  strKeyname,
00550             _IN  long               lDefault      = 0L,
00551             _IN  bool               bWriteDefault = false,
00552             _IN  long               lMinimum      = LONG_MIN,
00553             _IN  long               lMaximum      = LONG_MAX
00554         ) const;
00555
00570     static long GetIniLong(
00571             _IN  const MboString &  strFilename,
00572             _IN  const MboString &  strSection,
00573             _IN  const MboString &  strKeyname,
00574             _IN  long               lDefault      = 0L,
00575             _IN  bool               bWriteDefault = false,
00576             _IN  long               lMinimum      = LONG_MIN,
00577             _IN  long               lMaximum      = LONG_MAX
00578         );
00579
00599     virtual bool ReadFloat(
00600             _IN  const MboString &  strSection,
00601             _IN  const MboString &  strKeyname,
00602             _OUT float &            fValue,
00603             _IN  float              fDefault      = 0.0f,
00604             _IN  bool               bWriteDefault = false,
00605             _IN  float              fMinimum      = FLT_MIN,
00606             _IN  float              fMaximum      = FLT_MAX
00607         ) const;
00608
00620     virtual float GetFloat(
00621             _IN  const MboString &  strSection,
00622             _IN  const MboString &  strKeyname,
00623             _IN  float              fDefault      = 0.0f,
00624             _IN  bool               bWriteDefault = false,
00625             _IN  float              fMinimum      = FLT_MIN,
00626             _IN  float              fMaximum      = FLT_MAX
00627         ) const;
00628
00643     static float GetIniFloat(
00644             _IN  const MboString &  strFilename,
00645             _IN  const MboString &  strSection,
00646             _IN  const MboString &  strKeyname,
00647             _IN  float              fDefault      = 0.0f,
00648             _IN  bool               bWriteDefault = false,
00649             _IN  float              fMinimum      = FLT_MIN,
00650             _IN  float              fMaximum      = FLT_MAX
00651         );
00652
00670     virtual bool ReadBool(
00671             _IN  const MboString &  strSection,
00672             _IN  const MboString &  strKeyname,
00673             _OUT bool &             bValue,
00674             _IN  bool               bDefault      = false,
00675             _IN  bool               bWriteDefault = false
00676         ) const;
00677
00687     virtual bool GetBool(
00688             _IN  const MboString &  strSection,
00689             _IN  const MboString &  strKeyname,
00690             _IN  bool               bDefault      = false,
00691             _IN  bool               bWriteDefault = false
00692         ) const;
00693
00706     static bool GetIniBool(
00707             _IN  const MboString &  strFilename,
00708             _IN  const MboString &  strSection,
00709             _IN  const MboString &  strKeyname,
00710             _IN  bool               bDefault      = false,
00711             _IN  bool               bWriteDefault = false
00712         );
00713
00731     virtual bool ReadColor(
00732             _IN  const MboString &  strSection,
00733             _IN  const MboString &  strKeyname,
00734             _OUT COLORREF &         colValue,
00735             _IN  COLORREF           colDefault    = RGB(0, 0, 0),
00736             _IN  bool               bWriteDefault = false
00737         ) const;
00738
00748     virtual COLORREF GetColor(
00749             _IN  const MboString &  strSection,
00750             _IN  const MboString &  strKeyname,
00751             _IN  COLORREF           colDefault    = RGB(0, 0, 0),
00752             _IN  bool               bWriteDefault = false
00753         ) const;
00754
00767     static COLORREF GetIniColor(
00768             _IN  const MboString &  strFilename,
00769             _IN  const MboString &  strSection,
00770             _IN  const MboString &  strKeyname,
00771             _IN  COLORREF           colDefault    = RGB(0, 0, 0),
00772             _IN  bool               bWriteDefault = false
00773         );
00774
00796     virtual bool ReadMap(
00797             _IN  const MboString &  strSection,
00798             _OUT CStrMapStr &       msstrValue,
00799             _IN  const CStrMapStr & msstrDefault  = CStrMapStr(),
00800             _IN  bool               bWriteDefault = false,
00801             _IN  bool               bWriteEmpty   = false
00802         ) const;
00803
00820     virtual DEPRECATED CStrMapStr GetMap(
00821             _IN  const MboString &  strSection,
00822             _IN  const CStrMapStr & msstrDefault  = CStrMapStr(),
00823             _IN  bool               bWriteDefault = false,
00824             _IN  bool               bWriteEmpty   = false
00825         ) const;
00826
00846     static DEPRECATED CStrMapStr GetIniMap(
00847             _IN  const MboString &  strFilename,
00848             _IN  const MboString &  strSection,
00849             _IN  const CStrMapStr & msstrDefault  = CStrMapStr(),
00850             _IN  bool               bWriteDefault = false,
00851             _IN  bool               bWriteEmpty   = false
00852         );
00853
00861     virtual bool ClearSection(
00862             _IN  const MboString &  strSection
00863         );
00864
00872     virtual bool WriteString(
00873             _IN  const MboString &  strSection,
00874             _IN  const MboString &  strKeyname,
00875             _IN  const MboString &  strValue
00876         );
00877
00885     virtual bool WriteInt(
00886             _IN  const MboString &  strSection,
00887             _IN  const MboString &  strKeyname,
00888             _IN  int                nValue
00889         );
00890
00898     virtual bool WriteLong(
00899             _IN  const MboString &  strSection,
00900             _IN  const MboString &  strKeyname,
00901             _IN  long               lValue
00902         );
00903
00911     virtual bool WriteFloat(
00912             _IN  const MboString &  strSection,
00913             _IN  const MboString &  strKeyname,
00914             _IN  float              fValue
00915         );
00916
00924     virtual bool WriteBool(
00925             _IN  const MboString &  strSection,
00926             _IN  const MboString &  strKeyname,
00927             _IN  bool               bValue
00928         );
00929
00937     virtual bool WriteColor(
00938             _IN  const MboString &  strSection,
00939             _IN  const MboString &  strKeyname,
00940             _IN  COLORREF           colValue
00941         );
00942
00953     virtual bool WriteMap(
00954             _IN  const MboString &  strSection,
00955             _IN  const CStrMapStr & msstrValue,
00956             _IN  bool               bWriteEmpty = false
00957         );
00958
00959 protected:
00966     mbo::CLock IniDataGetLock() const;
00967
00968 private:
00969     const MboString  m_strFilename;
00970     const MboString  m_strSectionPrefix;
00971     mbo::MutexModel  m_mxIniData;
00972 };
00973
00974 }; // namespace mbo
00975
00976 #ifdef _MSC_VER
00977 # pragma warning (default: 4251)
00978 # pragma warning (default: 4275)
00979 #endif
00980
00981 #endif // _CINIDATA_H_
Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: MboLockedVar.h Source File

MboLockedVar.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      MboLockedVar.h
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  * - MboSynch.h / MboSynch.cpp
00046  */
00061 /* ------------------------------------------------------------------------ */
00062
00063 #ifndef _MBOLOCKEDVAR_H_
00064 #define _MBOLOCKEDVAR_H_
00065
00066 #include "Mbo.h"
00067 #include "MboSynch.h"
00068
00069 namespace mbo {
00070
00079 template <class T, class _THREAD_MODEL = ThreadModel>
00080 class LockedVar
00081 {
00082 private:
00083     typedef _THREAD_MODEL::CriticalSection CriticalSection;
00085     T  t; /* locked variable */
00086
00087     mutable CriticalSection  m_mx; /* lock to use */
00088
00089 public:
00090
00094     inline LockedVar(_IN const T& tIn)
00095         : t(tIn)
00096     {
00097     }
00098
00104     inline operator T ()
00105     {
00106         Lock lock(&m_mx);
00107         return t;
00108     }
00109
00115     inline operator const T () const
00116     {
00117         Lock lock(&m_mx);
00118         return t;
00119     }
00120
00127     inline const T& operator= (_IN const T& tIn)
00128     {
00129         Lock lock(&m_mx);
00130         t = tIn;
00131         return tIn; /* tIn not t */
00132     }
00133
00139     inline T __exchange(_IN const T& tIn)
00140     {
00141         Lock lock(&m_mx);
00142         T tOld(t);
00143         t = tIn;
00144         return tOld; /* the old value */
00145     }
00146
00149     inline mbo::CLock __getLock()
00150     {
00151         return mbo::CLockSingle(&m_mx);
00152     }
00153 };
00154
00159 template <>
00160 class LockedVar<bool, ThreadModel>
00161 {
00162 private:
00163     typedef _THREAD_MODEL::CriticalSection CriticalSection;
00165     T  t; /* locked variable */
00166
00167     mutable CriticalSection  m_mx; /* lock to use */
00168
00169 public:
00170
00174     inline LockedVar(_IN const T& tIn)
00175         : t(tIn)
00176     {
00177     }
00178
00184     inline operator T ()
00185     {
00186         return t;
00187     }
00188
00194     inline operator const T () const
00195     {
00196         return t;
00197     }
00198
00205     inline const T& operator= (_IN const T& tIn)
00206     {
00207         t = tIn;
00208         return tIn; /* tIn not t */
00209     }
00210
00216     inline T __exchange(_IN const T& tIn)
00217     {
00218         T tOld(t);
00219         t = tIn;
00220         return tOld; /* the old value */
00221     }
00222
00225     inline mbo::CLock __getLock()
00226     {
00227         return mbo::CLockSingle(&m_mx);
00228     }
00229 };
00230
00231 }; // namespace mbo
00232
00233 #endif // _MBOLOCKEDVAR_H_
Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: MboMatrix.h Source File

MboMatrix.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      MboMatrix.h
00042 *
00043 * Requires:
00044 * - Mbo.h
00045 */
00046
00047 #ifndef _MBOMATRIX_H_
00048 #define _MBOMATRIX_H_
00049
00050 #include <exception>
00051
00052 #if !defined(__MINMAX_DEFINED) && !defined(max) && !defined(min)
00053 #  define max(a,b)    (((a) > (b)) ? (a) : (b))
00054 #  define min(a,b)    (((a) < (b)) ? (a) : (b))
00055 #endif
00056
00057 namespace mbo
00058 {
00059
00060 /* ------------------------------------------------------------------------ */
00064 class MatrixException
00065 : public std::exception
00066 {
00067     MatrixException(_IN const char *szWhat)
00068     : std::exception(szWhat)
00069     {
00070     }
00071 };
00072
00073 /* ------------------------------------------------------------------------ */
00077 template <class _Ty, size_t _Cols, size_t _Rows>
00078 class Matrix
00079 {
00080     public:
00081     // Constructors
00082     Matrix (const Matrix<_Ty, _Cols, _Rows> & m);
00083
00084     size_t numRows () { return numRows; }
00085     size_t numCols () { return numCols; }
00086
00087     // Subscript operator
00088     _Ty& operator () (size_t row, size_t col) throw(MatrixException);
00089
00090     // Unary operators
00091     Matrix<_Ty, _Cols, _Rows> operator + ()  { return *this; }
00092     Matrix<_Ty, _Cols, _Rows> operator - ();
00093
00094     // Assignment operators
00095     Matrix<_Ty, _Cols, _Rows> & operator = (const Matrix<_Ty, _Cols, _Rows> & m);
00096
00097     // Combined assignment - calculation operators
00098     Matrix<_Ty, _Cols, _Rows> & operator += (const Matrix<_Ty, _Cols, _Rows> & m) throw(MatrixException);
00099     Matrix<_Ty, _Cols, _Rows> & operator -= (const Matrix<_Ty, _Cols, _Rows> & m) throw(MatrixException);
00100     Matrix<_Ty, _Cols, _Rows> & operator *= (const Matrix<_Ty, _Cols, _Rows> & m) throw(MatrixException);
00101     Matrix<_Ty, _Cols, _Rows> & operator *= (const _Ty& c);
00102     Matrix<_Ty, _Cols, _Rows> & operator /= (const _Ty& c);
00103     Matrix<_Ty, _Cols, _Rows> & operator ^= (const size_t& pow) throw(MatrixException);
00104
00105     // Logical operators
00106     friend bool operator == (const Matrix<_Ty, _Cols, _Rows> & m1, const Matrix<_Ty, _Cols, _Rows> & m2);
00107     friend bool operator != (const Matrix<_Ty, _Cols, _Rows> & m1, const Matrix<_Ty, _Cols, _Rows> & m2);
00108
00109     // Calculation operators
00110     friend template<class _Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows> operator + (const Matrix<_Ty, _Cols, _Rows> & m1, const Matrix<_Ty, _Cols, _Rows> & m2) throw(MatrixException);
00111     friend template<class _Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows> operator - (const Matrix<_Ty, _Cols, _Rows> & m1, const Matrix<_Ty, _Cols, _Rows> & m2) throw(MatrixException);
00112     friend template<class _Ty, size_t _Cols1Rows2, size_t _Rows1, size_t _Cols2>
00113         Matrix<_Ty, _Cols2, _Rows1> operator * (const Matrix<_Ty, _Cols1Rows2, _Rows1> & lhs, const Matrix<_Ty, _Cols2, _Cols1Rows2> & rhs)
00114     friend template<class _Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows> operator * (const Matrix<_Ty, _Cols, _Rows> & m1, const Matrix<_Ty, _Cols, _Rows> & m2) throw(MatrixException);
00115     friend template<class _Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows> operator * (const Matrix<_Ty, _Cols, _Rows> & m, const T& no);
00116     friend template<class _Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows> operator * (const T& no, const Matrix<_Ty, _Cols, _Rows> & m)  { return (m*no); }
00117     friend template<class _Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows> operator / (const Matrix<_Ty, _Cols, _Rows> & m1, const Matrix<_Ty, _Cols, _Rows> & m2) throw(MatrixException) { return (m1 * !m2); }
00118     friend template<class _Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows> operator / (const Matrix<_Ty, _Cols, _Rows> & m, const T& no)  { return (m*(1/no)); }
00119     friend template<class _Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows> operator / (const T& no, const Matrix<_Ty, _Cols, _Rows> & m) throw(MatrixException) { return (!m * no); }
00120     friend template<class _Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows> operator ~ (const Matrix<_Ty, _Cols, _Rows> & m);
00121     friend template<class _Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows> operator ! (Matrix<_Ty, _Cols, _Rows> m) throw(MatrixException);
00122     friend template<class _Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows> operator ^ (const Matrix<_Ty, _Cols, _Rows> & m, const size_t& pow) throw(MatrixException);
00123
00124     // Miscellaneous -methods
00125     void Null (const size_t& row, const size_t& col);
00126     void Null ();
00127     void Unit (const size_t& row);
00128     void Unit ();
00129
00130     // Utility methods
00131     Matrix<_Ty, _Cols, _Rows> Solve(const Matrix<_Ty, _Cols, _Rows> & v) const throw(MatrixException);
00132     Matrix<_Ty, _Cols, _Rows> Adj() throw(MatrixException);
00133     _Ty Det() throw(MatrixException);
00134     _Ty Norm();
00135     _Ty Cofactor(size_t row, size_t col) throw(MatrixException);
00136     _Ty Cond();
00137
00138     // Type of matrices
00139     bool IsSquare ()  { return (Row == Col); }
00140     bool IsSingular ();
00141     bool IsDiagonal ();
00142     bool IsScalar ();
00143     bool IsUnit ();
00144     bool IsNull ();
00145     bool IsSymmetric ();
00146     bool IsSkewSymmetric ();
00147     bool IsUpperTiangular ();
00148     bool IsLowerTiangular ();
00149
00150     // Io-stream operators
00151     friend istream& operator >> (istream& i, Matrix<_Ty, _Cols, _Rows> & m);
00152     friend ostream& operator << (ostream& o, Matrix<_Ty, _Cols, _Rows> & m);
00153
00154     private:
00155     _Ty   Val[_Cols][_Rows];
00156
00157     int pivot(size_t row);
00158 };
00159
00160 template<class _Ty, size_t _Cols>
00161 class Vector: Matrix<_Ty, _Cols, 1>
00162 {
00163 };
00164
00165 // constructor
00166 template<class _Ty, size_t _Cols, size_t _Rows>
00167 inline Matrix<_Ty, _Cols, _Rows>::Matrix ()
00168 {
00169 }
00170
00171 // copy constructor
00172 template<class _Ty, size_t _Cols, size_t _Rows>
00173 inline Matrix<_Ty, _Cols, _Rows>::Matrix (const Matrix<_Ty, _Cols, _Rows> & m)
00174     : Val(m.Val)
00175 {
00176 }
00177
00178 // subscript operator to get/set individual elements
00179 template<class _Ty, size_t _Cols, size_t _Rows>
00180 inline _Ty& Matrix<_Ty, _Cols, _Rows>::operator () (size_t nRow, size_t nCol) throw(MatrixException)
00181 {
00182     if (nRow >= _Rows || nCol >= _Cols)
00183     {
00184         throw MatrixException("Matrix<_Ty, _Cols, _Rows>::operator(): Index out of range!");
00185     }
00186     return Val[row][col];
00187 }
00188
00189 // input stream function
00190 template<class _Ty, size_t _Cols, size_t _Rows>
00191 istream& operator >> (istream& in, Matrix<_Ty, _Cols, _Rows> & m)
00192 {
00193     for (size_t i=0; i < m.Row; i++)
00194     {
00195         for (size_t j=0; j < m.Col; j++)
00196         {
00197             in >> m.Val[i][j];
00198         }
00199     }
00200     return in;
00201 }
00202
00203 // output stream function
00204 template<class _Ty, size_t _Cols, size_t _Rows>
00205 ostream& operator << (ostream &out, Matrix<_Ty, _Cols, _Rows> & m)
00206 {
00207     for (size_t i=0; i < m.Row; i++)
00208     {
00209         for (size_t j=0; j < m.Col; j++)
00210         {
00211             out << m.Val[i][j] << '\t';
00212         }
00213         out << endl;
00214     }
00215     return out;
00216 }
00217
00218 // assignment operator
00219 template<class _Ty, size_t _Cols, size_t _Rows>
00220 inline Matrix<_Ty, _Cols, _Rows> & Matrix<_Ty, _Cols, _Rows>::operator = (const Matrix<_Ty, _Cols, _Rows> & m)
00221 {
00222     *Val = *m.Val;
00223     return *this;
00224 }
00225
00226 // logical equal-to operator
00227 template<class _Ty, size_t _Cols, size_t _Rows>
00228 bool operator == (const Matrix<_Ty, _Cols, _Rows> & lhs, const Matrix<_Ty, _Cols, _Rows> & rhs)
00229 {
00230     for (size_t i=0; i < _Rows; i++)
00231     {
00232         for (size_t j=0; j < _Cols; i++)
00233         {
00234             if (lhs1.Val[i][j] != rhs2.Val[i][j])
00235                 return false;
00236             }
00237         }
00238     }
00239     return true;
00240 }
00241
00242 // logical no-equal-to operator
00243 template<class _Ty, size_t _Cols, size_t _Rows>
00244 bool operator != (const Matrix<_Ty, _Cols, _Rows> & lhs, const Matrix<_Ty, _Cols, _Rows> & rhs)
00245 {
00246     return !(lhs == rhs);
00247 }
00248
00249
00250 // combined addition and assignment operator
00251 template<class _Ty, size_t _Cols, size_t _Rows>
00252 inline Matrix<_Ty, _Cols, _Rows> & Matrix<_Ty, _Cols, _Rows>::operator += (const Matrix<_Ty, _Cols, _Rows> & rhs)
00253 {
00254     for (size_t i=0; i < _Rows; i++)
00255     {
00256         for (size_t j=0; j < _Cols; j++)
00257         {
00258             Val[i][j] += rhs.Val[i][j];
00259         }
00260     }
00261     return *this;
00262 }
00263
00264
00265 // combined subtraction and assignment operator
00266 template<class _Ty, size_t _Cols, size_t _Rows>
00267 inline Matrix<_Ty, _Cols, _Rows> & Matrix<_Ty, _Cols, _Rows>::operator -= (const Matrix<_Ty, _Cols, _Rows> & m)
00268 {
00269     for (size_t i=0; i < _Rows; i++)
00270     {
00271         for (size_t j=0; j < _Cols; j++)
00272         {
00273             Val[i][j] -= rhs.Val[i][j];
00274         }
00275     }
00276     return *this;
00277 }
00278
00279 // combined scalar multiplication and assignment operator
00280 template<class _Ty, size_t _Cols, size_t _Rows>
00281 inline Matrix<_Ty, _Cols, _Rows> & Matrix<_Ty, _Cols, _Rows>::operator *= (const _Ty& c)
00282 {
00283     for (size_t i=0; i < _Rows; i++)
00284     {
00285         for (size_t j=0; j < _Cols; j++)
00286         {
00287             Val[i][j] *= c;
00288         }
00289     }
00290     return *this;
00291 }
00292
00293
00294 // combined Matrix multiplication and assignment operator
00295 template<class _Ty, size_t _Cols, size_t _Rows>
00296 inline Matrix<_Ty, _Cols, _Rows> & Matrix<_Ty, _Cols, _Rows>::operator *= (const Matrix<_Ty, _Cols, _Rows> & m)
00297 {
00298     for (size_t i=0; i < _Rows; i++)
00299     {
00300         for (size_t j=0; j < _Cols; j++)
00301         {
00302             Val[i][j] *= rhs.Val[i][j];
00303         }
00304     }
00305     return *this;
00306 }
00307
00308
00309 // combined scalar division and assignment operator
00310 template<class _Ty, size_t _Cols, size_t _Rows>
00311 inline Matrix<_Ty, _Cols, _Rows> & Matrix<_Ty, _Cols, _Rows>::operator /= (const T& c)
00312 {
00313     for (size_t i=0; i < _Rows; i++)
00314     {
00315         for (size_t j=0; j < _Cols; j++)
00316         {
00317             Val[i][j] /= c;
00318         }
00319     }
00320     return *this;
00321 }
00322
00323 // combined power and assignment operator
00324 template<class _Ty, size_t _Cols, size_t _Rows>
00325 inline Matrix<_Ty, _Cols, _Rows> & Matrix<_Ty, _Cols, _Rows>::operator ^= (const size_t& c) throw(MatrixException)
00326 {
00327     for (size_t i=0; i < _Rows; i++)
00328     {
00329         for (size_t j=0; j < _Cols; j++)
00330         {
00331             Val[i][j] ^= c;
00332         }
00333     }
00334     return *this;
00335 }
00336
00337 // unary negation operator
00338 template<class _Ty, size_t _Cols, size_t _Rows>
00339 inline Matrix<_Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows>::operator - ()
00340 {
00341     Matrix<_Ty, _Cols, _Rows> ret();
00342
00343     for (size_t i=0; i < _Rows; i++)
00344     {
00345         for (size_t j=0; j < _Cols; j++)
00346         {
00347             ret.Val[i][j] = - Val[i][j];
00348         }
00349     }
00350     return ret;
00351 }
00352
00353 // binary addition operator
00354 template<class _Ty, size_t _Cols, size_t _Rows>
00355 Matrix<_Ty, _Cols, _Rows> operator + (const Matrix<_Ty, _Cols, _Rows> & lhs, const Matrix<_Ty, _Cols, _Rows> & rhs)
00356 {
00357     Matrix<_Ty, _Cols, _Rows>  ret();
00358
00359     for (size_t i=0; i < _Rows; i++)
00360     {
00361         for (size_t j=0; j < _Cols; j++)
00362         {
00363             ret.Val[i][j] = lhs.Val[i][j] + rhs.Val[i][j];
00364         }
00365     }
00366     return ret;
00367 }
00368
00369 // binary subtraction operator
00370 template<class _Ty, size_t _Cols, size_t _Rows>
00371 Matrix<_Ty, _Cols, _Rows> operator - (const Matrix<_Ty, _Cols, _Rows> & lhs, const Matrix<_Ty, _Cols, _Rows> & rhs)
00372 {
00373     Matrix<_Ty, _Cols, _Rows> ret();
00374
00375     for (size_t i=0; i < _Rows; i++)
00376     {
00377         for (size_t j=0; j < _Cols; j++)
00378         {
00379             ret.Val[i][j] = lhs.Val[i][j] - rhs.Val[i][j];
00380         }
00381     }
00382     return ret;
00383 }
00384
00385
00386 // binary scalar multiplication operator
00387 template<class _Ty, size_t _Cols, size_t _Rows>
00388 Matrix<_Ty, _Cols, _Rows> operator * (const Matrix<_Ty, _Cols, _Rows> & lhs, const _Ty& c)
00389 {
00390     Matrix<_Ty, _Cols, _Rows> ret();
00391
00392     for (size_t i=0; i < m.Row; i++)
00393     {
00394         for (size_t j=0; j < m.Col; j++)
00395         {
00396             ret.Val[i][j] = lhs.Val[i][j] * c;
00397         }
00398     }
00399     return ret;
00400 }
00401
00402
00403 // binary Matrix multiplication operator
00404 template<class _Ty, size_t _Cols1Rows2, size_t _Rows1, size_t _Cols2>
00405 Matrix<_Ty, _Cols, _Rows> operator * (const Matrix<_Ty, _Cols1Rows2, _Rows1> & lhs, const Matrix<_Ty, _Cols2, _Cols1Rows2> & rhs)
00406 {
00407     Matrix<_Ty, _Cols2, _Rows1> ret();
00408
00409     for (size_t i=0; i < _Rows1; i++)
00410     {
00411         for (size_t j=0; j < _Cols2; j++)
00412         {
00413             ret.Val[i][j] = _Ty(0);
00414             for (size_t k=0; k < _Cols1Rows2; k++)
00415             {
00416                 ret.Val[i][j] += lhs.Val[i][k] * rhs[k][j];
00417             }
00418         }
00419     }
00420     return ret;
00421 }
00422
00423 // binary power operator
00424 template<class _Ty, size_t _Cols, size_t _Rows>
00425 Matrix<_Ty, _Cols, _Rows> operator ^ (const Matrix<_Ty, _Cols, _Rows> & lhs, const size_t & rhs)
00426 {
00427     assert(rhs > 0); // need matrix E to begin with?
00428
00429     Matrix<_Ty, _Cols, _Rows> temp(m);
00430
00431     for (size_t i=2; i <= pow; i++)
00432     {
00433         ret = ret * lhs;
00434     }
00435
00436     return ret;
00437 }
00438
00439
00440 // unary transpose operator
00441 template<class _Ty, size_t _Cols, size_t _Rows>
00442 Matrix<_Ty, _Cols, _Rows> operator  ~ (const Matrix<_Ty, _Cols, _Rows> & rhs)
00443 {
00444     Matrix<_Ty, _Cols, _Rows> ret();
00445
00446     for (size_t i=0; i < _Rows; i++)
00447     {
00448         for (size_t j=0; j < _Cols; j++)
00449         {
00450             ret.Val[i][j] = rhs.Val[j][i];
00451         }
00452     }
00453     return ret;
00454 }
00455
00456
00457 // unary inversion operator
00458 template<class _Ty, size_t _Cols, size_t _Rows>
00459 Matrix<_Ty, _Cols, _Rows> operator ! (Matrix<_Ty, _Cols, _Rows> rhs)
00460 {xxx
00461     size_t i,j,k;
00462     T a1,a2,*rowptr;
00463
00464     Matrix<_Ty, _Cols, _Rows> temp(m.Row,m.Col);
00465
00466     temp.Unit();
00467     for (k=0; k < m.Row; k++)
00468     {
00469         int indx = m.pivot(k);
00470         if (indx == -1)
00471         throw MatrixException("Matrix<_Ty, _Cols, _Rows>::operator!: Inversion of a singular Matrix");
00472
00473         if (indx != 0)
00474         {
00475             rowptr = temp.Val[k];
00476             temp.Val[k] = temp.Val[indx];
00477             temp.Val[indx] = rowptr;
00478         }
00479         a1 = m.Val[k][k];
00480         for (j=0; j < m.Row; j++)
00481         {
00482             m.Val[k][j] /= a1;
00483             temp.Val[k][j] /= a1;
00484         }
00485         for (i=0; i < m.Row; i++)
00486         if (i != k)
00487         {
00488             a2 = m.Val[i][k];
00489             for (j=0; j < m.Row; j++)
00490             {
00491                 m.Val[i][j] -= a2 * m.Val[k][j];
00492                 temp.Val[i][j] -= a2 * temp.Val[k][j];
00493             }
00494         }
00495     }
00496     return temp;
00497 }
00498
00499
00500 // solve simultaneous equation
00501 template<class _Ty, size_t _Cols, size_t _Rows>
00502 inline Matrix<_Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows>::Solve(const Matrix<_Ty, _Cols, _Rows> & v) const throw(MatrixException)
00503 {xxx
00504     size_t i, j, k;
00505     _Ty a1;
00506
00507     Matrix<_Ty, _Cols, _Rows> temp(Row, Col + v.Col);
00508     for (i=0; i < Row; i++)
00509     {
00510         for (j=0; j < Col; j++)
00511         temp.Val[i][j] = Val[i][j];
00512         for (k=0; k < v.Col; k++)
00513         temp.Val[i][Col+k] = v.Val[i][k];
00514     }
00515     for (k=0; k < Row; k++)
00516     {
00517         int indx = temp.pivot(k);
00518         if (indx == -1)
00519         throw MatrixException("Matrix<_Ty, _Cols, _Rows>::Solve(): Singular Matrix!");
00520
00521         a1 = temp.Val[k][k];
00522         for (j=k; j < temp.Col; j++)
00523         temp.Val[k][j] /= a1;
00524
00525         for (i=k+1; i < Row; i++)
00526         {
00527             a1 = temp.Val[i][k];
00528             for (j=k; j < temp.Col; j++)
00529             temp.Val[i][j] -= a1 * temp.Val[k][j];
00530         }
00531     }
00532     Matrix<_Ty, _Cols, _Rows> s(v.Row,v.Col);
00533     for (k=0; k < v.Col; k++)
00534     for (int m=int(Row)-1; m >= 0; m--)
00535     {
00536         s.Val[m][k] = temp.Val[m][Col+k];
00537         for (j=m+1; j < Col; j++)
00538         s.Val[m][k] -= temp.Val[m][j] * s.Val[j][k];
00539     }
00540     return s;
00541 }
00542
00543
00544 // set zero to all elements of this Matrix
00545 template<class _Ty, size_t _Cols, size_t _Rows>
00546 inline Matrix<_Ty, _Cols, _Rows> & Matrix<_Ty, _Cols, _Rows>::Null()
00547 {
00548     for (size_t i=0; i < Row; i++)
00549     {
00550         for (size_t j=0; j < Col; j++)
00551         {
00552             Val[i][j] = _Ty(0);
00553         }
00554     }
00555     return *this;
00556 }
00557
00558 // set this Matrix to unity
00559 template<class _Ty, size_t _Cols, size_t _Rows>
00560 inline void Matrix<_Ty, _Cols, _Rows>::Unity()
00561 {
00562     for (size_t i=0; i < Row; i++)
00563     {
00564         for (size_t j=0; j < Col; j++)
00565         {
00566             Val[i][j] = i == j ? _Ty(1) : _Ty(0);
00567         }
00568     }
00569     return;
00570 }
00571
00572 // private partial pivoting method
00573 template<class _Ty, size_t _Cols, size_t _Rows>
00574 inline int Matrix<_Ty, _Cols, _Rows>::pivot(size_t row)
00575 {
00576     size_t k = row;
00577     double amax = -1.0, temp;
00578
00579     for (size_t i=row; i < _Rows; i++)
00580     {
00581         if ((temp = abs(Val[i][row])) > amax && temp != 0.0)
00582         {
00583             amax = temp;
00584             k = i;
00585         }
00586     }
00587     if (Val[k][row] == _Ty(0))
00588     {
00589         return -1;
00590     }
00591     if (k != row)
00592     {
00593         _Ty* rowptr = Val[k];
00594         Val[k] = Val[row];
00595         Val[row] = rowptr;
00596         int ret = static_cast<int>(k);
00597         if (ret == -1)
00598         {
00599             throw MatrixException("Matrix<_Ty, _Cols, _Rows::pivot(row): return value == -1");
00600         }
00601         return ret;
00602     }
00603     return 0;
00604 }
00605
00606
00607 // calculate the determinant of a Matrix
00608 template<class _Ty, size_t _Cols, size_t _Rows>
00609 inline _Ty Matrix<_Ty, _Cols, _Rows>::Det()
00610 {
00611     size_t i, j, k;
00612     T piv, detVal = T(1);
00613
00614     Matrix<_Ty, _Cols, _Rows> temp(*this);
00615
00616     for (k = 0; k < Row; k++)
00617     {
00618         int indx = temp.pivot(k);
00619         if (indx == -1)
00620         {
00621             return 0;
00622         }
00623         if (indx != 0)
00624         {
00625             detVal = - detVal;
00626         }
00627         detVal = detVal * temp.Val[k][k];
00628         for (i=k+1; i < Row; i++)
00629         {
00630             piv = temp.Val[i][k] / temp.Val[k][k];
00631             for (j=k+1; j < Row; j++)
00632             {
00633                 temp.Val[i][j] -= piv * temp.Val[k][j];
00634             }
00635         }
00636     }
00637     return detVal;
00638 }
00639
00640 // calculate the norm of a Matrix
00641 template<class _Ty, size_t _Cols, size_t _Rows>
00642 inline _Ty Matrix<_Ty, _Cols, _Rows>::Norm()
00643 {
00644     _Ty ret = _Ty(0);
00645
00646     for (size_t i=0; i < _Rows; i++)
00647     {
00648         for (size_t j=0; j < _Cols; j++)
00649         {
00650             ret += Val[i][j] * Val[i][j];
00651         }
00652     }
00653     ret = sqrt(ret);
00654     return ret;
00655 }
00656
00657
00658 // calculate the condition number of a Matrix
00659 template<class _Ty, size_t _Cols, size_t _Rows> T
00660 inline Matrix<_Ty, _Cols, _Rows>::Cond()
00661 {
00662     Matrix<_Ty, _Cols, _Rows> inv();
00663
00664     inv = ! (*this);
00665     _Ty ret = Norm() * inv.Norm();
00666
00667     return retVal;
00668 }
00669
00670
00671 // calculate the cofactor of a Matrix for a given element
00672 template<class _Ty, size_t _Cols, size_t _Rows>
00673 inline _Ty Matrix<_Ty, _Cols, _Rows>::Cofactor(size_t row, size_t col) throw(MatrixException)
00674 {xxx
00675     size_t i, i1, j, j1;
00676
00677     if (Row != Col)
00678     {
00679         throw MatrixException("Matrix<_Ty, _Cols, _Rows>::Cofactor(): Cofactor of a non-square Matrix!");
00680     }
00681
00682     if (row > _Rows || col > _Cols)
00683     {
00684         throw MatrixException("Matrix<_Ty, _Cols, _Rows>::Cofactor(): Index out of range!");
00685     }
00686
00687     Matrix<_Ty, _Cols-1, _Rows-1> temp();
00688
00689     for (i=i1=0; i < Row; i++)
00690     {
00691         if (i == row)
00692         {
00693             continue;
00694         }
00695         for (j=j1=0; j < Col; j++)
00696         {
00697             if (j == col)
00698             {
00699                 continue;
00700             }
00701             temp.Val[i1][j1] = Val[i][j];
00702             j1++;
00703         }
00704         i1++;
00705     }
00706     return ((row+col)%2 == 1) ? -temp.Det() : temp.Det();
00707 }
00708
00709
00710 // calculate adjoin of a Matrix
00711 template<class _Ty, size_t _Cols, size_t _Rows>
00712 inline Matrix<_Ty, _Cols, _Rows> Matrix<_Ty, _Cols, _Rows>::Adjoin()
00713 {xxx
00714     if (Row != Col)
00715     {
00716         throw MatrixException("Matrix<_Ty, _Cols, _Rows>::Adjoin(): Adjoin of a non-square Matrix.");
00717     }
00718
00719     Matrix<_Ty, _Cols, _Rows> ret();
00720
00721     for (size_t i=0; i < Row; i++)
00722     {
00723         for (size_t j=0; j < Col; j++)
00724         {
00725             ret.Val[i][j] = Cofact(i,j);
00726         }
00727     }
00728     ret = ~ret;
00729     return ret;
00730 }
00731
00732 // Determine if the Matrix is singular
00733 template<class _Ty, size_t _Cols, size_t _Rows>
00734 inline bool Matrix<_Ty, _Cols, _Rows>::IsSingular()
00735 {
00736     if (Row != Col)
00737     {
00738         return false;
00739     }
00740     return (Det() == T(0));
00741 }
00742
00743 // Determine if the Matrix is diagonal
00744 template<class _Ty, size_t _Cols, size_t _Rows>
00745 inline bool Matrix<_Ty, _Cols, _Rows>::IsDiagonal()
00746 {
00747     if (Row != Col)
00748     {
00749         return false;
00750     }
00751     for (size_t i=0; i < Row; i++)
00752     {
00753         for (size_t j=0; j < Col; j++)
00754         {
00755             if (i != j && Val[i][j] != T(0))
00756             {
00757                 return false;
00758             }
00759         }
00760     }
00761     return true;
00762 }
00763
00764 // Determine if the Matrix is scalar
00765 template<class _Ty, size_t _Cols, size_t _Rows>
00766 inline bool Matrix<_Ty, _Cols, _Rows>::IsScalar()
00767 {
00768     if (!IsDiagonal())
00769     {
00770         return false;
00771     }
00772     _Ty v = Val[0][0];
00773     for (size_t i=1; i < Row; i++)
00774     {
00775         if (Val[i][i] != v)
00776         {
00777             return false;
00778         }
00779     }
00780     return true;
00781 }
00782
00783 // Determine if the Matrix is a unit Matrix
00784 template<class _Ty, size_t _Cols, size_t _Rows>
00785 inline bool Matrix<_Ty, _Cols, _Rows>::IsUnit ()
00786 {
00787     return (IsScalar() && Val[0][0] == T(1)) ? true : false;
00788 }
00789
00790 // Determine if this is a null Matrix
00791 template<class _Ty, size_t _Cols, size_t _Rows>
00792 inline bool Matrix<_Ty, _Cols, _Rows>::IsNull()
00793 {
00794     for (size_t i=0; i < Row; i++)
00795     {
00796         for (size_t j=0; j < Col; j++)
00797         {
00798             if (Val[i][j] != T(0))
00799             {
00800                 return false;
00801             }
00802         }
00803     }
00804     return true;
00805 }
00806
00807 // Determine if the Matrix is symmetric
00808 template<class _Ty, size_t _Cols, size_t _Rows>
00809 inline bool Matrix<_Ty, _Cols, _Rows>::IsSymmetric()
00810 {
00811     if (_Rows != _Cols)
00812     {
00813         return false;
00814     }
00815     for (size_t i=0; i < Row; i++)
00816     {
00817         for (size_t j=0; j < Col; j++)
00818         {
00819             if (Val[i][j] != Val[j][i])
00820             {
00821                 return false;
00822             }
00823         }
00824     }
00825     return true;
00826 }
00827
00828 // Determine if the Matrix is skew-symmetric
00829 template<class _Ty, size_t _Cols, size_t _Rows>
00830 inline bool Matrix<_Ty, _Cols, _Rows>::IsSkewSymmetric()
00831 {
00832     if (Row != Col)
00833     {
00834         return false;
00835     }
00836     for (size_t i=0; i < Row; i++)
00837     {
00838         for (size_t j=0; j < Col; j++)
00839         {
00840             if (Val[i][j] != -Val[j][i])
00841             {
00842                 return false;
00843             }
00844         }
00845     }
00846     return true;
00847 }
00848
00849 // Determine if the Matrix is upper triangular
00850 template<class _Ty, size_t _Cols, size_t _Rows>
00851 inline bool Matrix<_Ty, _Cols, _Rows>::IsUpperTiangular()
00852 {
00853     if (Row != Col)
00854     {
00855         return false;
00856     }
00857     for (size_t i=1; i < Row; i++)
00858     {
00859         for (size_t j=0; j < i-1; j++)
00860         {
00861             if (Val[i][j] != T(0))
00862             {
00863                 return false;
00864             }
00865         }
00866     }
00867     return true;
00868 }
00869
00870 // Determine if the Matrix is lower triangular
00871 template<class _Ty, size_t _Cols, size_t _Rows>
00872 inline bool Matrix<_Ty, _Cols, _Rows>::IsLowerTiangular ()
00873 {
00874     if (Row != Col)
00875     {
00876         return false;
00877     }
00878     for (size_t j=1; j < Col; j++)
00879     {
00880         for (size_t i=0; i < j-1; i++)
00881         {
00882             if (Val[i][j] != T(0))
00883             {
00884                 return false;
00885             }
00886         }
00887     }
00888     return true;
00889 }
00890
00891 } // namepace Mbo
00892
00893 #endif // _MBOMATRIX_H_
Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: MboRefCntPtr.h Source File

MboRefCntPtr.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      MboRefCntPtr.h
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  * - MboSynch.h
00046  * - MboSynch.cpp
00047  */
00058 /* ------------------------------------------------------------------------ */
00059
00060 #ifndef _MBOREFCNTPTR_H_
00061 #define _MBOREFCNTPTR_H_
00062
00063 #include "Mbo.h"
00064 #include "MboSynch.h"
00065
00066 namespace mbo
00067 {
00068
00069 /* ------------------------------------------------------------------------ */
00081 template <class _Ty,
00082           class _THREAD_MODEL = ThreadModel
00083          >
00084 struct RefCntRep
00085 {
00089     typedef RefCntRep<_Ty, _THREAD_MODEL>  Rep;
00090
00093     mutable long refCnt;
00094
00097     _Ty* pData;
00098
00103     inline RefCntRep(_IN _Ty* p = NULL)
00104         : refCnt(p ? 1 : 0)
00105         , pData(p)
00106     {
00107     }
00108
00111     inline RefCntRep& AddRef()
00112     {
00113         _THREAD_MODEL::Increment(&refCnt);
00114         return *this;
00115     }
00116
00124     inline bool Release()
00125     {
00126         return !_THREAD_MODEL::Decrement(&refCnt);
00127     }
00128
00134     static Rep* Alloc(_IN _Ty* p)
00135     {
00136         return new Rep(p);
00137     }
00138
00143     static void Dealloc(_IN Rep *& pRep)
00144     {
00145         if (pRep)
00146         {
00147             if (pRep->pData)
00148             {
00149                 delete pRep->pData;
00150             }
00151             delete pRep;
00152             pRep = 0;
00153         }
00154     }
00155 };
00156
00162 template <class _Ty>
00163 class NullPointer
00164 {
00165 protected:
00166
00169     class nullptr_access: std::runtime_error {
00170     public:
00171
00174         explicit nullptr_access(_IN const char *szWhat = "Null pointer access")
00175             : std::runtime_error(szWhat)
00176         {
00177         }
00178     };
00179
00180 public:
00181
00185     inline _Ty& operator*()
00186     {
00187         throw nullptr_access();
00188         return *((_Ty*)(0));
00189     }
00190
00194     inline const _Ty& operator*() const
00195     {
00196         throw nullptr_access();
00197         return *((const _Ty*)(0));
00198     }
00199
00203     inline operator bool() const
00204     {
00205         return false;
00206     }
00207 };
00208
00209 /* ------------------------------------------------------------------------ */
00267 template <class _Ty,
00268           class _THREAD_MODEL     = ThreadModel,
00269           class _THREAD_MODEL_PTR = SingleThreadedModel
00270          >
00271 class RefCntPtr
00272 {
00273 public:
00274     typedef RefCntRep<_Ty, _THREAD_MODEL> Rep;
00275     typedef NullPointer<_Ty>              NullPtr;
00276     typedef _Ty                           Type;
00277     typedef _THREAD_MODEL_PTR::CriticalSection CriticalSection;
00279 private:
00282     Rep* pRep;
00283
00286     mutable CriticalSection mx;
00287
00290     inline void __release()
00291     {
00292         if (pRep && pRep->Release())
00293         {
00294             Rep::Dealloc(pRep);
00295         }
00296     }
00297
00298 public:
00299
00307     inline RefCntPtr(_IN _Ty* p = 0)
00308         : pRep(p ? Rep::Alloc(p) : 0)
00309     {
00310     }
00311
00326     template <class _Tx>
00327     inline RefCntPtr(_IN const _Tx& x)
00328         : pRep(Rep::Alloc(new _Tx(x)))
00329     {
00330     }
00331
00336     inline RefCntPtr(_IN const RefCntPtr& oth)
00337         : pRep(0)
00338     {
00339         Lock lock(&oth.mx);
00340
00341         pRep = oth.pRep;
00342         if (pRep)
00343         {
00344             pRep->AddRef();
00345         }
00346     }
00347
00356     inline ~RefCntPtr()
00357     {
00358         Lock lock(&mx);
00359
00360         __release();
00361     }
00362
00368     inline RefCntPtr& operator=(_IN _Ty* p)
00369     {
00370         Lock lock(&mx);
00371
00372         if (!pRep || pRep->pData != p)
00373         {
00374             __release();
00375             pRep = p ? Rep::Alloc(p) : 0;
00376         }
00377         return *this;
00378     }
00379
00393     inline RefCntPtr& __assign(_IN const _Ty & ref)
00394     {
00395         Lock lock(&mx);
00396
00397         if (pRep)
00398         {
00399             if (pRep->pData)
00400             {
00401                 *pRep->pData = ref;
00402             }
00403             else
00404             {
00405                 pRep->pData = new _Ty(ref);
00406             }
00407         }
00408         else
00409         {
00410             pRep = Rep::Alloc(new _Ty(ref));
00411         }
00412         return *this;
00413     }
00414
00423     inline _Ty & __clone(_IN _OUT _Ty & ref) const
00424     {
00425         Lock lock(&mx);
00426
00427         ref = pRep && pRep->pData ? *pRep->pData : *NullPtr();
00428
00429         return ref;
00430     }
00431
00437     inline RefCntPtr& operator=(_IN const RefCntPtr& oth)
00438     {
00439         Lock lock(&mx);
00440
00441         if (pRep != oth.pRep)
00442         {
00443             __release();
00444             pRep = oth.pRep;
00445             if (pRep)
00446             {
00447                 pRep->AddRef();
00448             }
00449         }
00450         return *this;
00451     }
00452
00461     inline operator bool() const
00462     {
00463         Lock lock(&mx);
00464
00465         return (pRep != 0 && pRep->pData != 0);
00466     }
00467
00472     inline int __referenceCount() const
00473     {
00474         Lock lock(&mx);
00475
00476         return pRep ? pRep->refCnt : 0;
00477     }
00478
00481     inline CLock __getLock() const
00482     {
00483         return CLock(&mx);
00484     }
00485
00493     inline _Ty& operator*()
00494     {
00495         Lock lock(&mx);
00496
00497         return pRep && pRep->pData ? *pRep->pData : *NullPtr();
00498     }
00499
00507     inline const _Ty& operator*() const
00508     {
00509         Lock lock(&mx);
00510
00511         return pRep && pRep->pData ? *pRep->pData : *NullPtr();
00512     }
00513
00518     inline _Ty* operator->()
00519     {
00520         Lock lock(&mx);
00521
00522         return pRep ? pRep->pData : 0;
00523     }
00524
00529     inline const _Ty* operator->() const
00530     {
00531         Lock lock(&mx);
00532
00533         return pRep ? pRep->pData : 0;
00534     }
00535
00536 /*  friend class RefCntPtr<_Ty, _THREAD_MODEL, SingleThreadedModel>;
00537     operator RefCntPtr<_Ty, _THREAD_MODEL, MultiThreadedModel> () const
00538     {
00539         Lock lock(&mx);
00540
00541         RefCntPtr<_Ty, _THREAD_MODEL, MultiThreadedModel>  copy;
00542         if (pRep)
00543         {
00544             pRep->AddRef();
00545             copy.pRep = this->pRep;
00546         }
00547         return copy;
00548     }*/
00549 };
00550
00551 /*
00552 template <class _Ty,
00553           class _THREAD_MODEL = ThreadModel
00554          >
00555 class RefCntPtr<_Ty, _THREAD_MODEL, SingleThreadedModel>: public RefCntPtr<_Ty, _THREAD_MODEL_PTR, SingleThreadedModel>
00556 {
00557 public:
00558
00559     operator RefCntPtr<_Ty, _THREAD_MODEL, MultiThreadedModel> ()
00560     {
00561         RefCntPtr<_Ty, _THREAD_MODEL, MultiThreadedModel>  copy;
00562         copy.rep = this->rep;
00563         return copy;
00564     }
00565 };
00566 */
00567
00583 template <class _Ty, class _THM, class _THM_PTR>
00584 bool operator< (_IN const RefCntPtr<_Ty, _THM, _THM_PTR> & lhs, _IN const RefCntPtr<_Ty, _THM, _THM_PTR> & rhs)
00585 {
00586     return lhs && rhs && *lhs < *rhs;
00587 }
00588
00604 template <class _Ty, class _THM, class _THM_PTR>
00605 bool operator== (_IN const RefCntPtr<_Ty, _THM, _THM_PTR> & lhs, _IN const RefCntPtr<_Ty, _THM, _THM_PTR> & rhs)
00606 {
00607     return lhs && rhs && *lhs == *rhs;
00608 }
00609
00625 template <class _Ty, class _THM, class _THM_PTR>
00626 bool operator!= (_IN const RefCntPtr<_Ty, _THM, _THM_PTR> & lhs, _IN const RefCntPtr<_Ty, _THM, _THM_PTR> & rhs)
00627 {
00628     return !lhs || !rhs || *lhs != *rhs;
00629 }
00630
00631 }; // namespace mbo
00632
00633 #endif // _MBOREFCNTPTR_H_
Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: MboStrHelper.h Source File

MboStrHelper.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      MboStrHelper.h
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  * - MboTString.h
00046  */
00056 /* ------------------------------------------------------------------------ */
00057
00058 #ifndef _MBOSTRHELPER_H_
00059 #define _MBOSTRHELPER_H_
00060
00061 #include "Mbo.h"
00062 #include "MboTString.h"
00063 #include <string>
00064 #include <sstream>
00065 #include <assert.h>
00066
00067 #ifdef _MSC_VER
00068 // disable warning C4251: '...' : class '...' needs to have dll-interface to be used by clients of class '...'
00069 # pragma warning (disable: 4251)
00070 // non dll-interface class '...' used as base for dll-interface class '...'
00071 # pragma warning (disable: 4275)
00072 #endif
00073
00074 #if defined(_MSC_VER) && (_MSC_VER < 1300 || !defined(snprintf))
00075 # define snprintf _snprintf
00076 #endif
00077
00078 namespace mbo {
00079
00080 template<class _E, class _Tr, class _A>
00081 inline std::basic_string<_E, _Tr, _A> & StrUpper(_IN std::basic_string<_E, _Tr, _A> & str)
00082 {
00083     for (std::basic_string<_E, _Tr, _A>::iterator it = str.begin(); it != str.end(); ++it)
00084     {
00085 #ifdef _STLPORT_VERSION
00086         *it = std::toupper(*it, std::locale::empty());
00087 #else
00088         *it = std::use_facet<std::ctype<_E> >(std::locale::empty() __USE_FACET).toupper(*it);
00089 #endif
00090     }
00091     return str;
00092 }
00093
00094 template<class _E, class _Tr, class _A>
00095 inline std::basic_string<_E, _Tr, _A> & StrLower(_IN std::basic_string<_E, _Tr, _A> & str)
00096 {
00097     for (std::basic_string<_E, _Tr, _A>::iterator it = str.begin(); it != str.end(); ++it)
00098     {
00099 #ifdef _STLPORT_VERSION
00100         *it = std::tolower(*it, std::locale::empty());
00101 #else
00102         *it = std::use_facet<std::ctype<_E> >(std::locale::empty() __USE_FACET).tolower(*it);
00103 #endif
00104     }
00105     return str;
00106 }
00107
00108 template<class _E, class _Tr, class _A>
00109 inline std::basic_string<_E, _Tr, _A> & StrTrimLeft(_IN std::basic_string<_E, _Tr, _A> & str)
00110 {
00111     return str.erase(0, str.find_first_not_of(StrCreate<_E, _Tr, _A>(" \r\n\t")));
00112 }
00113
00114 template<class _E, class _Tr, class _A>
00115 inline std::basic_string<_E, _Tr, _A> & StrTrimRight(_IN std::basic_string<_E, _Tr, _A> & str)
00116 {
00117     std::basic_string<_E, _Tr, _A>::size_type pos = str.find_last_not_of(StrCreate<_E, _Tr, _A>(" \r\n\t"));
00118
00119     if (pos != std::basic_string<_E, _Tr, _A>::npos)
00120     {
00121         str.resize(pos + 1);
00122         return str;
00123     }
00124     else
00125     {
00126         str.resize(0);
00127         return str;
00128     }
00129 }
00130
00131 template<class _E, class _Tr, class _A>
00132 inline std::basic_string<_E, _Tr, _A> & StrTrim(_IN std::basic_string<_E, _Tr, _A> & str)
00133 {
00134     return StrTrimLeft(StrTrimRight(str));
00135 }
00136
00137 template<class _E, typename _ValType>
00138 inline std::basic_string<_E> StrFrom(_IN const _ValType & val)
00139 {
00140     std::basic_stringbuf<_E> buf;
00141     std::basic_ostream<_E> out(&buf);
00142     out << val;
00143     return buf.str();
00144 }
00145
00146 template<>
00147 inline std::basic_string<char> StrFrom(_IN const int & val)
00148 {
00149     char buf[32];
00150
00151     snprintf(buf, sizeof(buf), "%d", val);
00152     return std::basic_string<char>(buf);
00153 }
00154
00155 template<>
00156 inline std::basic_string<char> StrFrom(_IN const long & val)
00157 {
00158     char buf[32];
00159
00160     snprintf(buf, sizeof(buf), "%ld", val);
00161     return std::basic_string<char>(buf);
00162 }
00163
00164 template<>
00165 inline std::basic_string<char> StrFrom(_IN const bool & val)
00166 {
00167     return val ? std::basic_string<char>("1") : std::basic_string<char>("0");
00168 }
00169
00170 template<typename _ValType, class _E, class _Tr, class _A>
00171 inline _ValType StrTo(_IN const std::basic_string<_E, _Tr, _A> & str)
00172 {
00173     std::basic_stringbuf<_E, _Tr> buf(str);
00174     std::basic_istream<_E, _Tr> in(&buf);
00175     _ValType val;
00176     in >> val;
00177     return val;
00178 }
00179
00180 template<class _E, class _Tr, class _A>
00181 inline int StrToInt(_IN const std::basic_string<_E, _Tr, _A> & str)
00182 {
00183     return StrTo<int, _E, _Tr, _A>(str);
00184 }
00185
00186 template<>
00187 inline int StrToInt(_IN const std::basic_string<char> & str)
00188 {
00189     int val;
00190     sscanf(str.c_str(), "%d", &val);
00191     return val;
00192 }
00193
00194 template<class _E, class _Tr, class _A>
00195 inline long StrToLong(_IN const std::basic_string<_E, _Tr, _A> & str)
00196 {
00197     return StrTo<long, _E, _Tr, _A>(str.c_str());
00198 }
00199
00200 template<>
00201 inline long StrToLong(_IN const std::basic_string<char> & str)
00202 {
00203     long val;
00204     sscanf(str.c_str(), "%ld", &val);
00205     return val;
00206 }
00207
00208 template<class _E, class _Tr, class _A>
00209 inline float StrToFloat(_IN const std::basic_string<_E, _Tr, _A> & str)
00210 {
00211     return StrTo<float, _E, _Tr, _A>(str.c_str());
00212 }
00213
00214 template<>
00215 inline float StrToFloat(_IN const std::basic_string<char> & str)
00216 {
00217     float val;
00218     sscanf(str.c_str(), "%f", &val);
00219     return val;
00220 }
00221
00222 template<class _E>
00223 inline std::basic_string<_E> StrFromDouble(
00224         _IN double   val,
00225         _IN int      iWidth     = -16,
00226         _IN int      iPrecision = 10
00227     )
00228 {
00229     char szTemp[128];
00230
00231     assert(abs(iWidth) < sizeof(szTemp));
00232     assert(iPrecision >= 0);
00233
00234     if (iWidth < 0)
00235     {
00236         snprintf(szTemp, sizeof(szTemp)-1, "%0g", val);
00237         std::basic_string<_E> str(szTemp);
00238         StrTrim(str);
00239         int pos = str.find('.');
00240         int nok = str.find('e') & str.find('E') & (pos>=0 ? str.find('-', pos) : -1) & str.find('+', pos) & str.find(' ', pos);
00241         if (nok < 0 && iPrecision)
00242         {
00243             if (pos < 0)
00244             {
00245                 pos = str.length();
00246                 str += '.';
00247             }
00248             int len = str.length() - pos - 1; // length of fractional part
00249             // need to add '0's?
00250             while(len < iPrecision)
00251             {
00252                 str += '0';
00253                 len++;
00254             }
00255             // need to drop digits?
00256             if (len > iPrecision)
00257             {
00258                 str.resize(len--);
00259             }
00260             // remove front space if unwanted
00261             len = - static_cast<int>(str.length());
00262             while(str[0] == ' ' && len < iWidth)
00263             {
00264                 str.erase(0, 1);
00265                 len++;
00266             }
00267         }
00268         return str;
00269     }
00270     else
00271     {
00272         snprintf(szTemp, sizeof(szTemp)-1, "%*.*g", iWidth, iPrecision, val);
00273         return std::basic_string<_E>(szTemp);
00274     }
00275 }
00276
00277 template<class _E>
00278 inline std::basic_string<_E> StrFromFloat(
00279         _IN double   val,
00280         _IN int      iWidth     = -10,
00281         _IN int      iPrecision = 6
00282     )
00283 {
00284     return StrFromDouble<_E>(static_cast<double>(val), iWidth, iPrecision);
00285 }
00286
00287 template<class _E>
00288 inline std::basic_string<_E> StrFromBool(_IN bool val)
00289 {
00290     return StrCreate<_E, std::char_traits<_E>, std::allocator<_E> >(val ? "true" : "false");
00291 }
00292
00293 template<class _E, class _Tr, class _A>
00294 inline std::basic_string<_E, _Tr, _A> StrUCFirst(_IN const std::basic_string<_E, _Tr, _A> & str)
00295 {
00296     typedef std::basic_string<_E, _Tr, _A> _Str;
00297
00298     _Str res(str);
00299     int  bWasAlnum = false;
00300
00301     for(_Str::iterator it = res.begin(); it != res.end(); ++it)
00302     {
00303         int bIsAlnum = std::use_facet<std::ctype<_E> >(std::locale::empty() __USE_FACET).is(std::ctype<_E>::alnum, *it); /* [a-zA-Z0-9_] */
00304
00305         if (!bWasAlnum && bIsAlnum)
00306         {
00307             *it = std::use_facet<std::ctype<_E> >(std::locale::empty() __USE_FACET).toupper(*it);
00308         }
00309         else
00310         {
00311             int bIsUpper = std::use_facet<std::ctype<_E> >(std::locale::empty() __USE_FACET).is(std::ctype<_E>::upper, *it);
00312             if (bIsUpper)
00313             {
00314                 *it = std::use_facet<std::ctype<_E> >(std::locale::empty() __USE_FACET).tolower(*it);
00315             }
00316         }
00317         bWasAlnum = bIsAlnum;
00318     }
00319     return res;
00320 }
00321
00322 template<class _E, class _Tr, class _A>
00323 inline bool StrStartsWith(
00324         _IN const std::basic_string<_E, _Tr, _A> & str,
00325         _IN const std::basic_string<_E, _Tr, _A> & strPrefix,
00326         _IN bool                                   bCaseSensitive = true
00327     )
00328 {
00329     std::basic_string<_E, _Tr, _A>::size_type preflen = strPrefix.length();
00330
00331     if (preflen <= str.length())
00332     {
00333         if (!bCaseSensitive)
00334         {
00335             return !str.compare(0, preflen, strPrefix);
00336         }
00337         else
00338         {
00339             std::basic_string<_E, _Tr, _A> strIn(str.substr(0, preflen));
00340             std::basic_string<_E, _Tr, _A> strPr(strPrefix);
00341             return !StrLower(strIn).compare(StrLower(strPr));
00342         }
00343     }
00344     else
00345     {
00346         return !preflen;
00347     }
00348 }
00349
00350 template<class _E, class _Tr, class _A>
00351 inline bool StrEndsWith(
00352         _IN const std::basic_string<_E, _Tr, _A> & str,
00353         _IN const std::basic_string<_E, _Tr, _A> & strPostfix,
00354         _IN bool                                   bCaseSensitive = true
00355     )
00356 {
00357     std::basic_string<_E, _Tr, _A>::size_type postlen = strPostfix.length();
00358
00359     if (postlen <= str.length())
00360     {
00361         if (!bCaseSensitive)
00362         {
00363             return !str.compare(str.length() - postlen, postlen, strPostfix);
00364         }
00365         else
00366         {
00367             std::basic_string<_E, _Tr, _A> strIn(str.substr(str.length() - postlen));
00368             std::basic_string<_E, _Tr, _A> strPr(strPostfix);
00369             return !StrLower(strIn).compare(StrLower(strPr));
00370         }
00371     }
00372     else
00373     {
00374         return !postlen;
00375     }
00376 }
00377
00378 template<class _E, class _Tr, class _A>
00379 inline std::basic_string<_E, _Tr, _A> LeftString(
00380         _IN const std::basic_string<_E, _Tr, _A> &      str,
00381         _IN std::basic_string<_E, _Tr, _A >::size_type  nLength,
00382         _IN const std::basic_string<_E, _Tr, _A> *      strMore   = NULL,
00383         _IN const std::basic_string<_E, _Tr, _A> *      strAppend = NULL
00384     )
00385 {
00386     if (str.length() > nLength && strMore && strMore->length())
00387     {
00388         if (strMore->length() >= nLength)
00389         {
00390             return strMore->substr(0, nLength);
00391         }
00392         else
00393         {
00394             return str.substr(0, nLength - strMore->length()) + *strMore;
00395         }
00396     }
00397     else
00398     {
00399         if (strAppend && strAppend->length())
00400         {
00401             /* direct return is impossible when using Rational tools */
00402             //return (str + *strAppend).substr(0, nLength);
00403             std::basic_string<_E, _Tr, _A>  strConcat = str + *strAppend;
00404             std::basic_string<_E, _Tr, _A>  strResult = strConcat.substr(0, nLength);
00405             return strResult;
00406         }
00407         else
00408         {
00409             /* direct return is impossible when using Rational tools */
00410             //return str.substr(0, nLength);
00411             std::basic_string<_E, _Tr, _A>  strResult = str.substr(0, nLength);
00412             return strResult;
00413         }
00414     }
00415 }
00416
00417 template<class _E, class _Tr, class _A>
00418 inline std::basic_string<_E, _Tr, _A> LeftString(
00419         _IN const std::basic_string<_E, _Tr, _A> &      str,
00420         _IN std::basic_string<_E, _Tr, _A>::size_type   nLength,
00421         _IN const std::basic_string<_E, _Tr, _A> &      strMore
00422     )
00423 {
00424     return LeftString<_E, _Tr, _A>(str, nLength, &strMore, NULL);
00425 }
00426
00427 template<class _E, class _Tr, class _A>
00428 inline std::basic_string<_E, _Tr, _A> LeftString(
00429         _IN const std::basic_string<_E, _Tr, _A> &      str,
00430         _IN std::basic_string<_E, _Tr, _A>::size_type   nLength,
00431         _IN const std::basic_string<_E, _Tr, _A> &      strMore,
00432         _IN const std::basic_string<_E, _Tr, _A> &      strAppend
00433     )
00434 {
00435     return LeftString<_E, _Tr, _A>(str, nLength, &strMore, &strAppend);
00436 }
00437
00438 template<class _E, class _Tr, class _A>
00439 inline void StrSplit(
00440         _IN  const std::basic_string<_E, _Tr, _A> &   strValue,
00441         _IN  const std::basic_string<_E, _Tr, _A> &   strSplit,
00442         _OUT std::basic_string<_E, _Tr, _A> &         strLeft,
00443         _OUT std::basic_string<_E, _Tr, _A> &         strRight,
00444         _IN  bool                                     bTrim = false
00445     )
00446 {
00447     std::basic_string<_E, _Tr, _A>::size_type l = strSplit.size();
00448     if (!l)
00449     {
00450         strLeft  = strValue;
00451         strRight = "";
00452     }
00453     else
00454     {
00455         std::basic_string<_E, _Tr, _A>::size_type p = strValue.find(strSplit);
00456
00457         if (p == std::basic_string<_E, _Tr, _A>::npos)
00458         {
00459             strLeft  = strValue;
00460             strRight = "";
00461         }
00462         else if (!p)
00463         {
00464             strLeft  = "";
00465             strRight = strValue.substr(strSplit.size());
00466         }
00467         else
00468         {
00469             strRight = strValue.substr(p + strSplit.size());
00470             strLeft  = strValue.substr(0, p);
00471         }
00472     }
00473     if (bTrim)
00474     {
00475         StrTrim(strLeft);
00476         StrTrim(strRight);
00477     }
00478 }
00479
00480 template<class _E, class _Tr, class _A>
00481 inline size_t StrOccurences(
00482         _IN std::basic_string<_E, _Tr, _A> & str,
00483         _IN std::basic_string<_E, _Tr, _A> & strFind
00484      )
00485 {
00486     size_t nOccurences = 0;
00487     std::basic_string<_E, _Tr, _A>::size_type pos = 0;
00488     while ((pos = str.find(strFind, pos)) != std::basic_string<_E, _Tr, _A>::npos)
00489     {
00490         nOccurences++;
00491         pos++;
00492     }
00493     return nOccurences;
00494 }
00495
00496 template<class _E, class _Tr, class _A>
00497 inline std::basic_string<_E, _Tr, _A> & StrParseEnvVars(
00498         _IN std::basic_string<_E, _Tr, _A> & str
00499     )
00500 {
00501     return str;
00502 }
00503
00504 }; // namespace mbo
00505
00506 #endif //_MBOSTRHELPER_H_
Generated on Sat Dec 4 13:06:54 2004 for mbo by doxygen 1.3.9.1


mbo: MboStrList.h Source File

MboStrList.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      MboStrList.h
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  * - MboStrHelper.h
00046  * - list2.h
00047  * - vector2.h
00048  * - map2.h
00049  */
00064 /* ------------------------------------------------------------------------ */
00065
00066 #ifndef _MBOSTRLIST_H_
00067 #define _MBOSTRLIST_H_
00068
00069 #include "Mbo.h"
00070
00071 #include "map2.h"
00072 #include "list2.h"
00073 #include "vector2.h"
00074 #include "MboStrHelper.h"
00075
00076 #ifdef _MSC_VER
00077 // disable warning C4251: '...' : class '...' needs to have dll-interface to be used by clients of class '...'
00078 # pragma warning (disable: 4251)
00079 // non dll-interface class '...' used as base for dll-interface class '...'
00080 # pragma warning (disable: 4275)
00081 #endif
00082
00083 namespace mbo {
00084
00091 #define CStrListContainer std::deque2
00092
00098 class MBO_API CStrList: public CStrListContainer<MboString> // vstr
00099 {
00100 public:
00101
00104     CStrList();
00105
00108     CStrList(_IN const CStrListContainer<MboString> &other);
00109
00112     explicit CStrList(_IN const MboString & str);
00113
00116     virtual ~CStrList();
00117
00126     MboString ToCStr(_IN const MboString & strSplit = ",") const;
00127
00154     static int Explode(
00155             _IN  const char * szInput,
00156             _IN  const char * szSplit,
00157             _OUT CStrList &   vstrResult,
00158             _IN  bool         bClearInput = true,
00159             _IN  bool         bTrim       = false
00160         );
00161
00188     static int Explode(
00189             _IN  const MboString & strInput,
00190             _IN  const MboString & strSplit,
00191             _OUT CStrList &        vstrResult,
00192             _IN  bool              bClearInput = true,
00193             _IN  bool              bTrim       = false
00194         );
00195
00209     static int ExplodeZZString(
00210             _IN  const char *      szList,
00211             _OUT CStrList &        vstrResult,
00212             _IN  bool              bClearInput = true,
00213             _IN  bool              bTrim       = false
00214         );
00215
00224     virtual bool add_if_prefix_match(
00225             _IN const MboString &  strValue,
00226             _IN const MboString &  strPrefix,
00227             _IN bool               bCaseSensitive = false,
00228             _IN bool               bOnlyNew       = false
00229         );
00230
00240     CStrList & operator = (_IN const std::deque<MboString> & values);
00241
00242     /* std::list based assignment
00243      * \note the list will be emptied before assignment
00244      * \param values container with elements to assign
00245      */
00246 //  CStrList & operator = (_IN const std::list<MboString> & values);
00247
00248     /* std::vector based assignment
00249      * \note the list will be emptied before assignment
00250      * \param values container with elements to assign
00251      */
00252 //  CStrList & operator = (_IN const std::vector<MboString> & values);
00253 };
00254
00255 #ifndef MboStrList0
00256
00257 #define MboStrList0()                 mbo::CStrList()
00258 #endif
00259 #ifndef MboStrList1
00260
00261 #define MboStrList1(s1)               mbo::CStrList::dyn_create(1, MboString(_CT(s1)))
00262 #endif
00263 #ifndef MboStrList2
00264
00265 #define MboStrList2(s1,s2)            mbo::CStrList::dyn_create(2, MboString(_CT(s1)), MboString(_CT(s2)))
00266 #endif
00267 #ifndef MboStrList3
00268
00269 #define MboStrList3(s1,s2,s3)         mbo::CStrList::dyn_create(3, MboString(_CT(s1)), MboString(_CT(s2)), MboString(_CT(s3)))
00270 #endif
00271 #ifndef MboStrList4
00272
00273 #define MboStrList4(s1,s2,s3,s4)      mbo::CStrList::dyn_create(4, MboString(_CT(s1)), MboString(_CT(s2)), MboString(_CT(s3)), MboString(_CT(s4)))
00274 #endif
00275 #ifndef MboStrList5
00276
00277 #define MboStrList5(s1,s2,s3,s4,s5)   mbo::CStrList::dyn_create(5, MboString(_CT(s1)), MboString(_CT(s2)), MboString(_CT(s3)), MboString(_CT(s4)), MboString(_CT(s5)))
00278 #endif
00279
00280 #ifdef SUPPORT_IOSTREAM
00281
00294 MBO_API std::ostream& operator<< (
00295         _IN std::ostream&    _Ostr,
00296         _IN const CStrList&  _vstr
00297     );
00298
00299 #endif // SUPPORT_IOSTREAM
00300
00301 #ifdef _MSC_VER
00302 # pragma warning (default: 4251)
00303 # pragma warning (default: 4275)
00304 #endif
00305
00306 }; // namespace mbo
00307
00308 #endif //_MBOSTRLIST_H_
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboStrMap.h Source File

MboStrMap.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      MboStrMap.h / MboStrMapStr.cpp
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  * - MboStrHelper.h
00046  * - MboTString.h
00047  * - MboStrList.h
00048  * - list2.h
00049  * - vector2.h
00050  * - map2.h
00051  */
00067 /* ------------------------------------------------------------------------ */
00068
00069 #ifndef _MBOSTRMAP_H_
00070 #define _MBOSTRMAP_H_
00071
00072 #include "Mbo.h"
00073
00074 #include "map2.h"
00075 #include "list2.h"
00076 #include "vector2.h"
00077 #include "MboStrHelper.h"
00078 #include "MboTString.h"
00079
00080 #include "MboStrList.h"
00081
00082 #ifdef _MSC_VER
00083 // disable warning C4251: '...' : class '...' needs to have dll-interface to be used by clients of class '...'
00084 # pragma warning (disable: 4251)
00085 // non dll-interface class '...' used as base for dll-interface class '...'
00086 # pragma warning (disable: 4275)
00087 #endif
00088
00089 namespace mbo {
00090
00095 struct less_cstr_ic : public std::binary_function <MboString, MboString, bool>
00096 {
00103     inline bool operator() (
00104             _IN const MboString& _Left,
00105             _IN const MboString& _Right
00106         ) const
00107     {
00108         MboString::size_type ll   = _Left.length();
00109         MboString::size_type lr   = _Right.length();
00110         MboString::size_type len  = min(ll, lr);
00111
00112         for (MboString::size_type p = 0; p < len; p++)
00113         {
00114             if (_Left.at(p) != _Right.at(p)) {
00115                 int Ll = tolower(_Left.at(p));
00116                 int Lr = tolower(_Right.at(p));
00117                 if (Ll != Lr) {
00118                     return Ll < Lr;
00119                 }
00120             }
00121         }
00122         return ll < lr;
00123
00124         //return stricmp(_Left.c_str(), _Right.c_str()) < 0;
00125     }
00126 };
00127
00148 template <
00149     class __Ty,
00150     class __CTy   = CStrListContainer<__Ty>,
00151     class __Pr    = less_cstr_ic,
00152     class __Alloc = std::allocator<std::pair<const MboString, __Ty> > >
00153 class CStrMap: public std::map2<MboString, __Ty, CStrListContainer<MboString>, __CTy, __Pr, __Alloc> // ms<_T>
00154 {
00155 public:
00158     virtual ~CStrMap() {};
00159 };
00160
00171 class MBO_API CStrMapStr: public CStrMap<MboString> // msstr
00172 {
00173 public:
00176     virtual ~CStrMapStr() {};
00177
00180     CStrMapStr();
00181
00187     CStrMapStr(_IN const MboString & strList);
00188
00228     MboString ToCStr(
00229             _IN size_t            nMaxKeyLength = 0,
00230             _IN const MboString & strKeyMore    = "",
00231             _IN const MboString & strSplit      = ",",
00232             _IN const MboString & strSeparate   = "=",
00233             _IN const MboString & strKeyAppend  = ""
00234         ) const;
00235
00242     void Scan(_IN const MboString & strList);
00243 };
00244
00245 MboString& StrApplyReplaceMap(_IN _OUT MboString & str, _IN const mbo::CStrMapStr & msstrReplaceMap);
00246
00247 #ifdef SUPPORT_IOSTREAM
00248
00261 MBO_API std::ostream& operator<< (
00262         _IN std::ostream&      _Ostr,
00263         _IN const CStrMapStr&  _msstr
00264     );
00265
00266 #endif // SUPPORT_IOSTREAM
00267
00268 #ifdef _MSC_VER
00269 # pragma warning (default: 4251)
00270 # pragma warning (default: 4275)
00271 #endif
00272
00273 }; // namespace mbo
00274
00275 #endif //_MBOSTRMAP_H_
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboSynch.h Source File

MboSynch.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      MboSynch.h / MboSynch.cpp
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  */
00238 /* ------------------------------------------------------------------------ */
00239
00240 #ifndef _MBOSYNCH_H_
00241 #define _MBOSYNCH_H_
00242
00243 #include "Mbo.h"
00244 #include <assert.h>
00245 #include <vector>
00246
00247 #ifdef _MSC_VER
00248 // disable warning C4251: '...' : class '...' needs to have dll-interface to be used by clients of class '...'
00249 #pragma warning (disable: 4251)
00250 // non dll-interface class '...' used as base for dll-interface class '...'
00251 #pragma warning (disable: 4275)
00252
00253 # ifndef _CPPRTTI
00254 #  error You must compile using RTTI
00255 # endif // _CPPRTTI
00256 #endif // _MSC_VER
00257
00258 namespace mbo
00259 {
00260
00261 // define the time to wait between to Try/Leave cyles in MultiLock::Enter()
00262 #ifndef MBO_MULTI_LOCK_SLEEPTIME
00263 # define MBO_MULTI_LOCK_SLEEPTIME 5
00264 #endif
00265
00266 typedef LONG IncDecVal;
00268 class CLock; // Forward declaration
00269
00270 /* ------------------------------------------------------------------------ */
00275 class MBO_API ILock // lx
00276 {
00277 public:
00280     virtual ~ILock() {}
00281
00284     virtual void Enter() const =0;
00285
00288     virtual void Leave() const =0;
00289
00298     virtual unsigned long GetLevel() const =0;
00299 };
00300
00301 /* ------------------------------------------------------------------------ */
00306 class MBO_API IEvent // evt
00307 {
00308 public:
00311     virtual ~IEvent() {}
00312
00315     virtual void Set() =0;
00316
00317
00320     virtual void Reset() =0;
00321
00330     virtual void Pulse() =0;
00331
00343     virtual bool Wait(_IN size_t nTime = INFINITE) const =0;
00344 };
00345
00346 /* ------------------------------------------------------------------------ */
00351 class MBO_API ICriticalSection // mx
00352 {
00353 public:
00354
00357     virtual ~ICriticalSection() {}
00358
00361     virtual void Enter() const =0;
00362
00365     virtual void Leave() const =0;
00366
00369     virtual CLock GetLock() const =0;
00370
00376     virtual unsigned long GetLevel() const =0;
00377 };
00378
00379 /* ------------------------------------------------------------------------ */
00394 class MBO_API IMutex: public ICriticalSection // mx
00395 {
00396 friend class MutexList;
00397 public:
00400     virtual void Enter() const { while (!Try(INFINITE)); }
00401
00408     virtual bool Try(_IN DWORD nMilliseconds = 0) const =0;
00409
00419     virtual CLock GetLock() const =0;
00420
00421 protected:
00422
00425     virtual HANDLE GetHandle() const { return INVALID_HANDLE_VALUE; }
00426
00429     virtual IncDecVal IncEntered() const =0;
00430
00433     virtual IncDecVal DecEntered() const =0;
00434 };
00435
00436 /* ------------------------------------------------------------------------ */
00441 class MBO_API CLockFake: public ILock // lx
00442 {
00443 public:
00444
00445     inline virtual void Enter() const {}
00446     inline virtual void Leave() const {}
00447     inline virtual unsigned long GetLevel() const { return 1; };
00448 };
00449
00450 /* ------------------------------------------------------------------------ */
00458 class MBO_API CLockSingle: public ILock // lx
00459 {
00460 friend CLock;
00461 public:
00469
00482
00492
00499
00506
00512
00520
00532
00542
00554
00560
00571
00577
00581
00585
00587
00588
00589
00590
00591
00595
00598
00602
00604
00605
00606
00613
00624
00626
00627
00631
00636
00646
00659
00663
00674
00680
00682
00683
00689
00693
00697
00702
00711
00717
00724
00731
00738
00746
00756
00765
00770
00776
00783
00791
00803
00818
00824
00828
00832
00836
00844
00847
00852
00859
00865
00869
00873
00876
00881
00890
00896
00900
00904
00912
00915
00922
00928
00932
00935
00945
00953
00957
00961
00965
00973
00976
00983
00992
00998
01002
01007
01017
01026
01028
01029
01030
01031
01032
01038
01040
01044
01048
01050
01057
01061
01065
01069
01073
01076
01082
01105
01112
01129
01136
01149
01161
01162
01168
01175
01179
01180
01181
01182
01183
01184
01191
01198
01205
01213
01220
01224
01225
01226
01227
01228
01229
01236
01243
01250
01264
01281
01284
01285
01286
01287
01288
01289
01290
01292
01293
01298
01302
01411
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboThread.h Source File

MboThread.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      MboThread.h / MboThread.cpp
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  * - MboSynch.h
00046  * - MboSynch.cpp
00047  */
00063 /* ------------------------------------------------------------------------ */
00064
00065 #ifndef _MBOTHREAD_H_
00066 #define _MBOTHREAD_H_
00067
00068 #ifdef _MSC_VER
00069 # ifndef _CPPRTTI
00070 #  error You must compile using RTTI
00071 # endif // _CPPRTTI
00072 #endif // _MSC_VER
00073
00074 #include "Mbo.h"
00075 #include "MboSynch.h"
00076 #include <map>
00077 #include <list>
00078 #include <typeinfo.h>
00079
00080 namespace mbo
00081 {
00082
00083 /* /def MBOTHREAD_USES_INSECURE_LOCK
00084  *
00085  * When defined an alternate version of determining whether or not the thread
00086  * is running will be used. Anyway there shouldn't be a need for that.
00087  */
00088 #undef MBOTHREAD_USES_INSECURE_LOCK
00089
00090 /* ------------------------------------------------------------------------ */
00122 class MBO_API MboThread
00123 {
00124 public:
00125
00128     MboThread();
00129
00143     explicit MboThread(_IN const char * szThreadName);
00144
00149     virtual ~MboThread();
00150
00155     bool    IsRunning()  const;
00156
00161     bool    IsStopping()  const;
00162
00171     bool    WaitFor(_IN DWORD nMilliseconds = INFINITE) const;
00172
00184     bool KillThread(_IN DWORD nMilliseconds = 0, _IN DWORD dwExitCode = -1);
00185
00192     DWORD   GetThreadId() const;
00193
00197     enum EThreadPriority
00198     {
00199         PRIORITY_IDLE     = THREAD_PRIORITY_IDLE,
00200         PRIORITY_LOWEST   = THREAD_PRIORITY_LOWEST,
00201         PRIORITY_LOW      = THREAD_PRIORITY_ABOVE_NORMAL,
00202         PRIORITY_NORMAL   = THREAD_PRIORITY_NORMAL,
00203         PRIORITY_HIGH     = THREAD_PRIORITY_ABOVE_NORMAL,
00204         PRIORITY_HIGHEST  = THREAD_PRIORITY_HIGHEST,
00205         PRIORITY_CRITICAL = THREAD_PRIORITY_TIME_CRITICAL
00206     };
00207
00212     void SetThreadPriority(_IN EThreadPriority ePriority);
00213
00224     const char * GetThreadName();
00225
00232     virtual void Action() = 0;
00233
00239     virtual void Start();
00240
00245     virtual void Stop();
00246
00250     virtual void OnThreadStart();
00251
00254     virtual void OnThreadStop();
00255
00263     static void SetThreadName(
00264             _IN const char * szThreadName,
00265             _IN DWORD        dwThreadID = -1
00266         );
00267
00268 protected:
00271     virtual void ThreadProc();
00272
00273     HANDLE      m_hThread;
00274     HANDLE      m_hIsStopping;
00275     DWORD       m_dwThreadId;
00276     CCriticalSectionImpl  m_mxStartStop;
00278 private:
00281     virtual void ThreadProcCaller();
00282
00292     virtual void ForceThreadName();
00293
00294     char *      m_szThreadName;
00296 #ifdef MBOTHREAD_USES_INSECURE_LOCK
00297
00301     CCriticalSectionImpl  m_mxIsRunning;
00302
00307     bool        m_bIsRunning;
00308 #endif
00309
00312     friend DWORD WINAPI MboThreadProc(LPVOID lpParameter);
00313 };
00314
00315 /* ------------------------------------------------------------------------ */
00324 class MBO_API MboIntervalThread: public MboThread
00325 {
00326 public:
00341     explicit MboIntervalThread(
00342             _IN size_t       nMilliSeconds = 1000,
00343             _IN const char * szThreadName  = NULL
00344         );
00345
00348     virtual ~MboIntervalThread();
00349
00354     IncDecVal GetCounter() const;
00355
00356 protected:
00361     virtual void SetInterval(_IN size_t nMilliSeconds = 1000);
00362
00367     virtual size_t GetInterval() const;
00368
00369 private:
00370     size_t      m_nInterval;
00371     IncDecVal   m_nCounter;
00375     virtual void ThreadProc();
00376 };
00377
00378 /* ------------------------------------------------------------------------ */
00387 class MBO_API MboEventThread: public MboThread
00388 {
00389 friend class MboDelayedEventThread;
00390 public:
00405     explicit MboEventThread(
00406             _IN bool         bAutoStart    = true,
00407             _IN const char * szThreadName  = NULL
00408         );
00409
00412     virtual ~MboEventThread();
00413
00422     IncDecVal GetCounter() const;
00423
00427     void SetEvent() const;
00428
00435     virtual bool IsSignaled() const;
00436
00442     virtual void Stop();
00443
00444 private:
00445     IncDecVal   m_nCounter;
00446     HANDLE      m_hEvent;
00450     virtual void ThreadProc();
00451 };
00452
00453 /* ------------------------------------------------------------------------ */
00463 class MBO_API MboDelayedEventThread: public MboEventThread
00464 {
00465 public:
00481     explicit MboDelayedEventThread(
00482             _IN size_t       nMilliSeconds = 0,
00483             _IN bool         bAutoStart    = true,
00484             _IN const char * szThreadName  = NULL
00485         );
00486
00489     virtual ~MboDelayedEventThread();
00490
00496     virtual void Stop();
00497
00502     virtual void SetDelay(_IN size_t nMilliSeconds = 0);
00503
00508     virtual size_t GetDelay() const;
00509
00510 private:
00511     CCriticalSectionImpl  m_mxDelay;
00512     size_t      m_nDelay;
00513     HANDLE      m_hDelay;
00517     virtual void ThreadProc();
00518 };
00519
00520 class MBO_API MboWinMsgHandler;
00521
00522 /* ------------------------------------------------------------------------ */
00532 class MBO_API MboWinMsgHandler
00533     : public mbo::MboThread
00534 {
00535 friend LRESULT CALLBACK MboWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
00536 typedef std::map<HWND, MboWinMsgHandler*> MAP_HWND;
00537 typedef std::list<MboString> WndClassList;
00538 public:
00539
00551     explicit MboWinMsgHandler(
00552             _IN const MboString& strWndClassName = "MboWinMsgHandler",
00553             _IN bool             bStart          = true
00554         );
00555
00558     virtual ~MboWinMsgHandler();
00559
00562     virtual HWND GetHWND() const;
00563
00569     virtual void Stop();
00570
00586     virtual LRESULT ProcessMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
00587
00603     virtual LRESULT ProcessDefault(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
00604
00613     virtual bool PostMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
00614
00631     virtual bool PostMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
00632
00635     virtual HINSTANCE GetModuleHandle() const;
00636
00637 protected:
00638
00647     virtual const MboString& WndClassName() const;
00648
00651     virtual const MboString& WndTitleText() const;
00652
00661     virtual void Action();
00662
00669     virtual void OnWindowCreated();
00670
00675     virtual void MessageHandler(MSG & msg);
00676
00679     virtual bool WndCreate();
00680
00684     virtual bool WndCalcMetrics();
00685
00688     virtual void WndDestroy();
00689
00692     virtual bool WndRegister();
00693
00702     void AddHWND();
00703
00704     HWND                m_hwnd;
00706 #ifdef _MSC_VER
00707 // disable warning C4251: '...' : class '...' needs to have dll-interface to be used by clients of class '...'
00708 # pragma warning (disable: 4251)
00709 // non dll-interface class '...' used as base for dll-interface class '...'
00710 # pragma warning (disable: 4275)
00711 #endif
00712
00713     const MboString     m_strWndClassName;
00715     static WndClassList g_vWndClassList;
00717 private:
00718
00726     static MAP_HWND     g_mhwndList;
00727
00728 #ifdef _MSC_VER
00729 # pragma warning (default: 4251)
00730 # pragma warning (default: 4275)
00731 #endif
00732
00733 };
00734
00735 /* ------------------------------------------------------------------------ */
00736 }; // namespace
00737
00738 #endif // _MBOTHREAD_H_
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: MboTString.h Source File

MboTString.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      MboTString.h / MboTString.cpp
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  */
00060 /* ------------------------------------------------------------------------ */
00061
00062 #ifndef _MBOTSTRING_H
00063 #define _MBOTSTRING_H
00064
00065 #include "Mbo.h"
00066 #include <locale>
00067 #include <string>
00068 #include <stdexcept>
00069 #include <stdlib.h>
00070 #if _MSC_VER
00071 # include <tchar.h>
00072 #endif
00073
00074 namespace mbo
00075 {
00076
00077 #ifndef _TCHAR_DEFINED
00078 # define _TCHAR_DEFINED
00079 typedef char TCHAR;
00080 #endif
00081
00082 typedef std::basic_string<TCHAR> tstring; // ts
00083
00084 #ifndef MBO_STRING_DEFINED
00085 #define MBO_STRING_DEFINED
00086
00087     typedef mbo::tstring MboString; /* should equal std::string */
00088
00089 #endif // MBO_STRING_DEFINED
00090
00091 // Work around Mircosoft MSC.6 STL incompatibility
00092 #if defined(_MSC_VER) && _MSC_VER < 1300
00093 # define __USE_FACET , NULL, 1
00094 #else
00095 # define __USE_FACET
00096 #endif
00097
00098 template<class _E, class _Tr, class _A>
00099 inline std::basic_string<_E, _Tr, _A> StrCreate(_IN const char *sz)
00100 {
00101     std::basic_string<_E, _Tr, _A> str;
00102     std::basic_string<_E, _Tr, _A>::size_type pos = 0;
00103
00104     while (*sz)
00105     {
00106         str.append(1,  std::use_facet<std::ctype<_E> >(std::locale::empty() __USE_FACET).widen(*sz++));
00107     }
00108     return str;
00109 }
00110
00111 template<>
00112 inline std::basic_string<char> StrCreate(_IN const char *sz)
00113 {
00114     return std::basic_string<char>(sz);
00115 }
00116
00117 MBO_API mbo::tstring TStrCreate(_IN const char *sz);
00118
00119 #define _TS(text) mbo::TStrCreate(text)
00120
00121 class string_conversion_error: public std::runtime_error
00122 {
00123 public:
00124     string_conversion_error()
00125         : std::runtime_error("String cannot be converted")
00126     {
00127     }
00128 };
00129
00130 MBO_API std::basic_string<char> WStrToStr(_IN const std::basic_string<wchar_t> & wstr);
00131
00132 MBO_API std::basic_string<wchar_t> StrToWStr(_IN const std::basic_string<char> & str);
00133
00134 template<typename _ValType>
00135 tstring TStrFrom(_IN const _ValType & val)
00136 {
00137     return StrFrom<tstring::value_type, _ValType>(val);
00138 }
00139
00140 }; // namespace mbo
00141
00142 #endif // _MBOTSTRING_H
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Namespace Members - Enumerations

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
All | Functions | Variables | Typedefs | Enumerations | Enumeration values

  • DRAW_MODE : mbo
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: Namespace Members - Enumeration values

All | Functions | Variables | Typedefs | Enumerations | Enumeration values

  • DRAW_MODE_FILL : mbo
  • DRAW_MODE_HS_BDIAGONAL : mbo
  • DRAW_MODE_HS_CROSS : mbo
  • DRAW_MODE_HS_DIAGCROSS : mbo
  • DRAW_MODE_HS_FDIAGONAL : mbo
  • DRAW_MODE_HS_HORIZONTAL : mbo
  • DRAW_MODE_HS_VERTICAL : mbo
  • DRAW_MODE_TRANSPARENT : mbo
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: Namespace Members - Functions

All | Functions | Variables | Typedefs | Enumerations | Enumeration values
c | l | n | o | s | t | w

- c -

  • check_fun() : std

- l -

  • LeftString() : mbo

- n -

  • NormalizeRect() : mbo

- o -

  • operator<<() : mbo
  • operator==() : mbo
  • operator>>() : mbo

- s -

  • StrApplyReplaceMap() : mbo
  • StrCreate() : mbo
  • StrEndsWith() : mbo
  • StrFrom() : mbo
  • StrFromBool() : mbo
  • StrFromColor() : mbo
  • StrFromDouble() : mbo
  • StrFromFloat() : mbo
  • StrLower() : mbo
  • StrOccurences() : mbo
  • StrParseEnvVars() : mbo
  • StrSplit() : mbo
  • StrStartsWith() : mbo
  • StrTo() : mbo
  • StrToColor() : mbo
  • StrToFloat() : mbo
  • StrToInt() : mbo
  • StrToLong() : mbo
  • StrToWStr() : mbo
  • StrTrim() : mbo
  • StrTrimLeft() : mbo
  • StrTrimRight() : mbo
  • StrUCFirst() : mbo
  • StrUpper() : mbo

- t -

  • TStrCreate() : mbo
  • TStrFrom() : mbo

- w -

  • WStrToStr() : mbo
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: Namespace Members - Typedefs

All | Functions | Variables | Typedefs | Enumerations | Enumeration values

  • CriticalSection : mbo
  • EventModel : mbo
  • IncDecVal : mbo
  • Lock : mbo
  • LockMulti : mbo
  • LockSingle : mbo
  • MboString : mbo
  • MultiThreadedModel : mbo
  • MutexModel : mbo
  • SingleThreadedModel : mbo
  • TCHAR : mbo
  • ThreadModel : mbo
  • tstring : mbo
  • Unlock : mbo
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: Namespace Members - Variables

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
All | Functions | Variables | Typedefs | Enumerations | Enumeration values

  • true : mbo
Generated on Sat Dec 4 13:06:58 2004 for mbo by doxygen 1.3.9.1


mbo: reallocator.h Source File

reallocator.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2004 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      reallocator.h
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  */
00055 /* ------------------------------------------------------------------------ */
00056
00057 #ifndef _REALLOCATOR_H_
00058 #define _REALLOCATOR_H_
00059
00060 #include "Mbo.h"
00061
00062 #include "string.h"  /* for memmove() */
00063 #include <new>
00064 #include <memory>
00065
00066 #if defined(_MSC_VER) && _MSC_VER >= 1300
00067 # pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
00068 #endif
00069
00070 namespace mbo
00071 {
00072
00077 template< class __ValueType, class __ReferenceType = __ValueType>
00078 class allocator
00079 {
00080 public:
00081
00082     typedef __ValueType              value_type;
00083     typedef size_t                   size_type;
00084     typedef ptrdiff_t                difference_type;
00086     typedef __ValueType *            pointer;
00087     typedef const __ValueType *      const_pointer;
00089     typedef __ReferenceType &        reference;
00090     typedef const __ReferenceType &  const_reference;
00094     pointer address(reference ref)
00095     {
00096         return &ref;
00097     }
00098
00101     const_pointer address(const_reference ref)
00102     {
00103         return &ref;
00104     }
00105
00114     pointer allocate(size_type size, allocator<void,char>::const_pointer hint = 0L)
00115     {
00116         return size ? reinterpret_cast<pointer>(new char [size * sizeof(value_type)]) : 0L;
00117     }
00118
00126     void deallocate(pointer ptr, size_type size)
00127     {
00128         delete [] reinterpret_cast<char*>(ptr);
00129     }
00130
00138     void construct(pointer ptr, const_reference oth)
00139     {
00140         new (ptr) value_type(oth);
00141     }
00142
00147     void destroy(pointer ptr)
00148     {
00149         ptr->~__ValueType();
00150     }
00151
00155     size_type max_size() const
00156     {
00157         return static_cast<size_type>(~0) / sizeof(value_type);
00158     }
00159
00160 #if MBO_0
00161     allocator()
00162     {
00163     }
00164
00165     template< class __Other>
00166     allocator(const allocator<__Other> &)
00167     {
00168     }
00169 #endif
00170
00174     template<class __Other>
00175     struct rebind
00176     {
00177         typedef allocator<__Other> other;
00178     };
00179 };
00180
00190 template< class __ValueType>
00191 class reallocator: public allocator<__ValueType>
00192 {
00193 public:
00194
00203     pointer reallocate(pointer ptr, size_type old_size, size_type new_size) __THROWS(std::bad_alloc)
00204     {
00205         pointer dst = allocate(new_size);
00206
00207         mbo_throw_if_not(std::bad_alloc, dst || !new_size);
00208         if (dst && ptr)
00209         {
00210             move(dst, ptr, min(new_size, old_size));
00211         }
00212         if (ptr && (dst || !new_size))
00213         {
00214             deallocate(ptr, old_size);
00215         }
00216         return dst;
00217     }
00218
00234     void move(pointer dst, pointer src, size_type size)
00235     {
00236         //std::uninitialized_copy(src, src + size, dst);
00237         memmove(dst, src, size * sizeof(value_type));
00238     }
00239 };
00240
00253 template< class __ValueType>
00254 class mem_reallocator: public reallocator<__ValueType>
00255 {
00256 public:
00257
00264     pointer allocate(size_type size, std::allocator<void>::const_pointer hint = 0L)
00265     {
00266         return static_cast<pointer>(malloc(size * sizeof(value_type)));
00267     }
00268
00276     void deallocate(pointer ptr, size_type size)
00277     {
00278         free(ptr);
00279     }
00280
00291     pointer reallocate(pointer ptr, size_type old_size, size_type new_size)
00292     {
00293         return static_cast<pointer>(realloc(ptr, new_size * sizeof(value_type)));
00294     }
00295
00304     void move(pointer dst, pointer src, size_type size)
00305     {
00306         memmove(dst, src, size * sizeof(value_type));
00307     }
00308 };
00309
00310 }; // namespace mbo
00311
00312 #if defined(_MSC_VER) && _MSC_VER >= 1300
00313 # pragma warning(default: 4290)
00314 #endif
00315
00316 #endif // _REALLOCATOR_H_
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other > Member List

This is the complete list of members for mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other >, including all inherited members.

other typedef mbo::allocator< __ValueType, __ReferenceType >::rebind< __Other >

Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

mbo::less_cstr_ic Member List

This is the complete list of members for mbo::less_cstr_ic, including all inherited members.

operator()(const MboString &_Left, const MboString &_Right) const mbo::less_cstr_ic [inline]

Generated on Sat Dec 4 13:06:56 2004 for mbo by doxygen 1.3.9.1


mbo: Member List

mbo::RefCntRep< _Ty, _THREAD_MODEL > Member List

This is the complete list of members for mbo::RefCntRep< _Ty, _THREAD_MODEL >, including all inherited members.

AddRef() | mbo::RefCntRep< _Ty, _THREAD_MODEL > | [inline]
Alloc(_Ty *p) | mbo::RefCntRep< _Ty, _THREAD_MODEL > | [inline, static]
Dealloc(Rep *&pRep) | mbo::RefCntRep< _Ty, _THREAD_MODEL > | [inline, static]
pData | mbo::RefCntRep< _Ty, _THREAD_MODEL > |
refCnt | mbo::RefCntRep< _Ty, _THREAD_MODEL > | [mutable]
RefCntRep(_Ty *p=0) | mbo::RefCntRep< _Ty, _THREAD_MODEL > | [inline]
Release() | mbo::RefCntRep< _Ty, _THREAD_MODEL > | [inline]
Rep typedef | mbo::RefCntRep< _Ty, _THREAD_MODEL > |

Generated on Sat Dec 4 13:06:57 2004 for mbo by doxygen 1.3.9.1


mbo: TDynamicArray.h Source File

TDynamicArray.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2004 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      TDynamicArray.h
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  * - reallocator.h
00046  */
00056 /* ------------------------------------------------------------------------ */
00057
00058 #ifndef _TDYNAMICARRAY_H_
00059 #define _TDYNAMICARRAY_H_
00060
00061 #include "Mbo.h"
00062
00063 #include "reallocator.h"
00064
00065 #if defined(_MSC_VER) && _MSC_VER >= 1300
00066 # pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
00067 #endif
00068
00069 namespace mbo
00070 {
00071
00082 #ifndef MBO_TDA_VERIFY
00083 # define MBO_TDA_VERIFY 1
00084 #endif
00085
00094 #ifndef MBO_TDA_STL_ITERATOR
00095 # define MBO_TDA_STL_ITERATOR 1
00096 #endif
00097
00103 #if MBO_TDA_VERIFY
00104 # define mbo_tda_throw_if_not(exception, condition)  mbo_throw_if_not(exception, condition)
00105 #else
00106 # define mbo_tda_throw_if_not(exception, condition)
00107 #endif
00108
00109 /* \def __DEPRECATED
00110  * Postfix increment and decrement are marked as deprecated. However they are
00111  * used by the microsoft STL so we do not expose this fact to the compiler.
00112  */
00113 #ifndef __DEPRECATED
00114 # if !MBO_TDA_STL_ITERATOR && !defined(DOXYGEN) && _MSC_VER >= 1300
00115 #  define __DEPRECATED __declspec(deprecated)
00116 # else
00117 #  define __DEPRECATED
00118 # endif
00119 #endif
00120
00144 template< class  __ValueType
00145         , class  __Allocator                = mem_reallocator<__ValueType>
00146 # if defined(_MSC_VER) && _MSC_VER < 1300
00147         , size_t  __MinSize                 = 8
00148         , size_t  __Append                  = 8
00149 #else
00150         , __Allocator::size_type __MinSize  = 8
00151         , __Allocator::size_type __Append   = 8
00152 # endif
00153         >
00154 class TDynamicArray
00155 {
00156 public:
00157
00158     typedef TDynamicArray<__ValueType, __Allocator, __MinSize, __Append>  _MyType;
00159     typedef __Allocator                           allocator;
00160     typedef __Allocator::size_type                size_type;
00161     typedef __Allocator::value_type               value_type;
00162     typedef __Allocator::reference                reference;
00163     typedef __Allocator::const_reference          const_reference;
00164     typedef __Allocator::pointer                  pointer;
00165     typedef __Allocator::const_pointer            const_pointer;
00166     typedef __Allocator::difference_type          difference_type;
00170     class const_iterator
00171 #if MBO_TDA_STL_ITERATOR
00172 # if !defined(_MSC_VER) || _MSC_VER >= 1300 || defined(_STLPORT_VERSION)
00173         : public std::iterator<std::random_access_iterator_tag, value_type, difference_type, const_pointer, const_reference>
00174 # else
00175         : public std::_Ranit<value_type, difference_type>
00176 # endif
00177 #endif
00178     {
00179     public:
00180
00184         inline const_iterator(const _MyType & array, size_type nPos = 0)
00185             : m_array(array), m_nPos(nPos)
00186         {
00187         }
00188
00191         inline const_reference operator * () const
00192         {
00193             return m_array[m_nPos];
00194         }
00195
00198         inline const_pointer operator -> () const
00199         {
00200             return &(operator*());
00201         }
00202
00206         inline const_iterator & operator ++ ()
00207         {
00208             ++m_nPos;
00209             return *this;
00210         }
00211
00216         inline __DEPRECATED const_iterator operator ++ (int)
00217         {
00218             /* postfix operator return an unchanged copy prior to the operaration */
00219             return const_iterator(m_array, m_nPos++);
00220         }
00221
00225         inline const_iterator & operator -- ()
00226         {
00227             --m_nPos;
00228             return *this;
00229         }
00230
00235         inline __DEPRECATED const_iterator operator -- (int)
00236         {
00237             /* postfix operator return an unchanged copy prior to the operaration */
00238             return const_iterator(m_array, m_nPos--);
00239         }
00240
00246         inline bool operator == (const const_iterator &rhs) const __THROWS(std::logic_error)
00247         {
00248             mbo_tda_throw_if_not(std::logic_error, &m_array == &rhs.m_array);
00249             return m_nPos == rhs.m_nPos;
00250         }
00251
00257         inline bool operator != (const const_iterator &rhs) const __THROWS(std::logic_error)
00258         {
00259             return !operator == (rhs);
00260         }
00261
00266         inline const_iterator & operator = (const const_iterator & rhs)
00267         {
00268             new (this) const_iterator(rhs.m_array, rhs.m_nPos);
00269             return *this;
00270         }
00271
00276         inline const_reference operator [] (size_type nPos) const __THROWS(std::out_of_range)
00277         {
00278             return m_array[nPos];
00279         }
00280
00286         inline difference_type operator - (const const_iterator & rhs) const __THROWS(std::logic_error)
00287         {
00288             mbo_tda_throw_if_not(std::logic_error, &m_array == &rhs.m_array);
00289             return m_nPos - rhs.m_nPos;
00290         }
00291
00297         inline const_iterator & operator -= (difference_type diff) __THROWS(std::logic_error)
00298         {
00299 #if defined(_MSC_VER) && _MSC_VER >= 1300
00300 # pragma warning(disable: 4018) // '>=' : signed/unsigned mismatch
00301 #endif
00302             mbo_tda_throw_if_not(std::logic_error, m_nPos >= diff);
00303             m_nPos -= diff;
00304 #if defined(_MSC_VER) && _MSC_VER >= 1300
00305 # pragma warning(disable: 4018) // '>=' : signed/unsigned mismatch
00306 #endif
00307             return *this;
00308         }
00309
00315         inline const_iterator & operator += (difference_type diff) __THROWS(std::logic_error)
00316         {
00317 #if defined(_MSC_VER) && _MSC_VER >= 1300
00318 # pragma warning(disable: 4018) // '>=' : signed/unsigned mismatch
00319 #endif
00320             mbo_tda_throw_if_not(std::logic_error, m_nPos + diff >= m_nPos && m_nPos + diff >= diff && m_nPos + diff <= m_array.size());
00321             m_nPos += diff;
00322 #if defined(_MSC_VER) && _MSC_VER >= 1300
00323 # pragma warning(default: 4018)
00324 #endif
00325             return *this;
00326         }
00327
00333         inline const_iterator operator - (difference_type diff) const __THROWS(std::logic_error)
00334         {
00335 #if defined(_MSC_VER) && _MSC_VER >= 1300
00336 # pragma warning(disable: 4018) // '>=' : signed/unsigned mismatch
00337 #endif
00338             mbo_tda_throw_if_not(std::logic_error, m_nPos >= diff);
00339             return const_iterator(m_array, m_nPos - diff);
00340 #if defined(_MSC_VER) && _MSC_VER >= 1300
00341 # pragma warning(disable: 4018) // '>=' : signed/unsigned mismatch
00342 #endif
00343         }
00344
00350         inline const_iterator operator + (difference_type diff) const __THROWS(std::logic_error)
00351         {
00352 #if defined(_MSC_VER) && _MSC_VER >= 1300
00353 # pragma warning(disable: 4018) // '>=' : signed/unsigned mismatch
00354 #endif
00355             mbo_tda_throw_if_not(std::logic_error, m_nPos + diff >= m_nPos && m_nPos + diff >= diff && m_nPos + diff <= m_array.size());
00356             return const_iterator(m_array, m_nPos + diff);
00357 #if defined(_MSC_VER) && _MSC_VER >= 1300
00358 # pragma warning(default: 4018)
00359 #endif
00360         }
00361
00367         inline bool operator < (const const_iterator & rhs) const __THROWS(std::logic_error)
00368         {
00369             mbo_tda_throw_if_not(std::logic_error, &m_array == &rhs.m_array);
00370             return m_nPos < rhs.m_nPos;
00371         }
00372
00378         inline bool operator > (const const_iterator & rhs) const __THROWS(std::logic_error)
00379         {
00380             mbo_tda_throw_if_not(std::logic_error, &m_array == &rhs.m_array);
00381             return m_nPos > rhs.m_nPos;
00382         }
00383
00389         inline bool operator <= (const const_iterator & rhs) const __THROWS(std::logic_error)
00390         {
00391             mbo_tda_throw_if_not(std::logic_error, &m_array == &rhs.m_array);
00392             return m_nPos <= rhs.m_nPos;
00393         }
00394
00400         inline bool operator >= (const const_iterator & rhs) const __THROWS(std::logic_error)
00401         {
00402             mbo_tda_throw_if_not(std::logic_error, &m_array == &rhsrhs.m_array);
00403             return m_nPos >= rhs.m_nPos;
00404         }
00405
00406     protected:
00407         const _MyType &   m_array;
00408         size_type         m_nPos;
00409     };
00410
00413     class iterator
00414 #if MBO_TDA_STL_ITERATOR
00415 # if !defined(_MSC_VER) || _MSC_VER >= 1300 || defined(_STLPORT_VERSION)
00416         : public std::iterator<std::random_access_iterator_tag, value_type, difference_type, pointer, reference>
00417 # else
00418         : public std::_Ranit<value_type, difference_type>
00419 # endif
00420 #endif
00421     {
00422     public:
00423
00427         inline iterator(_MyType & array, size_type nPos = 0)
00428             : m_array(array), m_nPos(nPos)
00429         {
00430         }
00431
00434         inline const_reference operator * () const
00435         {
00436             return m_array[m_nPos];
00437         }
00438
00441         inline reference operator * ()
00442         {
00443             return m_array[m_nPos];
00444         }
00445
00448         inline const_pointer operator -> () const
00449         {
00450             return &(operator*());
00451         }
00452
00455         inline pointer operator -> ()
00456         {
00457             return &(operator*());
00458         }
00459
00463         inline iterator & operator ++ ()
00464         {
00465             ++m_nPos;
00466             return *this;
00467         }
00468
00473         inline __DEPRECATED iterator operator ++ (int)
00474         {
00475             /* postfix operator return an unchanged copy prior to the operaration */
00476             return iterator(m_array, m_nPos++);
00477         }
00478
00482         inline iterator & operator -- ()
00483         {
00484             --m_nPos;
00485             return *this;
00486         }
00487
00492         inline __DEPRECATED iterator operator -- (int)
00493         {
00494             /* postfix operator return an unchanged copy prior to the operaration */
00495             return iterator(m_array, m_nPos--);
00496         }
00497
00503         inline bool operator == (const iterator &rhs) const
00504         {
00505             mbo_tda_throw_if_not(std::logic_error, &m_array == &rhs.m_array);
00506             return m_nPos == rhs.m_nPos;
00507         }
00508
00514         inline bool operator != (const iterator &rhs) const __THROWS(std::logic_error)
00515         {
00516             return !operator == (rhs);
00517         }
00518
00523         inline iterator & operator = (const iterator & rhs)
00524         {
00525             new (this) iterator(rhs.m_array, rhs.m_nPos);
00526             return *this;
00527         }
00528
00533         inline reference operator [] (size_type nPos) __THROWS(std::out_of_range)
00534         {
00535             return m_array[nPos];
00536         }
00537
00542         inline const_reference operator [] (size_type nPos) const __THROWS(std::out_of_range)
00543         {
00544             return m_array[nPos];
00545         }
00546
00552         inline difference_type operator - (const iterator & rhs) const __THROWS(std::logic_error)
00553         {
00554             mbo_tda_throw_if_not(std::logic_error, &m_array == &rhs.m_array);
00555             return m_nPos - rhs.m_nPos;
00556         }
00557
00563         inline iterator & operator -= (difference_type diff) __THROWS(std::logic_error)
00564         {
00565 #if defined(_MSC_VER) && _MSC_VER >= 1300
00566 # pragma warning(disable: 4018) // '>=' : signed/unsigned mismatch
00567 #endif
00568             mbo_tda_throw_if_not(std::logic_error, m_nPos >= diff);
00569             m_nPos -= diff;
00570 #if defined(_MSC_VER) && _MSC_VER >= 1300
00571 # pragma warning(disable: 4018) // '>=' : signed/unsigned mismatch
00572 #endif
00573             return *this;
00574         }
00575
00581         inline iterator & operator += (difference_type diff) __THROWS(std::logic_error)
00582         {
00583 #if defined(_MSC_VER) && _MSC_VER >= 1300
00584 # pragma warning(disable: 4018) // '>=' : signed/unsigned mismatch
00585 #endif
00586             mbo_tda_throw_if_not(std::logic_error, m_nPos + diff >= m_nPos && m_nPos + diff >= diff && m_nPos + diff <= m_array.size());
00587             m_nPos += diff;
00588 #if defined(_MSC_VER) && _MSC_VER >= 1300
00589 # pragma warning(default: 4018)
00590 #endif
00591             return *this;
00592         }
00593
00599         inline iterator operator - (difference_type diff) const __THROWS(std::logic_error)
00600         {
00601 #if defined(_MSC_VER) && _MSC_VER >= 1300
00602 # pragma warning(disable: 4018) // '>=' : signed/unsigned mismatch
00603 #endif
00604             mbo_tda_throw_if_not(std::logic_error, m_nPos >= diff);
00605             return iterator(m_array, m_nPos - diff);
00606 #if defined(_MSC_VER) && _MSC_VER >= 1300
00607 # pragma warning(default: 4018)
00608 #endif
00609         }
00610
00616         inline iterator operator + (difference_type diff) const __THROWS(std::logic_error)
00617         {
00618 #if defined(_MSC_VER) && _MSC_VER >= 1300
00619 # pragma warning(disable: 4018) // '>=' : signed/unsigned mismatch
00620 #endif
00621             mbo_tda_throw_if_not(std::logic_error, m_nPos + diff >= m_nPos && m_nPos + diff >= diff && m_nPos + diff <= m_array.size());
00622             return iterator(m_array, m_nPos + diff);
00623 #if defined(_MSC_VER) && _MSC_VER >= 1300
00624 # pragma warning(default: 4018)
00625 #endif
00626         }
00627
00633         inline bool operator < (const iterator & rhs) const __THROWS(std::logic_error)
00634         {
00635             mbo_tda_throw_if_not(std::logic_error, &m_array == &rhs.m_array);
00636             return m_nPos < rhs.m_nPos;
00637         }
00638
00644         inline bool operator > (const iterator & rhs) const __THROWS(std::logic_error)
00645         {
00646             mbo_tda_throw_if_not(std::logic_error, &m_array == &rhs.m_array);
00647             return m_nPos > rhs.m_nPos;
00648         }
00649
00655         inline bool operator <= (const iterator & rhs) const __THROWS(std::logic_error)
00656         {
00657             mbo_tda_throw_if_not(std::logic_error, &m_array == &rhs.m_array);
00658             return m_nPos <= rhs.m_nPos;
00659         }
00660
00666         inline bool operator >= (const iterator & rhs) const __THROWS(std::logic_error)
00667         {
00668             mbo_tda_throw_if_not(std::logic_error, &m_array == &rhs.m_array);
00669             return m_nPos >= rhs.m_nPos;
00670         }
00671
00672     protected:
00673         _MyType &         m_array;
00674         size_type         m_nPos;
00675     };
00676
00677 #if MBO_TDA_STL_ITERATOR
00678
00681 # if !defined(_MSC_VER) || _MSC_VER >= 1300
00682     typedef std::reverse_iterator<iterator> reverse_iterator;
00683 # else
00684     typedef std::reverse_iterator<iterator, value_type, reference, pointer, difference_type> reverse_iterator;
00685 # endif
00686
00687
00691 # if !defined(_MSC_VER) || _MSC_VER >= 1300
00692     typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
00693 # else
00694     typedef std::reverse_iterator<const_iterator, value_type, const_reference, const_pointer, difference_type> const_reverse_iterator;
00695 # endif
00696 #endif
00697
00708     explicit TDynamicArray(
00709             size_type nMinSize = __MinSize,
00710             size_type nAppend  = __Append,
00711             size_type nMaxSize = 0
00712         ) __THROWS(std::bad_alloc)
00713         : m_alloc()
00714         , m_nSize(0)
00715         , m_nCapacity(nMinSize)
00716         , m_nAppend(  nAppend)
00717         , m_nMaxSize( nMaxSize ? nMaxSize : m_alloc.max_size())
00718         , m_acValues(0L)
00719     {
00720         if (m_nCapacity)
00721         {
00722             reserve(m_nCapacity);
00723         }
00724         mbo_tda_throw_if_not(std::bad_alloc, !m_nCapacity || m_acValues);
00725     }
00726
00732     TDynamicArray(const TDynamicArray & oth) __THROWS(std::bad_alloc)
00733         : m_alloc(oth.m_alloc)
00734         , m_nSize(0)
00735         , m_nCapacity(0)
00736         , m_nAppend(  oth.append())
00737         , m_nMaxSize( oth.max_size())
00738         , m_acValues(0L)
00739     {
00740         assign(oth.begin(), oth.end());
00741     }
00742
00748     TDynamicArray & operator = (const TDynamicArray & oth) __THROWS(std::bad_alloc)
00749     {
00750         assign(oth.begin(), oth.end());
00751         return *this;
00752     }
00753
00758     virtual ~TDynamicArray() __THROWS(std::logic_error)
00759     {
00760         clear();
00761         mbo_tda_throw_if_not(std::logic_error, !m_acValues);
00762     }
00763
00766     inline size_type size() const
00767     {
00768         return m_nSize;
00769     }
00770
00773     inline bool empty() const
00774     {
00775         return size() == 0;
00776     }
00777
00780     inline size_type capacity() const
00781     {
00782         return m_nCapacity;
00783     }
00784
00787     size_type max_size() const
00788     {
00789         return m_nMaxSize;
00790     }
00791
00794     inline size_type append() const
00795     {
00796         return m_nAppend;
00797     }
00798
00803     inline const_reference operator [] (_IN size_type index) const __THROWS(std::out_of_range)
00804     {
00805         mbo_tda_throw_if_not(std::out_of_range, index < m_nSize);
00806         return m_acValues[index];
00807     }
00808
00813     inline reference operator [] (_IN size_type index) __THROWS(std::out_of_range)
00814     {
00815         mbo_tda_throw_if_not(std::out_of_range, index < m_nSize);
00816         return m_acValues[index];
00817     }
00818
00823     inline const_reference at(_IN size_type index) const __THROWS(std::out_of_range)
00824     {
00825         return operator [] (index);
00826     }
00827
00832     inline reference at(_IN size_type index) __THROWS(std::out_of_range)
00833     {
00834         return operator [] (index);
00835     }
00836
00840     inline const_reference back() const __THROWS(std::out_of_range)
00841     {
00842         mbo_tda_throw_if_not(std::out_of_range, m_nSize > 0);
00843         return m_acValues[m_nSize-1];
00844     }
00845
00849     inline reference back() __THROWS(std::out_of_range)
00850     {
00851         mbo_tda_throw_if_not(std::out_of_range, m_nSize > 0);
00852         return m_acValues[m_nSize-1];
00853     }
00854
00858     inline const_reference front() const __THROWS(std::out_of_range)
00859     {
00860         mbo_tda_throw_if_not(std::out_of_range, m_nSize > 0);
00861         return m_acValues[0];
00862     }
00863
00867     inline reference front() __THROWS(std::out_of_range)
00868     {
00869         mbo_tda_throw_if_not(std::out_of_range, m_nSize > 0);
00870         return m_acValues[0];
00871     }
00872
00879     inline void push_front(_IN const_reference value) __THROW2(std::bad_alloc, std::overflow_error)
00880     {
00881         check_resize();
00882
00883         if (m_nSize)
00884         {
00885             m_alloc.move(m_alloc.address(m_acValues[1]), m_alloc.address(m_acValues[0]), m_nSize);
00886         }
00887
00888         ++m_nSize;
00889         insert_at(0, value);
00890     }
00891
00895     inline void pop_front() __THROWS(std::out_of_range)
00896     {
00897         mbo_tda_throw_if_not(std::out_of_range, m_nSize > 0);
00898
00899         delete_at(0);
00900
00901         if (--m_nSize)
00902         {
00903             m_alloc.move(m_alloc.address(m_acValues[0]), m_alloc.address(m_acValues[1]), m_nSize);
00904         }
00905     }
00906
00913     inline void push_back(_IN const_reference value) __THROW2(std::bad_alloc, std::overflow_error)
00914     {
00915         check_resize();
00916
00917         insert_at(m_nSize++, value);
00918     }
00919
00923     inline void pop_back() __THROWS(std::out_of_range)
00924     {
00925         mbo_tda_throw_if_not(std::out_of_range, m_nSize > 0);
00926         delete_at(m_nSize-1);
00927         --m_nSize;
00928     }
00929
00932     inline const_iterator begin() const
00933     {
00934         return const_iterator(*this, 0);
00935     }
00936
00939     inline iterator begin()
00940     {
00941         return iterator(*this, 0);
00942     }
00943
00946     inline const_iterator end() const
00947     {
00948         return const_iterator(*this, m_nSize);
00949     }
00950
00953     inline iterator end()
00954     {
00955         return iterator(*this, m_nSize);
00956     }
00957
00958 #if MBO_TDA_STL_ITERATOR
00959
00963     inline const_reverse_iterator rbegin() const
00964     {
00965         return const_reverse_iterator(end());
00966     }
00967
00971     inline reverse_iterator rbegin()
00972     {
00973         return reverse_iterator(end());
00974     }
00975
00979     inline const_reverse_iterator rend() const
00980     {
00981         return const_reverse_iterator(begin());
00982     }
00983
00987     inline reverse_iterator rend()
00988     {
00989         return reverse_iterator(begin());
00990     }
00991 #endif
00992
00997     void assign(size_type count, const_reference val)
00998     {
00999         clear();
01000         if (count > capacity())
01001         {
01002             reserve(count);
01003         }
01004         while(count--)
01005         {
01006             push_back(val);
01007         }
01008     }
01009
01014     template<class InputIterator>
01015     void assign(InputIterator first, InputIterator end)
01016     {
01017         clear();
01018         if (static_cast<size_type>(end - first) > capacity())
01019         {
01020             reserve(end - first);
01021         }
01022         while(first != end)
01023         {
01024             push_back(*first);
01025             ++first;
01026         }
01027     }
01028
01034     void erase(size_t where)
01035     {
01036         mbo_tda_throw_if_not(std::logic_error, where < m_nSize);
01037         if (where == 0)
01038         {
01039             pop_front();
01040         }
01041         else if (where + 1 == m_nSize)
01042         {
01043             pop_back();
01044         }
01045         else
01046         {
01047             delete_at(where);
01048
01049             if (--m_nSize)
01050             {
01051                 m_alloc.move(m_alloc.address(m_acValues[where]), m_alloc.address(m_acValues[where+1]), m_nSize - where);
01052             }
01053         }
01054     }
01055
01061     iterator erase(iterator where)
01062     {
01063         erase(where - begin());
01064         return where;
01065     }
01066
01072     iterator erase(iterator first, iterator end)
01073     {
01074         size_type nLength = end - first;
01075
01076         if (nLength == 1)
01077         {
01078             return erase(first);
01079         }
01080         else if (nLength)
01081         {
01082             size_type nStart = first - begin();
01083             size_type nPos   = nStart + nLength;
01084
01085             while(nPos > nStart)
01086             {
01087                 delete_at(--nPos);
01088             }
01089
01090             m_nSize -= nLength;
01091
01092             if (m_nSize)
01093             {
01094                 m_alloc.move(m_alloc.address(m_acValues[nStart]), m_alloc.address(m_acValues[nStart + nLength]), m_nSize - nStart);
01095             }
01096         }
01097         return first;
01098     }
01099
01105     inline void clear()
01106     {
01107         while(m_nSize)
01108         {
01109             m_alloc.destroy(m_alloc.address(m_acValues[--m_nSize]));
01110         }
01111         if (m_acValues)
01112         {
01113             m_alloc.deallocate(m_acValues, m_nCapacity);
01114             m_acValues = 0L;
01115             m_nCapacity = 0;
01116         }
01117     }
01118
01126     inline reserve(size_type nNewCapacity) __THROW2(std::bad_alloc, std::overflow_error)
01127     {
01128         mbo_tda_throw_if_not(std::overflow_error, nNewCapacity >= m_nSize && nNewCapacity <= max_size());
01129
01130         pointer pNewValues = m_alloc.reallocate(m_acValues, m_nCapacity, nNewCapacity);
01131
01132         mbo_tda_throw_if_not(std::bad_alloc, pNewValues || !nNewCapacity);
01133
01134         m_acValues = pNewValues;
01135         m_nCapacity = nNewCapacity;
01136     }
01137
01147     void resize(size_type nNewSize) __THROW2(std::bad_alloc, std::overflow_error)
01148     {
01149         resize(nNewSize, value_type());
01150     }
01151
01162     void resize(size_type nNewSize, value_type value) __THROW2(std::bad_alloc, std::overflow_error)
01163     {
01164         while(size() < nNewSize)
01165         {
01166             push_back(value);
01167         }
01168         while(size() > nNewSize)
01169         {
01170             pop_back();
01171         }
01172     }
01173
01174 protected:
01175
01182     inline void check_resize() __THROW2(std::bad_alloc, std::overflow_error)
01183     {
01184         if (m_nSize == m_nCapacity)
01185         {
01186             mbo_tda_throw_if_not(std::overflow_error, m_nSize + m_nAppend > m_nSize);
01187
01188             reserve(m_nSize + m_nAppend);
01189         }
01190     }
01191
01199     inline void delete_at(size_type nPos) __THROWS(std::out_of_range)
01200     {
01201         mbo_tda_throw_if_not(std::out_of_range, nPos < m_nSize);
01202         m_alloc.destroy(m_alloc.address(m_acValues[nPos]));
01203     }
01204
01212     inline void insert_at(size_type nPos, _IN const_reference value) __THROWS(std::out_of_range)
01213     {
01214         mbo_tda_throw_if_not(std::out_of_range, nPos < m_nSize);
01215         m_alloc.construct(m_alloc.address(m_acValues[nPos]), value);
01216     }
01217
01218     allocator       m_alloc;
01219     size_type       m_nSize;
01220     size_type       m_nCapacity;
01221     size_type       m_nAppend;
01222     size_type       m_nMaxSize;
01223     pointer         m_acValues;
01224 };
01225
01226 }; // namespace mbo
01227
01228 #if defined(_MSC_VER) && _MSC_VER >= 1300
01229 # pragma warning(default: 4290)
01230 #endif
01231
01232 #endif // _TDYNAMICARRAY_H_
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: TStaticArray.h Source File

TStaticArray.h

Go to the documentation of this file.
00001 /* ------------------------------------------------------------------------ */
00016 /* ------------------------------------------------------------------------ */
00017
00018 #ifndef _TSTATICARRAY_H_
00019 #define _TSTATICARRAY_H_
00020
00021 #if _MSC_VER > 1000
00022 #pragma once
00023 #endif // _MSC_VER > 1000
00024
00025 #include <stdexcept>
00026 #include "Mbo.h"
00027
00028 #define throw_runtime_error_if_not(condition) \
00029     if (!(condition)) { \
00030         throw std::out_of_range(std::string(__FILE__ "(") + mbo::StrFrom<char>(__LINE__ ) +  "): " #condition); \
00031     }
00032
00069 template<typename __ValueType, size_t __MaxSize, bool __AccessBeyondEnd = false>
00070 class TStaticArray
00071 {
00072 public:
00073     typedef TStaticArray<__ValueType, __MaxSize> _MyType;
00074     typedef __ValueType                          _ValueType;
00075     typedef const __ValueType &                  const_reference;
00076     typedef __ValueType &                        reference;
00077     typedef __ValueType *                        pointer;
00081     class const_iterator
00082         : public std::iterator<std::bidirectional_iterator_tag, __ValueType, size_t>
00083     {
00084     public:
00088         inline const_iterator(const _MyType & array, size_t pos = 0)
00089             : m_array(array), m_pos(pos)
00090         {
00091         }
00092
00095         inline const_reference operator * () const
00096         {
00097             return m_array[m_pos];
00098         }
00099
00102         inline const pointer operator -> () const
00103         {
00104             return &(operator*());
00105         }
00106
00110         inline const_iterator & operator ++ ()
00111         {
00112             ++m_pos;
00113             return *this;
00114         }
00115
00119         inline DEPRECATED const_iterator operator ++ (int)
00120         {
00121             /* postfix operator return an unchanged copy prior to the operaration */
00122             return const_iterator(m_array, m_pos++);
00123         }
00124
00128         inline const_iterator & operator -- ()
00129         {
00130             --m_pos;
00131             return *this;
00132         }
00133
00137         inline DEPRECATED const_iterator operator -- (int)
00138         {
00139             /* postfix operator return an unchanged copy prior to the operaration */
00140             return const_iterator(m_array, m_pos--);
00141         }
00142
00147         inline bool operator == (const_iterator &rhs) const
00148         {
00149             return &m_array == &rhs.m_array && m_pos == rhs.m_pos;
00150         }
00151
00156         inline bool operator != (const_iterator &rhs) const
00157         {
00158             return !operator == (rhs);
00159         }
00160
00165         inline const_iterator & operator = (const const_iterator & rhs)
00166         {
00167             new (this) const_iterator(rhs.m_array, rhs.m_pos);
00168             return *this;
00169         }
00170
00171     protected:
00172         const _MyType &   m_array;
00173         size_t         m_pos;
00174     };
00175
00178     class iterator
00179         : public std::iterator<std::bidirectional_iterator_tag, __ValueType, size_t>
00180     {
00181     public:
00185         inline iterator(_MyType & array, size_t pos = 0)
00186             : m_array(array), m_pos(pos)
00187         {
00188         }
00189
00192         inline reference operator * () const
00193         {
00194             return m_array[m_pos];
00195         }
00196
00199         inline reference operator * ()
00200         {
00201             return m_array[m_pos];
00202         }
00203
00206         inline const pointer operator -> () const
00207         {
00208             return &(operator*());
00209         }
00210
00213         inline pointer operator -> ()
00214         {
00215             return &(operator*());
00216         }
00217
00221         inline iterator & operator ++ ()
00222         {
00223             ++m_pos;
00224             return *this;
00225         }
00226
00230         inline DEPRECATED iterator operator ++ (int)
00231         {
00232             /* postfix operator return an unchanged copy prior to the operaration */
00233             return iterator(m_array, m_pos++);
00234         }
00235
00239         inline iterator & operator -- ()
00240         {
00241             --m_pos;
00242             return *this;
00243         }
00244
00248         inline DEPRECATED iterator operator -- (int)
00249         {
00250             /* postfix operator return an unchanged copy prior to the operaration */
00251             return iterator(m_array, m_pos--);
00252         }
00253
00258         inline bool operator == (iterator &rhs) const
00259         {
00260             return &m_array == &rhs.m_array && m_pos == rhs.m_pos;
00261         }
00262
00267         inline bool operator != (iterator &rhs) const
00268         {
00269             return !operator == (rhs);
00270         }
00271
00276         inline iterator & operator = (const iterator & rhs)
00277         {
00278             new (this) iterator(rhs.m_array, rhs.m_pos);
00279             return *this;
00280         }
00281
00282     protected:
00283         _MyType &         m_array;
00284         size_t         m_pos;
00285     };
00286
00289     TStaticArray()
00290         : m_nSize(0)
00291     {
00292     }
00293
00294     /* no virtual member  => no virtual destructor */
00295     /* plus nothing to do => no destructor at all  */
00296     /* this is possible because this is a template */
00297
00300     inline size_t maxSize() const
00301     {
00302         return __MaxSize;
00303     }
00304
00307     inline size_t size() const
00308     {
00309         return m_nSize;
00310     }
00311
00314     inline bool empty() const
00315     {
00316         return size() == 0;
00317     }
00318
00321     inline bool full() const
00322     {
00323         return size() == maxSize();
00324     }
00325
00330     inline const_reference operator[] (_IN size_t index) const throw(std::out_of_range)
00331     {
00332         throw_runtime_error_if_not(index < (__AccessBeyondEnd ? __MaxSize : m_nSize));
00333         return m_acValues[index];
00334     }
00335
00340     inline reference operator[] (_IN size_t index) throw(std::out_of_range)
00341     {
00342         throw_runtime_error_if_not(index < (__AccessBeyondEnd ? __MaxSize : m_nSize));
00343         return m_acValues[index];
00344     }
00345
00349     inline const_reference front() const throw(std::out_of_range)
00350     {
00351         throw_runtime_error_if_not(m_nSize > 0);
00352         return m_acValues[m_nSize-1];
00353     }
00354
00358     inline reference front() throw(std::out_of_range)
00359     {
00360         throw_runtime_error_if_not(m_nSize > 0);
00361         return m_acValues[m_nSize-1];
00362     }
00363
00367     inline const_reference back() const throw(std::out_of_range)
00368     {
00369         throw_runtime_error_if_not(m_nSize > 0);
00370         return m_acValues[0];
00371     }
00372
00376     inline reference back() throw(std::out_of_range)
00377     {
00378         throw_runtime_error_if_not(m_nSize > 0);
00379         return m_acValues[0];
00380     }
00381
00385     inline reference nextElement() throw(std::out_of_range)
00386     {
00387         throw_runtime_error_if_not(m_nSize < __MaxSize);
00388         return m_acValues[m_nSize++];
00389     }
00390
00396     inline bool append(_IN const_reference value)
00397     {
00398         if (m_nSize < __MaxSize)
00399         {
00400             if ((m_acValues[m_nSize] = value).empty())
00401             {
00402                 m_nSize++;
00403                 return true;
00404             }
00405             else
00406             {
00407                 return false;
00408             }
00409         }
00410         else
00411         {
00412             return false;
00413         }
00414     }
00415
00419     inline void clear()
00420     {
00421         for (size_t index = 0; index < __MaxSize; index++)
00422         {
00423             m_acValues[index].clear();
00424         }
00425         m_nSize = 0;
00426     }
00427
00432     inline void reset()
00433     {
00434         if (__AccessBeyondEnd)
00435         {
00436             clear();
00437         }
00438         else
00439         {
00440             m_nSize = 0;
00441         }
00442     }
00443
00446     inline const_iterator begin() const
00447     {
00448         return const_iterator(*this, 0);
00449     }
00450
00453     inline iterator begin()
00454     {
00455         return iterator(*this, 0);
00456     }
00457
00460     inline const_iterator end() const
00461     {
00462         return const_iterator(*this, m_nSize);
00463     }
00464
00467     inline iterator end()
00468     {
00469         return iterator(*this, m_nSize);
00470     }
00471
00472 protected:
00473
00474     size_t          m_nSize;
00475     __ValueType        m_acValues[__MaxSize];
00476 };
00477
00478 #endif // _TSTATICARRAY_H_
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1


mbo: vector2.h Source File

vector2.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Copyright (c) 2001 - 2004 Marcus Boerger.  All rights reserved.
00003 *
00004 * Redistribution and use in source, binary or any other forms,  with
00005 * or without modification requires prior permission by Marcus Boerger
00006 * (http://marcus-boerger.de). When permission is granted the following
00007 * conditions must be met:
00008 *
00009 * 1. Redistributions of source code must retain the above copyright
00010 *    notice, this list of conditions and the following disclaimer.
00011 *    Redistribution in any form requires prior permission.
00012 *
00013 * 2. All advertising materials mentioning features or use of this
00014 *    software must display the following acknowledgment:
00015 *    "This product includes software developed by Marcus Boerger
00016 *    (http://marcus-boerger.de/)."
00017 *
00018 * 3. The name "Marcus Boerger" must not be used to endorse or promote
00019 *    products derived from this software without prior written permission.
00020 *
00021 * 4. Redistributions of any form whatsoever must retain the following
00022 *    acknowledgment:
00023 *    "This product includes software developed by Marcus Boerger
00024 *    (http://marcus-boerger.de/)."
00025 *    Redistribution in any form requires prior permission.
00026 *
00027 * THIS SOFTWARE IS PROVIDED BY MARCUS BOERGER ``AS IS'' AND ANY EXPRESSED
00028 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES
00029 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00030 * IN NO EVENT SHALL ``MARCUS BOERGER'' OR HIS CONTRIBUTORS BE LIABLE FOR
00031 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00033 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00034 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00035 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00036 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037 * POSSIBILITY OF SUCH DAMAGE.
00038 * ========================================================================= */
00039
00040 /* ------------------------------------------------------------------------ */
00041 /* Name:      vector2.h
00042  *
00043  * Requires:
00044  * - Mbo.h
00045  */
00057 /* ------------------------------------------------------------------------ */
00058
00059 #ifndef _VECOTR2_H_
00060 #define _VECOTR2_H_
00061
00062 #include "Mbo.h"
00063
00064 #include <algorithm>
00065 #include <vector>
00066
00067 namespace std
00068 {
00069
00093 template < class _Ty
00094          , class _Alloc    = allocator<_Ty>
00095          >
00096 class vector2 : public vector<_Ty, _Alloc>
00097 {
00098 public:
00099     typedef vector2<_Ty, _Alloc>   _Myt;
00100     typedef vector<_Ty, _Alloc>    _Mybase;
00106     virtual void limit(
00107             _IN size_type   _Limit
00108         )
00109     {
00110         if (size()>_Limit)
00111         {
00112             resize(_Limit);
00113         }
00114     }
00115
00124     pair<size_type,bool> position(
00125             _IN  const _Ty  &_Val
00126         ) const
00127     {
00128         size_type _Index = 0;
00129         for (const_iterator iter = begin(); iter != end(); iter++, _Index++)
00130         {
00131             if (*iter == _Val)
00132                 return pair<size_type,bool>(_Index,true);
00133         }
00134         return pair<size_type,bool>(-1,false);
00135     }
00136
00143     bool contains(
00144             _IN  const _Ty  &_Val
00145         ) const
00146     {
00147         return position(_Val).second;
00148     }
00149
00157     bool contains_no(
00158             _IN  const _Ty  &_Val
00159         ) const
00160     {
00161         return !position(_Val).second;
00162     }
00163
00170     virtual bool add_if_new(
00171             _IN  const _Ty  &_Val
00172         )
00173     {
00174         if (!contains(_Val))
00175         {
00176             push_back(_Val);
00177             return true;
00178         }
00179         return false;
00180     }
00181
00186     operator bool()
00187     {
00188         return size() > 0;
00189     }
00190
00193     void sort()
00194     {
00195         if (size()>1)
00196             std::sort(begin(), end());
00197     }
00198
00204     static _Myt dyn_create(
00205             _IN _Myt::size_type   _Count,
00206             ...
00207         )
00208     {
00209         _Myt       _Vector;
00210         va_list    _Args;
00211
00212         va_start(_Args, _Count);
00213         while(_Count--)
00214         {
00215             _Vector.push_back(va_arg(_Args, const _Ty));
00216         }
00217         va_end(_Args);
00218         return _Vector;
00219     }
00220 };
00221
00237 template < class _Ty_a, class _Alloc_a
00238          , class _Ty_b, class _Alloc_b
00239          >
00240 vector2<_Ty_a, _Alloc_a> & operator += (
00241         _IN vector2<_Ty_a, _Alloc_a> & container,
00242         _IN const vector<_Ty_b, _Alloc_b> & values
00243     )
00244 {
00245     // NO clear
00246     for (vector<_Ty_b, _Alloc_b>::const_iterator it = values.begin(); it != values.end(); ++it) {
00247         container.push_back((_Ty_a)*it);
00248     }
00249     return container;
00250 };
00251
00267 template < class _Ty_a, class _Alloc_a
00268          , class _Ty_b, class _Alloc_b
00269          >
00270 vector2<_Ty_a, _Alloc_a> & operator << (
00271         _IN vector2<_Ty_a, _Alloc_a> & container,
00272         _IN const vector<_Ty_b, _Alloc_b> & values
00273     )
00274 {
00275     container.clear();
00276     container += values;
00277     return container;
00278 };
00279
00280 }; // namespace std
00281
00282 #endif //_VECTOR2_H_
Generated on Sat Dec 4 13:06:55 2004 for mbo by doxygen 1.3.9.1