statechart/doc/configuration.html
Andreas Huber 6d30e8a61d Fixed two broken links
[SVN r30728]
2005-08-29 20:23:21 +00:00

137 lines
6.9 KiB
HTML
Raw Blame History

<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../../boost.css">
<title>The Boost Statechart Library - Configuration</title>
</head>
<body link="#0000ff" vlink="#800080">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary="header">
<tr>
<td valign="top" width="300">
<h3><a href="../../../index.htm">
<img alt="C++ Boost" src="../../../boost.png" border="0" width="277" height="86"></a></h3>
</td>
<td valign="top">
<h1 align="center">The Boost Statechart Library</h1>
<h2 align="center">Configuration</h2>
</td>
</tr>
</table>
<hr>
<dl class="page-index">
<dt><a href="#General configuration">General configuration</a></dt>
<dd><a href="#Introduction">Introduction</a></dd>
<dd><a href="#Debug mode compilation options">Debug mode compilation options</a></dd>
<dd><a href="#Release mode compilation options">Release mode compilation
options</a></dd>
<dd><a href="#Application Defined Macros">Application Defined Macros</a></dd>
<dt><a href="#Compiler-specific configuration">Compiler-specific
configuration</a></dt>
<dd><a href="#Intel 7.0 (Win32, MS Visual Studio 6 std library)">Intel 7.0
(Win32, MS Visual Studio 6 std library)</a></dd>
</dl>
<h1><a name="General configuration">General configuration</a></h1>
<h2><a name="Introduction">Introduction</a></h2>
<p>The library uses several configuration macros in
<a href="../../../libs/config/config.htm">&lt;boost/config.hpp&gt;</a>,
as well as two configuration macros meant to be supplied by the application.
Moreover, two commonly available compiler options also have an impact on the
available features.</p>
<h2><a name="Debug mode compilation options">Debug mode compilation options</a></h2>
<ul>
<li>C++ RTTI must be turned on (used by various asserts)</li>
<li>C++ exception handling can be turned on or off. When turned off,
obviously the library's <a href="tutorial.html#Exception handling">error
handling support</a> is no longer available</li>
</ul>
<h2><a name="Release mode compilation options">Release mode compilation
options</a></h2>
<ul>
<li>C++ RTTI can be turned on or off. When turned off, the use of <code>
<a href="reference.html#state_cast">state_cast&lt;&gt;()</a></code> leads to a compile time error (<code><a href="reference.html#state_downcast">state_downcast&lt;&gt;()</a></code>
is still available). Moreover, <code>BOOST_STATECHART_USE_NATIVE_RTTI</code> must
not be defined simultaneously</li>
<li>C++ exception handling can be turned on or off. When turned off,
obviously the library's <a href="tutorial.html#Exception handling">error
handling support</a> is no longer available</li>
</ul>
<h2><a name="Application Defined Macros">Application Defined Macros</a></h2>
<p>The following macros may be defined by an application using the library:</p>
<table summary="application defined macros" width="100%" cellpadding="2" border="3">
<tr>
<td width="226"><b>Macro</b></td>
<td width="893"><b>Meaning</b></td>
</tr>
<tr>
<td width="226"><code>BOOST_STATECHART_USE_NATIVE_RTTI</code></td>
<td width="893">When defined, the library no longer uses its own
speed-optimized RTTI implementation. Instead, native C++ RTTI is employed
(see <a href="performance.html#RTTI customization">RTTI
customization</a> in the performance document for more information).
This has the following effects:<ul>
<li><code>state_machine::state_base_type</code> becomes a polymorphic
type. That is, when <code>typeid</code> is applied to a <code>
state_machine::state_base_type</code> reference, the result refers to
a <code>type_info</code> object representing the the type of the most
derived state type</li>
<li><a href="tutorial.html#Custom state type information">Custom state
type information</a> is no longer available</li>
<li>All states need to store one pointer less, leading to a best-case
state machine memory footprint reduction of about 15%</li>
<li>Under most circumstances, dispatch speed degrades. This is because
native C++ RTTI values are retrieved through an additional indirection
on almost all platforms. See
<a href="performance.html#Speed versus scalability tradeoffs">
Speed versus scalability tradeoffs</a> in the
performance document for timings</li>
</ul>
</td>
</tr>
<tr>
<td width="226"><code>BOOST_STATECHART_RELAX_TRANSITION_CONTEXT</code></td>
<td width="893">When defined, the sequence of actions that are called during
a transition is relaxed. That is, its is no longer necessary that all states
up to the innermost common context are exited before the transition action
is called (as mandated by the UML standard). Instead, the transition action
can be a member of either the transition source or any direct or indirect
outer context and is called as soon as all possibly active inner states have
been exited. Then all remaining active states up to the innermost common
context are exited before entering all states down to the transition
destination</td>
</tr>
</table>
<p>Both macros need to be consistently defined or undefined for all translation
units that are later linked into the same executable. Not doing so will
inevitably lead to ODR violations. Depending on compiler and linker technology
such violations may or may not manifest themselves in link-time errors.</p>
<h1><a name="Compiler-specific configuration">Compiler-specific configuration</a></h1>
<h2><a name="Intel 7.0 (Win32, MS Visual Studio 6 std library)">Intel 7.0
(Win32, MS Visual Studio 6 std library)</a></h2>
<p>By default, this compiler has argument dependent lookup disabled. ADL must
be enabled to compile the library without errors. To enable ADL, <code>/Qoption,c,--arg_dep_lookup</code>
must be added to the compiler command line. See
<a href="../../../boost/config/compiler/intel.hpp">&lt;boost/config/compiler/intel.hpp&gt;</a>
for more information.</p>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->29 August, 2005<!--webbot bot="Timestamp" endspan i-checksum="34616" -->
</p>
<p><i><EFBFBD> Copyright <a href="mailto:ahd6974-spamgroupstrap@yahoo.com">Andreas Huber D<>nni</a>
2003-2005. <font color="#FF0000"><b>The link refers to a
<a href="http://en.wikipedia.org/wiki/Honeypot">spam honeypot</a>. Please remove the words spam and trap
to obtain my real address.</b></font></i></p>
<p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">
http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
</body>
</html>