Subversion Repositories programming

Rev

Rev 340 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 340 Rev 344
Line 14... Line 14...
14
#include <unistd.h>
14
#include <unistd.h>
15
#include <assert.h>
15
#include <assert.h>
16
#include <vector>
16
#include <vector>
17
#include <string>
17
#include <string>
18
 
18
 
-
 
19
#include <glibmm.h>
-
 
20
 
19
#include <boost/thread/thread.hpp>
21
#include <boost/thread/thread.hpp>
20
#include <boost/bind.hpp>
22
#include <boost/bind.hpp>
21
#include <boost/algorithm/string.hpp>
-
 
22
 
23
 
-
 
24
#include "dispatch_data.h"
23
#include "controller.h"
25
#include "controller.h"
24
 
26
 
25
const int MOVE_UP   = 0;
27
const int MOVE_UP   = 0;
26
const int MOVE_DOWN = 1;
28
const int MOVE_DOWN = 1;
27
const int IDLE      = 2;
29
const int IDLE      = 2;
Line 42... Line 44...
42
        int floors_above_current ();
44
        int floors_above_current ();
43
        int floors_below_current ();
45
        int floors_below_current ();
44
        void push_button (int floor);
46
        void push_button (int floor);
45
        bool button_is_pushed (int floor);
47
        bool button_is_pushed (int floor);
46
 
48
 
47
        // User interaction
-
 
48
        void have_user_enter_buttons ();
-
 
49
 
-
 
50
        // Getters and Setters
49
        // Getters and Setters
51
        int get_direction ();
50
        int get_direction ();
52
        float get_current_floor ();
51
        float get_current_floor ();
53
        void set_controller (Controller *c);
52
        void set_controller (Controller *c);
-
 
53
        void set_dispatcher (Glib::Dispatcher *d);
54
 
54
 
55
        // Thread Functions
55
        // Thread Functions
56
        void thread_start ();
56
        void thread_start ();
57
        void thread_stop ();
57
        void thread_stop ();
58
        void thread_pause ();
58
        void thread_pause ();
Line 75... Line 75...
75
        float current_floor;
75
        float current_floor;
76
        int direction;
76
        int direction;
77
        std::vector<bool> stop_at_floors;
77
        std::vector<bool> stop_at_floors;
78
        Controller *controller;
78
        Controller *controller;
79
 
79
 
-
 
80
        // Dispatcher
-
 
81
        Glib::Dispatcher *dispatcher;
-
 
82
 
80
        // Thread Variable
83
        // Thread Variable
81
        bool terminate;
84
        bool terminate;
82
        bool pause;
85
        bool pause;
83
 
86
 
84
};
87
};