Flutter Engine
The Flutter Engine
SkSLMangler.h
Go to the documentation of this file.
1/*
2 * Copyright 2021 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SKSL_MANGLER
9#define SKSL_MANGLER
10
11#include <string>
12#include <string_view>
13
14namespace SkSL {
15
16class SymbolTable;
17
18class Mangler {
19public:
20 /**
21 * Mangles baseName to create a name that is unique within symbolTable.
22 */
23 std::string uniqueName(std::string_view baseName, SymbolTable* symbolTable);
24
25 void reset() {
26 fCounter = 0;
27 }
28
29private:
30 int fCounter = 0;
31};
32
33} // namespace SkSL
34
35#endif
std::string uniqueName(std::string_view baseName, SymbolTable *symbolTable)
Definition: SkSLMangler.cpp:21
void reset()
Definition: SkSLMangler.h:25