Files
statechart/example/Camera/Camera.hpp
Andreas Huber 8ccbe4b598 Adapted to Intel 8.0 (disabled warnings)
[SVN r22546]
2004-03-25 00:07:33 +00:00

65 lines
1.5 KiB
C++

#ifndef CAMERA_HPP
#define CAMERA_HPP
//////////////////////////////////////////////////////////////////////////////
// Copyright (c) Andreas Huber Doenni 2002-2004.
// Use, modification and distribution are subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//////////////////////////////////////////////////////////////////////////////
#include <boost/fsm/event.hpp>
#include <boost/fsm/state_machine.hpp>
#include <boost/fsm/simple_state.hpp>
#include <boost/fsm/custom_reaction.hpp>
#include <boost/config.hpp>
#ifdef BOOST_INTEL
# pragma warning( disable: 304 ) // access control not specified
#endif
namespace fsm = boost::fsm;
struct EvShutterHalf : fsm::event< EvShutterHalf > {};
struct EvShutterFull : fsm::event< EvShutterFull > {};
struct EvShutterRelease : fsm::event< EvShutterRelease > {};
struct EvConfig : fsm::event< EvConfig > {};
struct NotShooting;
struct Camera : fsm::state_machine< Camera, NotShooting >
{
bool IsMemoryAvailable() const { return true; }
bool IsBatteryLow() const { return false; }
};
struct Idle;
struct NotShooting : fsm::simple_state< NotShooting, Camera,
fsm::custom_reaction< EvShutterHalf >, Idle >
{
NotShooting();
~NotShooting();
fsm::result react( const EvShutterHalf & );
};
struct Idle : fsm::simple_state< Idle, NotShooting,
fsm::custom_reaction< EvConfig > >
{
Idle();
~Idle();
fsm::result react( const EvConfig & );
};
#endif