booster Namespace Reference

Booster library namespace. The library that implements Boost Like API in ABI backward compatible way. More...

## Namespaces

| aio
| This namespace povides and API to asynchronous sockets API, asynchronous timer and event loop handing.
| locale
| This is the main namespace that encloses all localization classes.
| log
| This namespace includes Booster.Log related classes.
| nowide
| This namespace includes implementation of basic STL's / STDLIb's functions such that they accept UTF-8 strings. on Windows. Otherwise it is just an alias of std namespace (i.e. not on Windows)
| stack_trace
| Namespace that holds basic operations for implementing stack trace.
| system
| this namespace includes partial implementation of std::tr1's/boost's system_error, error_code classes

## Classes

class | atomic_counter
| Atomic counter is a class that allows perform counting in thread safe way. More...
class | backtrace
| the class that records the stack trace when it is created, More...
class | exception
| Same as std::exception but records stack trace. More...
class | bad_cast
| Same as std::bad_cast but records stack trace. More...
class | runtime_error
| Same as std::runtime_error but records stack trace. More...
class | range_error
| Same as std::range_error but records stack trace. More...
class | overflow_error
| Same as std::overflow_error but records stack trace. More...
class | underflow_error
| Same as std::underflow_error but records stack trace. More...
class | logic_error
| Same as std::logic_error but records stack trace. More...
class | domain_error
| Same as std::domain_error but records stack trace. More...
class | length_error
| Same as std::length_error but records stack trace. More...
class | invalid_argument
| Same as std::invalid_argument but records stack trace. More...
class | out_of_range
| Same as std::out_of_range but records stack trace. More...
class | bad_weak_ptr
class | callback
struct | callable
class | bad_callback_call
| this exception is thrown in case of calling unassigned/empty function More...
class | callback< Result(Params...)>
| This is Booster's implementation of std::tr1::callback/booster::callback. More...
class | clone_ptr
| a smart pointer similar to std::auto_ptr but it clones (by calling T::clone()) underlying object on copy instead of moving its ownership. More...
class | copy_ptr
| a smart pointer similar to std::auto_ptr but it copies underlying object on pointer copy instead of moving its ownership. More...
class | enable_shared_from_this
| This class is borrowed from boost. More...
class | function
class | bad_function_call
| This exception is thrown in case of an attempt to call to unassigned booster::function. More...
class | function< Result(Params...)>
| This is Booster's implementation of std::tr1::function/booster::function. More...
class | hold_ptr
| a smart pointer similar to std::auto_ptr but it is non-copyable and underlying object has same constness as the pointer itself (not like in ordinary pointer). More...
class | intrusive_ptr
| intrusive_ptr is the class taken as-is from boost. More...
class | shared_ptr
class | weak_ptr
class | noncopyable
| This class makes impossible to copy any class derived from this one. More...
class | regex_error
| Exception that is thrown in case of creation of invalid regex. More...
class | regex
| This is a simple wrapper of PCRE library. More...
class | ptime
| This class represents POSIX time. More...
class | refcounted
| This class is used as base class for reference counted objects that use intrusive_ptr. Deriving from this class allows simple way to manage reference counting for single object. More...
class | sub_match
| This class represents a single captures subexpression. More...
class | match_results
| The object that hold the result of matching a regular expression against the text using regex_match and regex_search functions. More...
class | shared_object
| Class that allows loading dynamic libraries: shared objects and dlls. More...
class | enable_shared_from_this2
class | io_device
| This class is a base class of generic I/O device that can be used in very simple manner with booster::streambuf allowing to create iostreams easily. More...
class | streambuf
| this is an implementation of generic streambuffer More...
class | thread
| the class that allows to start an execution thread More...
class | mutex
| Mutex object. More...
class | recursive_mutex
| Recursive mutex object. More...
class | recursive_shared_mutex
| Recursuve Shared mutex or a.k.a. Read-Write Lock that can be recursively locked by readers. More...
class | shared_mutex
| Shared mutex or a.k.a. Read-Write Lock. More...
class | unique_lock
| a Unique lock guard. More...
class | condition_variable
| This is conditional variable object. More...
class | thread_specific_ptr
| Thread specific pointer. More...
class | shared_lock
| a Shared lock guard. More...

## Typedefs

typedef unsigned char | uint8_t
typedef signed char | int8_t
typedef unsigned short | uint16_t
typedef short | int16_t
typedef unsigned int | uint32_t
typedef int | int32_t
typedef unsigned long long | uint64_t
typedef long long | int64_t
typedef sub_match< char const * > | csub_match
typedef sub_match < std::string::const_iterator > | ssub_match
typedef match_results< char const * > | cmatch
typedef match_results < std::string::const_iterator > | smatch

