forked from srcML/stereocode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTypeModifiers.hpp
36 lines (30 loc) · 1.11 KB
/
TypeModifiers.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
// SPDX-License-Identifier: GPL-3.0-only
/**
* @file TypeModifiers.hpp
*
* @copyright Copyright (C) 2021-2024 srcML, LLC. (www.srcML.org)
*
* This file is part of the Stereocode application.
*/
#ifndef TYPEMODIFIERS_HPP
#define TYPEMODIFIERS_HPP
#include <string>
#include <fstream>
#include <unordered_set>
#include <unordered_map>
#include <vector>
#include <cctype>
#include <iostream>
class typeModifiers {
public:
const std::string& getTypeModifiers (const std::string&) const;
void addTypeModifier (const std::string&);
void createModifierList ();
void outputModifiers ();
friend std::istream& operator>> (std::istream&, typeModifiers&);
private:
std::unordered_map<std::string, std::unordered_set<std::string>> mtypes; // List of type modifiers
std::unordered_set<std::string> userMtypes; // List of user defined type modifiers
std::unordered_map<std::string, std::string> patterns;
};
#endif