-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquery.h
46 lines (35 loc) · 823 Bytes
/
query.h
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
// query.h
// data representation of question/answer pairs
#ifndef _QUERY_
#define _QUERY_
#include <iostream>
#include "question.h"
#include "answer.h"
#include "getput.h"
#include <stdio.h>
typedef class QUERY *P_QUERY, **PP_QUERY;
class QUERY {
public:
QUERY();
QUERY(char *name);
// scanner funcs
void setname(char * newname);
void setquestion(P_QUESTION q);
void setanswer(P_ANSWER a);
// survey tool funcs
char * getname();
P_QUESTION getquestion();
P_ANSWER getanswer();
ATYPE getType() { return query_answer.get_atype(); };
void print();
void set_version();
void readFromDisk(FILE *fp);
void writeToDisk(FILE *fp);
private:
int version;
char query_name[128];
QUESTION query_question;
ANSWER query_answer;
const char * comment;
};
#endif