retdec
name_generator.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_LOADER_UTILS_NAME_GENERATOR_H
8 #define RETDEC_LOADER_UTILS_NAME_GENERATOR_H
9 
10 #include <cstdint>
11 #include <string>
12 
13 namespace retdec {
14 namespace loader {
15 
22 {
23 public:
24  NameGenerator(char fill = '0', std::uint32_t numWidth = 0);
25  NameGenerator(const std::string& prefix, char fill = ' ', std::uint32_t numWidth = 0);
26 
27  std::string getNextName();
28 
29 private:
30  std::string _prefix;
31  char _fill;
32  std::uint32_t _numWidth;
33  std::uint32_t _counter;
34 };
35 
36 } // namespace loader
37 } // namespace retdec
38 
39 #endif
Definition: name_generator.h:22
std::string getNextName()
Definition: name_generator.cpp:44
NameGenerator(char fill='0', std::uint32_t numWidth=0)
Definition: name_generator.cpp:21
std::uint32_t _numWidth
Definition: name_generator.h:32
std::uint32_t _counter
Definition: name_generator.h:33
std::string _prefix
Definition: name_generator.h:30
char _fill
Definition: name_generator.h:31
Generic loader.
Definition: archive_wrapper.h:19