/
BirdLeon
/
ROBLOX2016
Обзор
Документация
Войти
/
BirdLeon
/
ROBLOX2016
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
Library/boost/libs/statechart/example/Camera/Camera.hpp
64 строки
2 KB
PatoFlamejanteTV
full source code
19 дек 2024, 19:11
19 дек 2024, 19:11
05db15d
Код
Авторство
О чём код?
#ifndef BOOST_STATECHART_EXAMPLE_CAMERA_HPP_INCLUDED #define BOOST_STATECHART_EXAMPLE_CAMERA_HPP_INCLUDED ////////////////////////////////////////////////////////////////////////////// // Copyright 2002-2006 Andreas Huber Doenni // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ////////////////////////////////////////////////////////////////////////////// #include <boost/statechart/event.hpp> #include <boost/statechart/state_machine.hpp> #include <boost/statechart/simple_state.hpp> #include <boost/statechart/custom_reaction.hpp> #include <boost/config.hpp> #ifdef BOOST_INTEL # pragma warning( disable: 304 ) // access control not specified #endif namespace sc = boost::statechart; ////////////////////////////////////////////////////////////////////////////// struct EvShutterHalf : sc::event< EvShutterHalf > {}; struct EvShutterFull : sc::event< EvShutterFull > {}; struct EvShutterRelease : sc::event< EvShutterRelease > {}; struct EvConfig : sc::event< EvConfig > {}; struct NotShooting; struct Camera : sc::state_machine< Camera, NotShooting > { bool IsMemoryAvailable() const { return true; } bool IsBatteryLow() const { return false; } }; struct Idle; struct NotShooting : sc::simple_state< NotShooting, Camera, Idle > { typedef sc::custom_reaction< EvShutterHalf > reactions; NotShooting(); ~NotShooting(); sc::result react( const EvShutterHalf & ); }; struct Idle : sc::simple_state< Idle, NotShooting > { typedef sc::custom_reaction< EvConfig > reactions; Idle(); ~Idle(); sc::result react( const EvConfig & ); }; #endif