Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/statechart/doc/configuration.html @ 33

Last change on this file since 33 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 7.5 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
3<html>
4<head>
5  <meta http-equiv="Content-Language" content="en-us">
6  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
7  <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
8  <meta name="ProgId" content="FrontPage.Editor.Document">
9  <link rel="stylesheet" type="text/css" href="../../../boost.css">
10
11  <title>The Boost Statechart Library - Configuration</title>
12</head>
13
14<body link="#0000FF" vlink="#800080">
15  <table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
16  "header">
17    <tr>
18      <td valign="top" width="300">
19        <h3><a href="../../../index.htm"><img alt="C++ Boost" src=
20        "../../../boost.png" border="0" width="277" height="86"></a></h3>
21      </td>
22
23      <td valign="top">
24        <h1 align="center">The Boost Statechart Library</h1>
25
26        <h2 align="center">Configuration</h2>
27      </td>
28    </tr>
29  </table>
30  <hr>
31
32  <dl class="page-index">
33    <dt><a href="#GeneralConfiguration">General configuration</a></dt>
34
35    <dd><a href="#Introduction">Introduction</a></dd>
36
37    <dd><a href="#DebugModeCompilationOptions">Debug mode compilation
38    options</a></dd>
39
40    <dd><a href="#ReleaseModeCompilationOptions">Release mode compilation
41    options</a></dd>
42
43    <dd><a href="#ApplicationDefinedMacros">Application Defined
44    Macros</a></dd>
45
46    <dt><a href="#CompilerSpecificConfiguration">Compiler-specific
47    configuration</a></dt>
48
49    <dd><a href="#Intel70">Intel 7.0 (Win32, MS Visual Studio 6 std
50    library)</a></dd>
51  </dl>
52
53  <h1><a id="GeneralConfiguration" name="GeneralConfiguration">General
54  configuration</a></h1>
55
56  <h2><a id="Introduction" name="Introduction">Introduction</a></h2>
57
58  <p>The library uses several configuration macros in <a href=
59  "../../../libs/config/config.htm">&lt;boost/config.hpp&gt;</a>, as well as
60  two configuration macros meant to be supplied by the application. Moreover,
61  two commonly available compiler options also have an impact on the
62  available features.</p>
63
64  <h2><a id="DebugModeCompilationOptions" name=
65  "DebugModeCompilationOptions">Debug mode compilation options</a></h2>
66
67  <ul>
68    <li>C++ RTTI must be turned on (used by various asserts)</li>
69
70    <li>C++ exception handling can be turned on or off. When turned off,
71    obviously the library's <a href="tutorial.html#ExceptionHandling">error
72    handling support</a> is no longer available</li>
73  </ul>
74
75  <h2><a id="ReleaseModeCompilationOptions" name=
76  "ReleaseModeCompilationOptions">Release mode compilation options</a></h2>
77
78  <ul>
79    <li>C++ RTTI can be turned on or off. When turned off, the use of
80    <code><a href="reference.html#state_cast">state_cast&lt;&gt;()</a></code>
81    leads to a compile time error (<code><a href=
82    "reference.html#state_downcast">state_downcast&lt;&gt;()</a></code> is
83    still available). Moreover, <code>BOOST_STATECHART_USE_NATIVE_RTTI</code>
84    must not be defined simultaneously</li>
85
86    <li>C++ exception handling can be turned on or off. When turned off,
87    obviously the library's <a href="tutorial.html#ExceptionHandling">error
88    handling support</a> is no longer available</li>
89  </ul>
90
91  <h2><a id="ApplicationDefinedMacros" name=
92  "ApplicationDefinedMacros">Application Defined Macros</a></h2>
93
94  <p>The following macros may be defined by an application using the
95  library:</p>
96
97  <table summary="application defined macros" width="100%" cellpadding="2"
98  border="3">
99    <tr>
100      <td width="226"><b>Macro</b></td>
101
102      <td width="893"><b>Meaning</b></td>
103    </tr>
104
105    <tr>
106      <td width="226"><code>BOOST_STATECHART_USE_NATIVE_RTTI</code></td>
107
108      <td width="893">
109        When defined, the library no longer uses its own speed-optimized RTTI
110        implementation. Instead, native C++ RTTI is employed (see <a href=
111        "performance.html#RttiCustomization">RTTI customization</a> in the
112        performance document for more information). This has the following
113        effects:
114
115        <ul>
116          <li><code>state_machine::state_base_type</code> becomes a
117          polymorphic type. That is, when <code>typeid</code> is applied to a
118          <code>state_machine::state_base_type</code> reference, the result
119          refers to a <code>type_info</code> object representing the the type
120          of the most derived state type</li>
121
122          <li><a href="tutorial.html#CustomStateTypeInformation">Custom state
123          type information</a> is no longer available</li>
124
125          <li>All states need to store one pointer less, leading to a
126          best-case state machine memory footprint reduction of about
127          15%</li>
128
129          <li>Under most circumstances, dispatch speed degrades. This is
130          because native C++ RTTI values are retrieved through an additional
131          indirection on almost all platforms. See <a href=
132          "performance.html#SpeedVersusScalabilityTradeoffs">Speed versus
133          scalability tradeoffs</a> in the performance document for
134          timings</li>
135        </ul>
136      </td>
137    </tr>
138
139    <tr>
140      <td width="226">
141      <code>BOOST_STATECHART_RELAX_TRANSITION_CONTEXT</code></td>
142
143      <td width="893">When defined, the sequence of actions that are called
144      during a transition is relaxed. That is, its is no longer necessary
145      that all states up to the innermost common context are exited before
146      the transition action is called (as mandated by the UML standard).
147      Instead, the transition action can be a member of either the transition
148      source or any direct or indirect outer context and is called as soon as
149      all possibly active inner states have been exited. Then all remaining
150      active states up to the innermost common context are exited before
151      entering all states down to the transition destination</td>
152    </tr>
153  </table>
154
155  <p>Both macros need to be consistently defined or undefined for all
156  translation units that are later linked into the same executable. Not doing
157  so will inevitably lead to ODR violations. Depending on compiler and linker
158  technology such violations may or may not manifest themselves in link-time
159  errors.</p>
160
161  <h1><a id="CompilerSpecificConfiguration" name=
162  "CompilerSpecificConfiguration">Compiler-specific configuration</a></h1>
163
164  <h2><a id="Intel70" name="Intel70">Intel 7.0 (Win32, MS Visual Studio 6 std
165  library)</a></h2>
166
167  <p>By default, this compiler has argument dependent lookup disabled. ADL
168  must be enabled to compile the library without errors. To enable ADL,
169  <code>/Qoption,c,--arg_dep_lookup</code> must be added to the compiler
170  command line. See <a href=
171  "../../../boost/config/compiler/intel.hpp">&lt;boost/config/compiler/intel.hpp&gt;</a>
172  for more information.</p>
173  <hr>
174
175  <p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
176  "http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional"
177  height="31" width="88"></a></p>
178
179  <p>Revised
180  <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->03 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38512" --></p>
181
182  <p><i>Copyright &copy; 2003-<!--webbot bot="Timestamp" s-type="EDITED" s-format="%Y" startspan -->2006<!--webbot bot="Timestamp" endspan i-checksum="770" -->
183  <a href="contact.html">Andreas Huber D&ouml;nni</a></i></p>
184
185  <p><i>Distributed under the Boost Software License, Version 1.0. (See
186  accompanying file <a href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
187  copy at <a href=
188  "http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
189</body>
190</html>
Note: See TracBrowser for help on using the repository browser.