|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
<html>
|
|
Packit |
58578d |
<head>
|
|
Packit |
58578d |
<meta http-equiv="Content-Language" content="en-us">
|
|
Packit |
58578d |
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
Packit |
58578d |
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
|
|
Packit |
58578d |
<meta name="ProgId" content="FrontPage.Editor.Document">
|
|
Packit |
58578d |
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
|
Packit |
58578d |
|
|
Packit |
58578d |
<title>The Boost Statechart Library - Configuration</title>
|
|
Packit |
58578d |
</head>
|
|
Packit |
58578d |
|
|
Packit |
58578d |
<body link="#0000FF" vlink="#800080">
|
|
Packit |
58578d |
|
|
Packit |
58578d |
"header">
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
"../../../boost.png" border="0" width="277" height="86">
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
The Boost Statechart Library
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Configuration
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
General configuration
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Introduction
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Debug mode compilation
|
|
Packit |
58578d |
options
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Release mode compilation
|
|
Packit |
58578d |
options
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Application Defined
|
|
Packit |
58578d |
Macros
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
configuration
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
The library uses several configuration macros in
|
|
Packit |
58578d |
"../../../libs/config/config.htm"><boost/config.hpp>, as well as
|
|
Packit |
58578d |
two configuration macros meant to be supplied by the application. Moreover,
|
|
Packit |
58578d |
two commonly available compiler options also have an impact on the
|
|
Packit |
58578d |
available features.
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
"DebugModeCompilationOptions">Debug mode compilation options
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
C++ RTTI must be turned on (used by various asserts)
|
|
Packit |
58578d |
|
|
Packit |
58578d |
C++ exception handling can be turned on or off. When turned off,
|
|
Packit |
58578d |
obviously the library's error
|
|
Packit |
58578d |
handling support is no longer available
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
"ReleaseModeCompilationOptions">Release mode compilation options
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
C++ RTTI can be turned on or off. When turned off, the use of
|
|
Packit |
58578d |
state_cast<>()
|
|
Packit |
58578d |
leads to a compile time error (
|
|
Packit |
58578d |
"reference.html#state_downcast">state_downcast<>() is
|
|
Packit |
58578d |
still available). Moreover, BOOST_STATECHART_USE_NATIVE_RTTI
|
|
Packit |
58578d |
must not be defined simultaneously
|
|
Packit |
58578d |
|
|
Packit |
58578d |
C++ exception handling can be turned on or off. When turned off,
|
|
Packit |
58578d |
obviously the library's error
|
|
Packit |
58578d |
handling support is no longer available
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
"ApplicationDefinedMacros">Application Defined Macros
|
|
Packit |
58578d |
|
|
Packit |
58578d |
The following macros may be defined by an application using the
|
|
Packit |
58578d |
library:
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
border="3">
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Macro
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Meaning
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
BOOST_STATECHART_USE_NATIVE_RTTI
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
When defined, the library no longer uses its own speed-optimized RTTI
|
|
Packit |
58578d |
implementation. Instead, native C++ RTTI is employed (see
|
|
Packit |
58578d |
"performance.html#RttiCustomization">RTTI customization in the
|
|
Packit |
58578d |
performance document for more information). This has the following
|
|
Packit |
58578d |
effects:
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
state_machine::state_base_type becomes a
|
|
Packit |
58578d |
polymorphic type. That is, when typeid is applied to a
|
|
Packit |
58578d |
state_machine::state_base_type reference, the result
|
|
Packit |
58578d |
refers to a type_info object representing the the type
|
|
Packit |
58578d |
of the most derived state type
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Custom state
|
|
Packit |
58578d |
type information is no longer available
|
|
Packit |
58578d |
|
|
Packit |
58578d |
All states need to store one pointer less, leading to a
|
|
Packit |
58578d |
best-case state machine memory footprint reduction of about
|
|
Packit |
58578d |
15%
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Under most circumstances, dispatch speed degrades. This is
|
|
Packit |
58578d |
because native C++ RTTI values are retrieved through an additional
|
|
Packit |
58578d |
indirection on almost all platforms. See
|
|
Packit |
58578d |
"performance.html#SpeedVersusScalabilityTradeoffs">Speed versus
|
|
Packit |
58578d |
scalability tradeoffs in the performance document for
|
|
Packit |
58578d |
timings
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
BOOST_STATECHART_RELAX_TRANSITION_CONTEXT
|
|
Packit |
58578d |
|
|
Packit |
58578d |
When defined, the sequence of actions that are called
|
|
Packit |
58578d |
during a transition is relaxed. That is, its is no longer necessary
|
|
Packit |
58578d |
that all states up to the innermost common context are exited before
|
|
Packit |
58578d |
the transition action is called (as mandated by the UML standard).
|
|
Packit |
58578d |
Instead, the transition action can be a member of either the transition
|
|
Packit |
58578d |
source or any direct or indirect outer context and is called as soon as
|
|
Packit |
58578d |
all possibly active inner states have been exited. Then all remaining
|
|
Packit |
58578d |
active states up to the innermost common context are exited before
|
|
Packit |
58578d |
entering all states down to the transition destination
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Both macros need to be consistently defined or undefined for all
|
|
Packit |
58578d |
translation units that are later linked into the same executable. Not doing
|
|
Packit |
58578d |
so will inevitably lead to ODR violations. Depending on compiler and linker
|
|
Packit |
58578d |
technology such violations may or may not manifest themselves in link-time
|
|
Packit |
58578d |
errors.
|
|
Packit |
58578d |
|
|
Packit |
58578d |
|
|
Packit |
58578d |
"../../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
|
|
Packit |
58578d |
height="31" width="88">
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Revised 05 January, 2008
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Copyright © 2003-2008 Andreas Huber
|
|
Packit |
58578d |
Dönni
|
|
Packit |
58578d |
|
|
Packit |
58578d |
Distributed under the Boost Software License, Version 1.0. (See
|
|
Packit |
58578d |
accompanying file LICENSE_1_0.txt or
|
|
Packit |
58578d |
copy at
|
|
Packit |
58578d |
"http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt)
|
|
Packit |
58578d |
</body>
|
|
Packit |
58578d |
</html>
|