## Functions

void CPPCMS_API | intrusive_ptr_add_ref (cppcms::application *p)
void CPPCMS_API | intrusive_ptr_release (cppcms::application *p)
template<typename E >
details::trace_manip | trace (E const &e)
| manipulator that print stack trace for the exception e if it is derived from backtrace. More...
BOOSTER_API std::tm | local_time (time_t pt)
BOOSTER_API std::tm | universal_time (time_t pt)
BOOSTER_API time_t | normalize_local_time (std::tm &t)
BOOSTER_API time_t | normalize_universal_time (std::tm &t)
BOOSTER_API time_t | make_local_time (std::tm const &t)
BOOSTER_API time_t | make_universal_time (std::tm const &t)
template<class T , class U >
bool | operator== (intrusive_ptr< T > const &a, intrusive_ptr< U > const &b)
template<class T , class U >
bool | operator!= (intrusive_ptr< T > const &a, intrusive_ptr< U > const &b)
template<class T >
bool | operator== (intrusive_ptr< T > const &a, T *b)
template<class T >
bool | operator!= (intrusive_ptr< T > const &a, T *b)
template<class T >
bool | operator== (T *a, intrusive_ptr< T > const &b)
template<class T >
bool | operator!= (T *a, intrusive_ptr< T > const &b)
template<class T >
bool | operator< (intrusive_ptr< T > const &a, intrusive_ptr< T > const &b)
template<class T >
void | swap (intrusive_ptr< T > &lhs, intrusive_ptr< T > &rhs)
template<class T >
T * | get_pointer (intrusive_ptr< T > const &p)
template<class T , class U >
intrusive_ptr< T > | static_pointer_cast (intrusive_ptr< U > const &p)
template<class T , class U >
intrusive_ptr< T > | const_pointer_cast (intrusive_ptr< U > const &p)
template<class T , class U >
intrusive_ptr< T > | dynamic_pointer_cast (intrusive_ptr< U > const &p)
template<class E , class T , class Y >
std::basic_ostream< E, T > & | operator<< (std::basic_ostream< E, T > &os, intrusive_ptr< Y > const &p)
BOOSTER_API std::ostream & | operator<< (std::ostream &, ptime const &)
BOOSTER_API std::istream & | operator>> (std::istream &, ptime &)
void | intrusive_ptr_add_ref (refcounted *ptr)
void | intrusive_ptr_release (refcounted *ptr)
template<typename Regex >
bool | regex_match (char const *begin, char const *end, cmatch &m, Regex const &r, int flags=0)
template<typename Regex >
bool | regex_match (std::string const &s, smatch &m, Regex const &r, int flags=0)
template<typename Regex >
bool | regex_match (char const *s, cmatch &m, Regex const &r, int flags=0)
template<typename Regex >
bool | regex_search (char const *begin, char const *end, cmatch &m, Regex const &r, int flags=0)
template<typename Regex >
bool | regex_search (std::string const &s, smatch &m, Regex const &r, int flags=0)
template<typename Regex >
bool | regex_search (char const *s, cmatch &m, Regex const &r, int flags=0)
template<typename Regex >
bool | regex_match (char const *begin, char const *end, Regex const &r, int flags=0)
template<typename Regex >
bool | regex_match (std::string const &s, Regex const &r, int flags=0)
template<typename Regex >
bool | regex_match (char const *s, Regex const &r, int flags=0)
template<typename Regex >
bool | regex_search (char const *begin, char const *end, Regex const &r, int flags=0)
template<typename Regex >
bool | regex_search (std::string const &s, Regex const &r, int flags=0)
template<typename Regex >
bool | regex_search (char const *s, Regex const &r, int flags=0)
template<typename Iterator >
bool | operator== (sub_match< Iterator > const &l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator!= (sub_match< Iterator > const &l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator< (sub_match< Iterator > const &l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator> (sub_match< Iterator > const &l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator<= (sub_match< Iterator > const &l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator>= (sub_match< Iterator > const &l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator== (typename sub_match< Iterator >::string_type const &l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator!= (typename sub_match< Iterator >::string_type const &l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator<= (typename sub_match< Iterator >::string_type const &l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator>= (typename sub_match< Iterator >::string_type const &l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator< (typename sub_match< Iterator >::string_type const &l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator> (typename sub_match< Iterator >::string_type const &l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator== (sub_match< Iterator > const &l, typename sub_match< Iterator >::string_type const &r)
template<typename Iterator >
bool | operator!= (sub_match< Iterator > const &l, typename sub_match< Iterator >::string_type const &r)
template<typename Iterator >
bool | operator<= (sub_match< Iterator > const &l, typename sub_match< Iterator >::string_type const &r)
template<typename Iterator >
bool | operator>= (sub_match< Iterator > const &l, typename sub_match< Iterator >::string_type const &r)
template<typename Iterator >
bool | operator< (sub_match< Iterator > const &l, typename sub_match< Iterator >::string_type const &r)
template<typename Iterator >
bool | operator> (sub_match< Iterator > const &l, typename sub_match< Iterator >::string_type const &r)
template<typename Iterator >
bool | operator== (typename std::iterator_traits< Iterator >::value_type const *l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator!= (typename std::iterator_traits< Iterator >::value_type const *l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator<= (typename std::iterator_traits< Iterator >::value_type const *l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator>= (typename std::iterator_traits< Iterator >::value_type const *l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator< (typename std::iterator_traits< Iterator >::value_type const *l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator> (typename std::iterator_traits< Iterator >::value_type const *l, sub_match< Iterator > const &r)
template<typename Iterator >
bool | operator== (sub_match< Iterator > const &l, typename std::iterator_traits< Iterator >::value_type const *r)
template<typename Iterator >
bool | operator!= (sub_match< Iterator > const &l, typename std::iterator_traits< Iterator >::value_type const *r)
template<typename Iterator >
bool | operator<= (sub_match< Iterator > const &l, typename std::iterator_traits< Iterator >::value_type const *r)
template<typename Iterator >
bool | operator>= (sub_match< Iterator > const &l, typename std::iterator_traits< Iterator >::value_type const *r)
template<typename Iterator >
bool | operator< (sub_match< Iterator > const &l, typename std::iterator_traits< Iterator >::value_type const *r)
template<typename Iterator >
bool | operator> (sub_match< Iterator > const &l, typename std::iterator_traits< Iterator >::value_type const *r)
template<typename Iterator >
sub_match< Iterator >::string_type | operator+ (sub_match< Iterator > const &l, sub_match< Iterator > const &r)
template<typename Iterator >
sub_match< Iterator >::string_type | operator+ (sub_match< Iterator > const &l, typename sub_match< Iterator >::string_type const &r)
template<typename Iterator >
sub_match< Iterator >::string_type | operator+ (typename sub_match< Iterator >::string_type const &l, sub_match< Iterator > const &r)
template<typename Iterator >
sub_match< Iterator >::string_type | operator+ (sub_match< Iterator > const &l, typename sub_match< Iterator >::value_type const *r)
template<typename Iterator >
sub_match< Iterator >::string_type | operator+ (typename sub_match< Iterator >::value_type const *l, sub_match< Iterator > const &r)
template<class T , class U >
bool | operator== (shared_ptr< T > const &a, shared_ptr< U > const &b)
template<class T , class U >
bool | operator!= (shared_ptr< T > const &a, shared_ptr< U > const &b)
template<class T , class U >
bool | operator< (shared_ptr< T > const &a, shared_ptr< U > const &b)
template<class T >
void | swap (shared_ptr< T > &a, shared_ptr< T > &b)
template<class T , class U >
shared_ptr< T > | static_pointer_cast (shared_ptr< U > const &r)
template<class T , class U >
shared_ptr< T > | const_pointer_cast (shared_ptr< U > const &r)
template<class T , class U >
shared_ptr< T > | dynamic_pointer_cast (shared_ptr< U > const &r)
template<class T , class U >
shared_ptr< T > | shared_static_cast (shared_ptr< U > const &r)
template<class T , class U >
shared_ptr< T > | shared_dynamic_cast (shared_ptr< U > const &r)
template<class T , class U >
shared_ptr< T > | shared_polymorphic_cast (shared_ptr< U > const &r)
template<class T , class U >
shared_ptr< T > | shared_polymorphic_downcast (shared_ptr< U > const &r)
template<class T >
T * | get_pointer (shared_ptr< T > const &p)
template<class Y >
std::ostream & | operator<< (std::ostream &os, shared_ptr< Y > const &p)
template<class D , class T >
D * | get_deleter (shared_ptr< T > const &p)
void * | booster_thread_func (void *)
template<class T , class U >
bool | operator< (weak_ptr< T > const &a, weak_ptr< U > const &b)
template<class T >
void | swap (weak_ptr< T > &a, weak_ptr< T > &b)

## Detailed Description

Booster library namespace. The library that implements Boost Like API in ABI backward compatible way.

## Function Documentation

void booster::intrusive_ptr_add_ref | ( | refcounted * | p | ) |

inline

Increase reference count

void booster::intrusive_ptr_release | ( | refcounted * | p | ) |

inline

Decrease reference count, if it goes to 0, destroy the object

BOOSTER_API std::tm booster::local_time | ( | time_t | pt | ) |

Convert POSIX time to local time. Effectivly works as C localtime

BOOSTER_API time_t booster::make_local_time | ( | std::tm const & | t | ) |

Converts local time std::tm t to POSIX time, effectivly same as mktime but does not modify its parameter

BOOSTER_API time_t booster::make_universal_time | ( | std::tm const & | t | ) |

Converts GMT time std::tm t to POSIX time , effectivly same as timegm or mktime in case of GMT time zone, but does not modify its parameter

BOOSTER_API time_t booster::normalize_local_time | ( | std::tm & | t | ) |

Converts local time std::tm t to POSIX time normalizing it, effectivly same as mktime

BOOSTER_API time_t booster::normalize_universal_time | ( | std::tm & | t | ) |

Converts GMT time std::tm t to POSIX time normalizing it, effectivly same as timegm or mktime in case of GMT time zone.

BOOSTER_API std::ostream& booster::operator<< | ( | std::ostream & | ,
|  | ptime const & |
| ) |  |

Write ptime to stream. It is written as double, so it would give expected result when working with booster::locale::as::date_time formatter

BOOSTER_API std::istream& booster::operator>> | ( | std::istream & | ,
|  | ptime & |
| ) |  |

Read ptime from stream. It is read as double, so it would give expected result when working with booster::locale::as::date_time formatter

template<typename Regex >

bool booster::regex_match | ( | char const * | begin,
|  | char const * | end,
|  | cmatch & | m,
|  | Regex const & | r,
|  | int | flags = `0`
| ) |  |

Match an expression r against text in range [begin, end ), return true if found and store matched patters in m

template<typename Regex >

bool booster::regex_match | ( | std::string const & | s,
|  | smatch & | m,
|  | Regex const & | r,
|  | int | flags = `0`
| ) |  |

Match an expression r against text s, return true if found and store matched patters in m

template<typename Regex >

bool booster::regex_match | ( | char const * | s,
|  | cmatch & | m,
|  | Regex const & | r,
|  | int | flags = `0`
| ) |  |

Match an expression r against text s, return true if found and store matched patters in m

template<typename Regex >

bool booster::regex_match | ( | char const * | begin,
|  | char const * | end,
|  | Regex const & | r,
|  | int | flags = `0`
| ) |  |

Match an expression r against text in range [begin, end ), return true if matched

template<typename Regex >

bool booster::regex_match | ( | std::string const & | s,
|  | Regex const & | r,
|  | int | flags = `0`
| ) |  |

Match an expression r against text s, return true if matched

template<typename Regex >

bool booster::regex_match | ( | char const * | s,
|  | Regex const & | r,
|  | int | flags = `0`
| ) |  |

Match an expression r against text s, return true if matched

template<typename Regex >

bool booster::regex_search | ( | char const * | begin,
|  | char const * | end,
|  | cmatch & | m,
|  | Regex const & | r,
|  | int | flags = `0`
| ) |  |

Search an expression r in text in rage [begin, end). Return true if found, and store matched subexpressions in m

template<typename Regex >

bool booster::regex_search | ( | std::string const & | s,
|  | smatch & | m,
|  | Regex const & | r,
|  | int | flags = `0`
| ) |  |

Search an expression r in text s. Return true if found, and store matched subexpressions in m

template<typename Regex >

bool booster::regex_search | ( | char const * | s,
|  | cmatch & | m,
|  | Regex const & | r,
|  | int | flags = `0`
| ) |  |

Search an expression r in text s. Return true if found, and store matched subexpressions in m

template<typename Regex >

bool booster::regex_search | ( | char const * | begin,
|  | char const * | end,
|  | Regex const & | r,
|  | int | flags = `0`
| ) |  |

Search an expression r against text in range [begin, end ), return true if found

template<typename Regex >

bool booster::regex_search | ( | std::string const & | s,
|  | Regex const & | r,
|  | int | flags = `0`
| ) |  |

Search an expression r against text s, return true if found

template<typename Regex >

bool booster::regex_search | ( | char const * | s,
|  | Regex const & | r,
|  | int | flags = `0`
| ) |  |

Search an expression r against text s, return true if found

template<typename E >

details::trace_manip booster::trace | ( | E const & | e | ) |

manipulator that print stack trace for the exception e if it is derived from backtrace.

For example:

catch(std::exception const &e) {
std::cerr << e.what() << std::endl;
std::cerr << booster::trace(e);
}

BOOSTER_API std::tm booster::universal_time | ( | time_t | pt | ) |

Convert POSIX time to GMT time. Effectivly works as C gmtime