-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.h
More file actions
76 lines (71 loc) · 1.46 KB
/
common.h
File metadata and controls
76 lines (71 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// common enums and struct
#if ! defined (COMMON_H)
#define COMMON_H
#pragma once
#include <iostream>
#include <thread>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <mutex>
#include <memory>
#include <condition_variable>
#include <cctype>
#include <locale>
#include <queue>
#include <map>
#include <chrono>
#include <future>
#include "ace/INET_Addr.h"
#include "ace/SOCK_Stream.h"
#include "ace/SOCK_Acceptor.h"
#include "ace/Event_Handler.h"
#include "ace/Reactor.h"
#include "ace/SOCK_Connector.h"
#include "ace/Timer_Queue_Adapters.h"
#include "ace/Timer_Heap.h"
#include "ace/Service_Object.h"
#include "ace/Connector.h"
using namespace std;
enum returnValues // return label values
{
success,
inputNotCorrect,
threadingError,
FileNotExist,
noValidInfo,
enter_fail,
exit_fail,
play_end,
invalidPort,
invalid_input,
stopped,
fail_connect
};
enum constants
{
one = 1,
notRunning = -1,
notValid = -1
};
enum arg // argument position
{
programName = 0,
rightNumberArgument = 4,
script_file_pos = 4,
min_players_pos = 3,
override_pos = 3,
port_pos = 1,
addr_pos = 2,
correct_num_args = 2
};
struct Fragment // a fragment of the scene
{
unsigned int fragment_number = 0;
string character_name = "";
string filename = ""; // file contains line number of the text of the character in current fragment
int num_players = 0;
};
#endif