Define some data structures
This commit is contained in:
commit
e4486d897c
32
rotagen.h
Normal file
32
rotagen.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef ROTAGEN_H
|
||||
#define ROTAGEN_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define MAX_JOBS 8
|
||||
|
||||
enum constraint_type {
|
||||
JOB_EXEMPTION_CONSTRAINT,
|
||||
SLOT_EXEMPTION_CONSTRAINT,
|
||||
};
|
||||
|
||||
struct constraint {
|
||||
int person;
|
||||
enum constraint_type type;
|
||||
union {
|
||||
int job; /* Job constraints */
|
||||
int slot; /* Slot constraints */
|
||||
} object;
|
||||
};
|
||||
|
||||
struct allocation {
|
||||
int person;
|
||||
int job;
|
||||
int slot;
|
||||
};
|
||||
|
||||
struct slot_result {
|
||||
struct allocation allocations[MAX_JOBS];
|
||||
};
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user