forked from srcML/stereocode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrimitiveTypes.hpp
34 lines (28 loc) · 1022 Bytes
/
PrimitiveTypes.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
// SPDX-License-Identifier: GPL-3.0-only
/**
* @file PrimitiveTypes.hpp
*
* @copyright Copyright (C) 2021-2024 srcML, LLC. (www.srcML.org)
*
* This file is part of the Stereocode application.
*/
#ifndef PRIMITIVETYPES_HPP
#define PRIMITIVETYPES_HPP
#include <string>
#include <fstream>
#include <unordered_set>
#include <unordered_map>
#include <vector>
#include <iostream>
class primitiveTypes {
public:
bool isPrimitive (const std::string&, const std::string&);
void addPrimitive (const std::string&);
void createPrimitiveList ();
void outputPrimitives ();
friend std::istream& operator>> (std::istream&, primitiveTypes&);
private:
std::unordered_map<std::string, std::unordered_set<std::string>> ptypes; // List of primitives
std::unordered_set<std::string> userTypes; // List of user-defined primitives
};
#endif