2004-04-21 06:39:20 +00:00
|
|
|
/** @mainpage
|
|
|
|
|
2005-02-18 15:49:44 +00:00
|
|
|
The official homepage is on:
|
|
|
|
- http://marc.waeckerlin.org/@PACKAGENAME@/index.html
|
|
|
|
|
|
|
|
All features are listed on the <a
|
|
|
|
href="modules.html">"Modules"</a> page.
|
2004-04-21 06:39:20 +00:00
|
|
|
|
2005-02-18 15:49:44 +00:00
|
|
|
@section intro Introduction
|
2004-04-23 16:03:29 +00:00
|
|
|
|
2005-02-18 15:49:44 +00:00
|
|
|
Featureful C++ Library containing a lot of needful
|
|
|
|
things. Everything, I often need, but it's missing in C++ standard
|
2005-03-14 16:27:09 +00:00
|
|
|
libraries and other common 3rd party libraries, such as <a
|
|
|
|
href="">log4cxx</a>, cppunit and boost.
|
2005-02-18 15:49:44 +00:00
|
|
|
|
|
|
|
I have paid attention to define simple and a nice to use
|
|
|
|
interfaces. The library makes use of object orientation, operator
|
|
|
|
overload and templates, where it makes sense. The library passes
|
|
|
|
several module tests before each delivery. It is therefore stable
|
|
|
|
and tested.
|
|
|
|
|
|
|
|
@section support Supported Platforms
|
|
|
|
|
|
|
|
The library is generic UNIX, but should also work on Windows. It
|
|
|
|
is sporadically tested on Windows in Cygwin. Stack trace works on
|
|
|
|
Linux only, it could theoretically work on Sun Solaris too, but
|
|
|
|
this is untested. Stack trace without symbol resolution, just
|
|
|
|
getting the raw addresses, only depends on GNU gcc and should work
|
|
|
|
on all platforms. Feedback is welcome!
|
|
|
|
|
|
|
|
@section features Missing a Feature, Found a Bug?
|
|
|
|
|
|
|
|
You are missing a feature, or an implementation is too incomplete
|
|
|
|
for the purpose you need it? Or you even found a bug? Just ask me
|
|
|
|
and I'll try to help you! My email address is in the file AUTHORS
|
|
|
|
and on my website: http://marc.waeckerlin.org
|
|
|
|
|
|
|
|
@section moreinfo Additional Information
|
2004-04-21 06:39:20 +00:00
|
|
|
|
2005-02-18 15:49:44 +00:00
|
|
|
See the <a href="pages.html">"Related Pages"</a>.
|
2004-10-07 09:30:23 +00:00
|
|
|
|
2005-03-11 23:22:05 +00:00
|
|
|
- @ref readme
|
|
|
|
- @ref download
|
|
|
|
- @ref usage
|
|
|
|
- @ref threads
|
|
|
|
- @ref libversion
|
|
|
|
- @ref license
|
|
|
|
- @ref install
|
|
|
|
- @ref news
|
|
|
|
- @ref changes
|
2005-02-18 15:49:44 +00:00
|
|
|
*/
|
|
|
|
|
2005-03-11 23:22:05 +00:00
|
|
|
/** @page download Download and Installation
|
2004-04-21 06:39:20 +00:00
|
|
|
|
2004-04-21 19:03:38 +00:00
|
|
|
Download this version from here:
|
2005-02-18 15:49:44 +00:00
|
|
|
- Requirements:
|
2005-03-11 23:22:05 +00:00
|
|
|
- Boost thread library for multi threading:
|
|
|
|
http://boost.org
|
|
|
|
- log4cxx for automated tracing and function traces:
|
|
|
|
- http://logging.apache.org/log4cxx
|
2005-12-07 19:09:28 +00:00
|
|
|
- RPM: http://marc.waeckerlin.org/mrw-c++/log4cxx-0.9.7-2.i386.rpm
|
2005-03-11 23:22:05 +00:00
|
|
|
- @ref mrw::StackTrace requires:
|
|
|
|
- the GNU Binutils
|
|
|
|
- either GNU Compiler gcc or GNU C library glibc
|
|
|
|
- runs better on: either Linux or Solaris
|
2005-02-18 15:49:44 +00:00
|
|
|
- Binary
|
|
|
|
- Binary RPM Packages (built on i586/SuSE):
|
|
|
|
- http://marc.waeckerlin.org/@PACKAGENAME@/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@-1.i586.rpm
|
|
|
|
- Installation:<br>
|
|
|
|
<code>rpm -Uvh @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@-1.i586.rpm</code>
|
2005-03-14 16:27:09 +00:00
|
|
|
- http://marc.waeckerlin.org/@PACKAGENAME@/@PACKAGENAME@-mt-@MAJOR@.@MINOR@.@LEAST@-1.i586.rpm
|
|
|
|
- Installation:<br>
|
|
|
|
<code>rpm -Uvh @PACKAGENAME@-mt-@MAJOR@.@MINOR@.@LEAST@-1.i586.rpm</code>
|
2005-02-18 15:49:44 +00:00
|
|
|
- http://marc.waeckerlin.org/@PACKAGENAME@/@PACKAGENAME@-devel-@MAJOR@.@MINOR@.@LEAST@-1.i586.rpm
|
|
|
|
- Installation:<br>
|
|
|
|
<code>rpm -Uvh @PACKAGENAME@-devel-@MAJOR@.@MINOR@.@LEAST@-1.i586.rpm</code>
|
|
|
|
- Source
|
|
|
|
- Requirements to build from source:
|
2005-03-11 23:22:05 +00:00
|
|
|
- boost: http://boost.org
|
2005-02-18 15:49:44 +00:00
|
|
|
- cppunit: http://cppunit.sf.net
|
|
|
|
- log4cxx: http://logging.apache.org/log4cxx
|
|
|
|
- doxygen: http://doxygen.org
|
|
|
|
- graphviz: http://www.research.att.com/sw/tools/graphviz
|
2005-03-14 16:27:09 +00:00
|
|
|
- GNU binutils (you also need the development package, if it is
|
|
|
|
separete (e.g. in Debian))
|
2005-02-18 15:49:44 +00:00
|
|
|
- GNU g++, GNU make, GNU autotools: http://gnu.org
|
|
|
|
- Source TAR-Ball:
|
|
|
|
- http://marc.waeckerlin.org/@PACKAGENAME@/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.tar.gz
|
|
|
|
- Installation:
|
|
|
|
-# <code>tar xzf @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.tar.gz</code>
|
|
|
|
-# <code>cd @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@</code>
|
|
|
|
-# <code>./configure && make all install</code>
|
|
|
|
- Source RPM Packages:
|
|
|
|
- http://marc.waeckerlin.org/@PACKAGENAME@/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@-1.src.rpm
|
|
|
|
- Installation:<br>
|
|
|
|
<code>sudo rpmbuild --rebuild @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@-1.src.rpm</code>
|
2004-04-21 19:03:38 +00:00
|
|
|
|
2004-04-23 16:03:29 +00:00
|
|
|
Download this documentation in PDF:
|
2005-02-18 15:49:44 +00:00
|
|
|
- http://marc.waeckerlin.org/@PACKAGENAME@/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.pdf
|
|
|
|
*/
|
2004-04-21 06:39:20 +00:00
|
|
|
|
2005-02-18 15:49:44 +00:00
|
|
|
/** @page usage Usage of the Library: Include and Link
|
2004-04-23 16:03:29 +00:00
|
|
|
|
|
|
|
Include the headers you need with prefix @c mrw, e.g.:
|
|
|
|
|
|
|
|
@verbatim
|
2005-11-29 12:42:01 +00:00
|
|
|
\#include <mrw/stacktrace.hpp>
|
2004-04-23 16:03:29 +00:00
|
|
|
@endverbatim
|
|
|
|
|
2005-03-11 23:22:05 +00:00
|
|
|
All classes are in the @c mrw namespace.
|
2005-02-18 15:49:44 +00:00
|
|
|
|
|
|
|
if you want the mrw::StackTrace to evaluate file and line numbers,
|
|
|
|
then you need to compile with debug information enabled, thats
|
|
|
|
option @c -g.
|
|
|
|
|
2005-03-11 23:22:05 +00:00
|
|
|
Link to the library with option @c -lmrw (or @c -lmrw-mt if your
|
|
|
|
program is multi threaded), e.g.:
|
2004-04-23 16:03:29 +00:00
|
|
|
|
2004-04-21 06:39:20 +00:00
|
|
|
@verbatim
|
2004-04-23 16:03:29 +00:00
|
|
|
g++ -g -o myprogram myprogram.cpp -lmrw
|
2004-04-21 06:39:20 +00:00
|
|
|
@endverbatim
|
2004-04-23 16:03:29 +00:00
|
|
|
|
2005-03-11 23:22:05 +00:00
|
|
|
For the @ref AutoTools "unexpected handler" you need to link to
|
|
|
|
@c -lmrwexcstderr or @c -lmrwexclog4cxx (or @c -lmrwexcstderr-mt
|
|
|
|
or @c -lmrwexclog4cxx-mt if your program is multi threaded).
|
|
|
|
|
|
|
|
For the @ref AutoFunctionTrace "automated function trace" you need
|
|
|
|
to link to @c -lmrwautofunctiontracelog4cxx (or @c
|
|
|
|
-lmrwautofunctiontracelog4cxx-mt if your program is multi
|
|
|
|
threaded). In addition, you must compile and link your program
|
|
|
|
with the GNU compiler specific option @c -finstrument-functions */
|
2004-04-23 16:03:29 +00:00
|
|
|
|
2005-02-18 15:49:44 +00:00
|
|
|
/** @page threads Thread Safety
|
2004-08-28 16:21:25 +00:00
|
|
|
|
2005-11-29 12:42:01 +00:00
|
|
|
There is a severe bug in the g++ compiler with version
|
|
|
|
>= 3.4: The macro @c _REENTRANT is always set and cannot be
|
|
|
|
used to check whether we are in a multithreaded compilation or
|
|
|
|
not! See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11953 for
|
|
|
|
more details. Workaround: To enable multithreading, you must pass
|
|
|
|
the @c -D_MT compiler flag for the GNU gcc verions 3.4 and above!
|
|
|
|
|
2005-03-11 23:22:05 +00:00
|
|
|
To enable thread safety, you must link to @c libmrw-mt instead of
|
|
|
|
@c libmrw. That means, your link option is: @c -lmrw-mt
|
|
|
|
|
2005-11-29 12:42:01 +00:00
|
|
|
For GNU gcc verions 3.4 and above, you must use the compile option
|
|
|
|
@c -D_MT in addition, because of a severe bug in the compiler.
|
|
|
|
|
2005-03-11 23:22:05 +00:00
|
|
|
Different instances of classes can run in different threads, but
|
|
|
|
instances of classes can not be shared between different threads.
|
|
|
|
|
2004-08-28 16:21:25 +00:00
|
|
|
All classes are not thread safe, that means they should either
|
|
|
|
always be accessed from the same thread, or you are responsible
|
2005-03-11 23:22:05 +00:00
|
|
|
for locking.
|
|
|
|
|
|
|
|
All methods are threads safe, that means, they can be called at
|
|
|
|
the same time from different threads. But not on the same object.
|
|
|
|
|
|
|
|
This means: One instance should only be used within one single
|
|
|
|
thread. Different instances of the same class can be accessed
|
|
|
|
simultaneousely in different threads.
|
|
|
|
|
|
|
|
If you need more thread safety as a feature, please send
|
2005-02-18 15:49:44 +00:00
|
|
|
me an email and ask me for it (you find the address in the package
|
2004-08-28 16:21:25 +00:00
|
|
|
or on my personal homepage: http://marc.waeckerlin.org).
|
2005-02-18 15:49:44 +00:00
|
|
|
*/
|
2004-08-28 16:21:25 +00:00
|
|
|
|
2005-02-18 15:49:44 +00:00
|
|
|
/** @page libversion Library Versioning
|
2004-10-07 09:30:23 +00:00
|
|
|
|
|
|
|
The library and the package have the same version number. This
|
|
|
|
means, if you for example install the package versioned
|
|
|
|
mrw-c++-2.6.4.tar.gz, then it builds a shared library of the same
|
|
|
|
version, named libmrw.so.2.6.4. The naming is
|
|
|
|
version=MAJOR.MINOR.LEAST. What do the numbers mean:
|
|
|
|
|
|
|
|
<dl>
|
|
|
|
<dt>MAJOR</dt>
|
|
|
|
|
|
|
|
<dd>If the major number is increased, then the backwards
|
|
|
|
compatibility was broken. Either there was an incompatible
|
|
|
|
change in the implementation, or in the interface, e.g. a change
|
|
|
|
in method parameters, or even parts of the library have been
|
|
|
|
removed.</dd>
|
|
|
|
|
|
|
|
<dt>MINOR</dt>
|
|
|
|
|
|
|
|
<dd>If the minor number changes, then it remains backward
|
|
|
|
compatible. Either there was a minor change in the
|
|
|
|
implementation or behavior of some features, a bigger bugfix, or
|
|
|
|
new feature were added. A program linked to a previous library
|
|
|
|
with smaller minor number still works, but a program linked to
|
|
|
|
newer library with a higher minor number may not work with a
|
|
|
|
library that has a lower minor number. This is a one way,
|
|
|
|
backwards only compatibility.</dd>
|
|
|
|
|
|
|
|
<dt>LEAST</dt>
|
|
|
|
|
|
|
|
<dd>The least number is increased for small changes, bugfixes,
|
|
|
|
changes in the documentation and so on. Except the bugs, changes
|
|
|
|
in the least number are fully forward and backward
|
|
|
|
compatible.</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
This means, programs linked to mrw-c++ version 2.6.4 will work
|
|
|
|
with library version 2.6.3, also with version 2.6.5, or with
|
|
|
|
version 2.7.1, but it won't work with version 2.5.4 nor with 1.1.3
|
|
|
|
nor with 3.1.4.
|
|
|
|
|
|
|
|
You can see the version of the library by issuing the command @c what.
|
2004-04-21 06:39:20 +00:00
|
|
|
*/
|
2004-04-21 19:03:38 +00:00
|
|
|
|
|
|
|
/** @page license License
|
|
|
|
@verbinclude COPYING */
|
|
|
|
|
|
|
|
/** @page readme Readme
|
|
|
|
@verbinclude README */
|
|
|
|
|
2004-04-23 16:03:29 +00:00
|
|
|
/** @page install Installation
|
|
|
|
@verbinclude INSTALL */
|
|
|
|
|
2004-04-21 19:03:38 +00:00
|
|
|
/** @page news News
|
|
|
|
@verbinclude NEWS */
|
|
|
|
|
|
|
|
/** @page changes Change Log
|
|
|
|
@verbinclude ChangeLog */
|
2004-10-07 09:30:23 +00:00
|
|
|
|
|
|
|
/** @brief the namespace for this library
|
|
|
|
|
|
|
|
All classes and all functions (except global operators) are placed
|
|
|
|
in this namespace.
|
|
|
|
|
|
|
|
For an overview, better see the <a
|
|
|
|
href="modules.html">"Modules"</a> page.
|
|
|
|
*/
|
|
|
|
namespace mrw {
|
|
|
|
}
|