-
Notifications
You must be signed in to change notification settings - Fork 1
/
OCR.h
46 lines (40 loc) · 1.19 KB
/
OCR.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
46
/*
* OCR.h
*
* Created on: Nov 28, 2011
* Author: Aaron Maturen
*/
#ifndef OCR_H_
#define OCR_H_
#pragma once
#include <string>
#include <math.h>
#include <bitset>
#include <algorithm>
class OCR {
public:
OCR();
virtual ~OCR();
std::string parseLine(std::string);
std::string serializeScannedCharacter(std::string, std::string, std::string, std::string);
char processScannedCharacter(std::string, std::string, std::string, std::string);
char translateScannedCharacter(int);
int bin2dec(std::string);
std::string convertScannedLines(std::string, std::string, std::string, std::string);
std::string validateAccount(std::string);
std::string dec2bin(const int);
bool checkAccountForMissingValues(std::string);
bool checkAccountSum(std::string);
int processCheckSum(std::string);
std::bitset<12> newBitStream(std::string);
std::bitset<12> newBitStream(int);
std::bitset<12> newBitStream(std::bitset<12>);
int compareBitStreams(std::bitset<12>, std::bitset<12>);
std::string fixMissingDigit(std::string);
std::string fixBadCheckSum(std::string);
int countUnknownCharacters(std::string);
std::string formatMultipleAMBSolutions(std::string,std::string);
private:
int numbers[10];
};
#endif