Subversion Repositories programming

Rev

Rev 321 | Rev 329 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 321 Rev 328
Line 5... Line 5...
5
#include <cstdio>
5
#include <cstdio>
6
#include <iostream>
6
#include <iostream>
7
#include <unistd.h>
7
#include <unistd.h>
8
#include <assert.h>
8
#include <assert.h>
9
#include <vector>
9
#include <vector>
10
using namespace std;
-
 
11
 
10
 
12
/* Custom #defines for just the elevator class */
11
/* Custom #defines for just the elevator class */
13
#define MOVE_UP     0
12
#define MOVE_UP     0
14
#define MOVE_DOWN   1
13
#define MOVE_DOWN   1
15
#define IDLE        2
14
#define IDLE        2
Line 27... Line 26...
27
        // Service Functions
26
        // Service Functions
28
        int floors_above_current ();
27
        int floors_above_current ();
29
        int floors_below_current ();
28
        int floors_below_current ();
30
        bool has_any_floors_to_stop_at ();
29
        bool has_any_floors_to_stop_at ();
31
        void push_button (int floor);
30
        void push_button (int floor);
-
 
31
        bool button_is_pushed (int floor);
32
 
32
 
33
        // Getters and Setters
33
        // Getters and Setters
34
        int get_direction ();
34
        int get_direction ();
35
        float get_current_floor ();
35
        float get_current_floor ();
36
 
36