A generator of variable names of the form prefixN
, where N
is a number.
More...
#include <num_var_name_gen.h>
|
virtual std::string | getId () const override |
| Returns the ID of the generator. More...
|
|
virtual void | restart () override |
| Restarts the generator to start returning variable names from the beginning. More...
|
|
virtual std::string | getNextVarName () override |
| Returns a next variable name. More...
|
|
virtual | ~VarNameGen ()=default |
|
const std::string & | getPrefix () const |
| Returns the prefix used by the generator. More...
|
|
A generator of variable names of the form prefixN
, where N
is a number.
Use create() to create instances.
◆ NumVarNameGen()
retdec::llvmir2hll::NumVarNameGen::NumVarNameGen |
( |
std::string |
prefix | ) |
|
|
private |
◆ create()
UPtr< VarNameGen > retdec::llvmir2hll::NumVarNameGen::create |
( |
std::string |
prefix = "var" | ) |
|
|
static |
Creates a new NumVarNameGen object.
- Parameters
-
[in] | prefix | Prefix of all returned variable names. |
The getNextVarName() function then returns variable names of the form prefixN
, where N is a number.
◆ getId()
std::string retdec::llvmir2hll::NumVarNameGen::getId |
( |
| ) |
const |
|
overridevirtual |
◆ getNextVarName()
std::string retdec::llvmir2hll::NumVarNameGen::getNextVarName |
( |
| ) |
|
|
overridevirtual |
Returns a next variable name.
If there is no next variable name available, the generator starts generating names from the beginning.
Implements retdec::llvmir2hll::VarNameGen.
◆ restart()
void retdec::llvmir2hll::NumVarNameGen::restart |
( |
| ) |
|
|
overridevirtual |
Restarts the generator to start returning variable names from the beginning.
Note that there is no requirement for this class to return variable names in the same order between consecutive calls to this function.
Implements retdec::llvmir2hll::VarNameGen.
◆ nextVarNum
unsigned retdec::llvmir2hll::NumVarNameGen::nextVarNum |
|
private |
Next variable number to be used.
The documentation for this class was generated from the following files:
- /var/cache/acbs/build/acbs.6bu6osb6/retdec/include/retdec/llvmir2hll/var_name_gen/var_name_gens/num_var_name_gen.h
- /var/cache/acbs/build/acbs.6bu6osb6/retdec/src/llvmir2hll/var_name_gen/var_name_gens/num_var_name_gen.cpp