source: icGREP/icgrep-devel/icgrep/pablo/symbol_generator.h @ 4432

Last change on this file since 4432 was 4432, checked in by nmedfort, 5 years ago

Temporary check in.

File size: 891 bytes
Line 
1/*
2 *  Copyright (c) 2014 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef SYMBOL_GENERATOR_H
8#define SYMBOL_GENERATOR_H
9
10#include <pablo/pabloAST.h>
11#include <string>
12#include <unordered_map>
13
14namespace pablo {
15
16class String;
17class Integer;
18
19class SymbolGenerator {
20    friend class PabloBlock;
21public:
22    typedef u_int64_t integer_t;
23    String * get(const std::string name);
24    String * make(const std::string prefix);
25    Integer * getInteger(const integer_t value);
26    ~SymbolGenerator();
27protected:
28    SymbolGenerator();   
29private:
30    std::unordered_map<std::string, unsigned>   mPrefixMap;   
31    std::unordered_map<std::string, String *>   mStringMap;
32    std::unordered_map<integer_t, Integer *>    mIntegerMap;
33};
34
35}
36
37#endif // SYMBOL_GENERATOR_H
Note: See TracBrowser for help on using the repository browser.