OSDN Git Service

fix cmake/Macros.cmake
[moflib/moflib.git] / moflib-1.0 / src / mof / Interpreter.hpp
1 #pragma once
2 #include "mof/script/CommandSet.hpp"
3 #include <memory>
4
5 namespace mof
6 {
7     class InputReceiver;
8     
9     namespace Interpreter
10     {
11         enum State
12         {
13             WAITING , /** doNextCommand\82Å\8e\9f\82Ì\83R\83}\83\93\83h\82ð\89ð\90Í\82·\82é */
14             BUSY ,    /** \83R\83}\83\93\83h\82ð\8f\88\97\9d\92\86(doNextCommand\82Í\8cÄ\82Î\82ê\82Ä\82¢\82é) */
15             RUNNING , /** \83R\83}\83\93\83h\82ð\8f\88\97\9d\92\86(doNextCommand\82Í\8cÄ\82Î\82ê\82Ä\82¢\82È\82¢) */
16             FREE      /** \83X\83N\83\8a\83v\83g\82ð\8dÅ\8cã\82Ü\82Å\8f\88\97\9d\82µ\82½ */
17         };
18         
19         /**
20          * @note      \88ø\90\94\82Å\93n\82µ\82½\93ü\97Í\83\8c\83V\81[\83o\82É\82æ\82Á\82Ä\81A\83R\83}\83\93\83h\82Ì\8f\88\97\9d\82ª\8ds\82í\82ê\82é
21          * @param[in] \83R\83}\83\93\83h\8f\88\97\9d\97p\83C\83\93\83v\83b\83g\83\8c\83V\81[\83o
22          * @param[in] \96½\97ß\82Ì\8eÀ\91\95
23          */
24         void initialize
25         ( 
26             const std::shared_ptr<InputReceiver> & pInput ,
27                         std::shared_ptr<mof::script::CommandSet> cs
28          );
29
30         void finalize( );
31         
32         
33         /**
34          * @brief     \82±\82Ì\83N\83\89\83X\82Ì\83I\83u\83W\83F\83N\83g\82É\82æ\82è\89ð\90Í\82³\82ê\82é\83X\83N\83\8a\83v\83g\82ð\92Ç\89Á\82·\82é
35          * @param[in] \83X\83N\83\8a\83v\83g\83t\83@\83C\83\8b\96¼
36          */
37         void open( const tstring& filename );
38         
39         /**
40          * @brief  \8c»\8dÝ\82Ì\83C\83\93\83^\83v\83\8a\83^\82Ì\8fó\91Ô\82ð\93¾\82é
41          * @return \8c»\8dÝ\82Ì\8fó\91Ô
42          */
43         State getState();
44         
45         /**
46          * @brief \83R\83}\83\93\83h\82Ì\8f\88\97\9d\82ð\8ds\82¤
47          * @note  create\8cn\83\81\83\\83b\83h\82Å\90\90¬\82³\82ê\82½\83\8a\83\\81[\83X\82Ì\8dX\90V\83\81\83\\83b\83h\82ª\8cÄ\82Î\82ê\82é\81B
48          * @note  \82½\82¾\82µ\81Ainactive\8cn\83\81\83\\83b\83h\82Å\93n\82³\82ê\82½\83\8a\83\\81[\83X\82É\82Â\82¢\82Ä\82Í\82±\82Ì\8cÀ\82è\82Å\82È\82¢\81B
49          */
50         void update();
51         
52         /**
53          * @brief \83C\83\93\83^\83v\83\8a\83^\82É\8e\9f\82Ì\83R\83}\83\93\83h\82Ì\8eÀ\8ds\82ð\91£\82·
54          * @note  \83C\83\93\83^\83v\83\8a\83^\82ªWAITING\8fó\91Ô\82Ì\8fê\8d\87\81A\92¼\82¿\82É\8e\9f\82Ì\83R\83}\83\93\83h\82ª\89ð\90Í\82³\82ê\82é\81BRUNNING\81ABUSY\8fó\91Ô
55          * @note  \82Ì\8fê\8d\87\82Íupdate\8cÄ\82Ñ\8fo\82µ\82É\82æ\82è\83C\83\93\83^\83v\83\8a\83^\82ª\8c»\8dÝ\82Ì\83R\83}\83\93\83h\82Ì\8f\88\97\9d\82ð\8a®\97¹\82µ\82½\8cã\82Å\8e\9f\82Ì
56          * @note  \89ð\90Í\82ª\8aJ\8en\82³\82ê\82é\81B
57          */
58         void doNextCommand();
59         
60         
61     };
62
63 }
64