retdec
|
#include <name_generator.h>
Public Member Functions | |
NameGenerator (char fill='0', std::uint32_t numWidth=0) | |
NameGenerator (const std::string &prefix, char fill=' ', std::uint32_t numWidth=0) | |
std::string | getNextName () |
Private Attributes | |
std::string | _prefix |
char | _fill |
std::uint32_t | _numWidth |
std::uint32_t | _counter |
This class represents the unique name generator, where uniqueness is achieved through increasing sequence of numbers starting from 0. Name generator can be given prefix string, which is prepended to numbers from sequence.
retdec::loader::NameGenerator::NameGenerator | ( | char | fill = '0' , |
std::uint32_t | numWidth = 0 |
||
) |
Creates name generator with no prefix and optionally can be given fill character and number width.
fill | The character that is used to fill the width of number. |
numWidth | The width of the number. |
retdec::loader::NameGenerator::NameGenerator | ( | const std::string & | prefix, |
char | fill = ' ' , |
||
std::uint32_t | numWidth = 0 |
||
) |
Creates name generator with specified prefix and optionally can be given fill character and number width.
prefix | The prefix of the name. |
fill | The character that is used to fill the width of number. |
numWidth | The width of the number. |
std::string retdec::loader::NameGenerator::getNextName | ( | ) |
Returns the next name from the sequence. Name is of string type and in format
|
private |
|
private |
|
private |
|
private |