blob: 8c0dd5e6e00f4e29f29881d02607c2c2a358db21 (
plain)
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
|
/*
* Copyright 2021 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SKSL_MANGLER
#define SKSL_MANGLER
#include <string>
#include <string_view>
namespace SkSL {
class SymbolTable;
class Mangler {
public:
/**
* Mangles baseName to create a name that is unique within symbolTable.
*/
std::string uniqueName(std::string_view baseName, SymbolTable* symbolTable);
void reset() {
fCounter = 0;
}
private:
int fCounter = 0;
};
} // namespace SkSL
#endif
|