-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkflow_parser.h
42 lines (38 loc) · 1.34 KB
/
workflow_parser.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
#pragma once
#include <fstream>
#include <string>
#include <list>
#include <vector>
#include <iostream>
namespace wkfw{
class WorkflowParser{
public:
WorkflowParser(const std::string& filename);
WorkflowParser(){}
void operator=(WorkflowParser other);
WorkflowParser(const WorkflowParser& other){
instruction = other.instruction;
blocks = other.blocks;
isInputValid = other.isInputValid;
exception = other.exception;
}
std::string exception;
std::list<uint32_t> instruction;
std::vector<std::string> blocks;
bool isInputValid = true;
private:
int getInstruction(std::string& line);
std::vector<bool> blocksRange;
void WorkflowParserException(std::string msg) {
isInputValid = false;
exception += "WorkflowParser exception: " + msg + "\n";
}
int getBlock(std::string& line);
void getFromFile(const std::string& filename);
int deleteWhiteSpaces(std::string& line);
int addElemInstruction(uint32_t& count, bool& isLastCount);
void dataOptimize(void);
void deleteTwins(void);
void deleteNoUsedBlocks();
};
}