Repository navigation
Expand file tree
/
Copy pathInput.h
More file actions
49 lines (41 loc) · 1.39 KB
/
Copy pathInput.h
File metadata and controls
49 lines (41 loc) · 1.39 KB
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
47
48
49
/************************************************
Name: CC2CL
File: Input.h
Description: CC Wrapper
Product: Microsoft Visual C++
Copyright (c) Microsoft Corporation. All rights reserved.
This source code is intended only as a supplement to Microsoft
Development Tools and/or on-line documentation. See these other
materials for detailed information regarding Microsoft code samples.
THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Notes:
The users PATH must be set with where ever cl.exe is.
*************************************************/
#include <vector>
#include <utility>
#include <string>
#include "ReturnItem.h"
#include "VCOption.h"
using namespace std;
/* There are two states.
CCSTATE means that we are reading information about the "other" compiler switches.
VCSTATE means that we are reading information about the VC switches. */
#define CCSTATE (0)
#define VCSTATE (1)
#define LINESIZE (80)
class Input
{
public:
Input() {};
~Input() {};
int ReadInputFile(char const *fileName);
int CreatePairsFromCode();
ReturnItem BestMapping(string &origOpt);
private:
bool AddPair(string other, string vc, bool space = true);
bool AddPair(string other, string vc, ERRTYPE error);
vector<pair<string, VCOption> > optionPairs;
};