aboutsummaryrefslogtreecommitdiffstats
path: root/toj/center/src/judge.h
blob: 5183942ef3370460fe2882f05ebb0859179e4245 (plain) (blame)
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
#ifndef JUDGE_H
#define JUDGE_H

#define JUDGE_THREAD_MAX 16
#define JUDGE_THREAD_JUDGEMAX 2

#define JUDGE_CACHESTATE_READY 0
#define JUDGE_CACHESTATE_UPDATE 1

class judge_pro_info{
public:
    int proid;
    int cacheid;
    int ref_count;

    int state;
    int update_cacheid;

    judge_pro_info(int proid,int cacheid){
        this->proid = proid;
        this->cacheid = cacheid;
        this->ref_count = 0;

        this->state = JUDGE_CACHESTATE_READY;
        this->update_cacheid = 0;
    }
};

class judge_submit_info{
public:
    int subid;
    judge_pro_info *pro_info;
    int lang;
    char *set_data;

    judge_submit_info(int subid,judge_pro_info *pro_info,int lang,char *set_data){
        this->subid = subid;
        this->pro_info = pro_info;
        this->lang = lang;
        this->set_data = set_data;
    }
};

#endif