Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/statechart/example/Camera/Camera.cpp @ 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: 1.1 KB
Line 
1//////////////////////////////////////////////////////////////////////////////
2// Copyright 2002-2006 Andreas Huber Doenni
3// Distributed under the Boost Software License, Version 1.0. (See accompany-
4// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5//////////////////////////////////////////////////////////////////////////////
6
7
8
9#include "Precompiled.hpp"
10#include "Camera.hpp"
11#include "Configuring.hpp"
12#include "Shooting.hpp"
13
14
15
16//////////////////////////////////////////////////////////////////////////////
17NotShooting::NotShooting()
18{
19  std::cout << "Entering NotShooting\n";
20}
21
22NotShooting::~NotShooting()
23{
24  std::cout << "Exiting NotShooting\n";
25}
26
27sc::result NotShooting::react( const EvShutterHalf & )
28{
29  if ( context< Camera >().IsBatteryLow() )
30  {
31    return forward_event();
32  }
33  else
34  {
35    return transit< Shooting >();
36  }
37}
38
39//////////////////////////////////////////////////////////////////////////////
40Idle::Idle()
41{
42  std::cout << "Entering Idle\n";
43}
44
45Idle::~Idle()
46{
47  std::cout << "Exiting Idle\n";
48}
49
50sc::result Idle::react( const EvConfig & )
51{
52  return transit< Configuring >();
53}
Note: See TracBrowser for help on using the repository browser.