-
Notifications
You must be signed in to change notification settings - Fork 0
/
executive.hpp
42 lines (32 loc) · 1 KB
/
executive.hpp
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
// Author: Kristi Daigh
// Project: MLEM2 Rule Induction
// Date: 11/20/2019
/** Header file for executive class.
@file executive.hpp
This class handles the execution
of the program. */
#ifndef EXECUTIVE_H
#define EXECUTIVE_H
#include "dataset.hpp"
#include <string>
class Executive {
public:
Executive();
~Executive();
/* Reads the file into a dataset structure.
@returns True if file read is successful; false, otherwise. */
bool parseInFile(std::string filename);
/* Prints ruleset structure to a file.
@returns True if file write is successful; false, otherwise. */
bool generateOutFile(std::string filename);
private:
Dataset * m_data;
std::size_t m_numAttributes;
/* parseFile HELPER: Parses format line. */
void parseFormat(std::istream& file);
/* parseFile HELPER: Parses header line. */
void parseHeader(std::istream& file);
/* parseFile HELPER: Removes comments. */
std::string removeComments(std::istream & file);
};
#endif