• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 //////////////////////////////////////////////////////////////////////////////
NotShooting()17 NotShooting::NotShooting()
18 {
19   std::cout << "Entering NotShooting\n";
20 }
21 
~NotShooting()22 NotShooting::~NotShooting()
23 {
24   std::cout << "Exiting NotShooting\n";
25 }
26 
react(const EvShutterHalf &)27 sc::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 //////////////////////////////////////////////////////////////////////////////
Idle()40 Idle::Idle()
41 {
42   std::cout << "Entering Idle\n";
43 }
44 
~Idle()45 Idle::~Idle()
46 {
47   std::cout << "Exiting Idle\n";
48 }
49 
react(const EvConfig &)50 sc::result Idle::react( const EvConfig & )
51 {
52   return transit< Configuring >();
53 }
54