retdec-cpp
decompilation_arguments.h
Go to the documentation of this file.
1 
8 #ifndef RETDEC_DECOMPILATION_ARGUMENTS_H
9 #define RETDEC_DECOMPILATION_ARGUMENTS_H
10 
11 #include <map>
12 #include <memory>
13 #include <string>
14 
16 
17 namespace retdec {
18 
23 public:
33 
36  DecompilationArguments &mode(const std::string &mode);
37  DecompilationArguments withMode(const std::string &mode) const;
38  bool hasMode() const;
39  std::string mode() const;
41 
44  DecompilationArguments &selDecompRanges(const std::string &ranges);
45  DecompilationArguments withSelDecompRanges(const std::string &ranges);
46  bool hasSelDecompRanges() const;
47  std::string selDecompRanges() const;
49 
52  DecompilationArguments &selDecompDecoding(const std::string &decoding);
53  DecompilationArguments withSelDecompDecoding(const std::string &decoding);
54  bool hasSelDecompDecoding() const;
55  std::string selDecompDecoding() const;
57 
60  DecompilationArguments &inputFile(const std::shared_ptr<File> &file);
61  DecompilationArguments withInputFile(const std::shared_ptr<File> &file) const;
62  bool hasInputFile() const;
63  std::shared_ptr<File> inputFile() const;
65 
69  DecompilationArguments &argument(const std::string &id,
70  const std::string &value);
71  DecompilationArguments withArgument(const std::string &id,
72  const std::string &value) const;
74 
78  DecompilationArguments &file(const std::string &id,
79  const std::shared_ptr<File> &file);
80  DecompilationArguments withFile(const std::string &id,
81  const std::shared_ptr<File> &file) const;
83 };
84 
85 } // namespace retdec
86 
87 #endif
bool hasInputFile() const
Is the input file set?
Definition: decompilation_arguments.cpp:197
DecompilationArguments & argument(const std::string &id, const std::string &value)
Sets the argument of the given ID to the given value.
Definition: decompilation_arguments.cpp:211
The namespace of the library.
Definition: doxygen.h:8
Arguments for decompilations.
Definition: decompilation_arguments.h:22
DecompilationArguments withSelDecompRanges(const std::string &ranges)
Returns a copy of the arguments with a different ranges for selective decompilation.
Definition: decompilation_arguments.cpp:128
Base class of arguments for all services.
Definition: resource_arguments.h:22
bool hasSelDecompRanges() const
Are the ranges for selective decompilation set?
Definition: decompilation_arguments.cpp:136
DecompilationArguments withMode(const std::string &mode) const
Returns a copy of the arguments with a different mode.
Definition: decompilation_arguments.cpp:82
ResourceArguments & file(const std::string &id, const std::shared_ptr< File > &file)
Sets the file of the given ID to the given value.
Definition: resource_arguments.cpp:101
std::string selDecompDecoding() const
Returns the type of decoding for selective decompilation.
Definition: decompilation_arguments.cpp:174
DecompilationArguments & operator=(const DecompilationArguments &other)
Copy-assigns the given arguments.
Base class of arguments for all services.
DecompilationArguments()
Constructs default arguments.
DecompilationArguments & file(const std::string &id, const std::shared_ptr< File > &file)
Sets the file of the given ID to the given value.
Definition: decompilation_arguments.cpp:231
std::shared_ptr< File > inputFile() const
Returns the input file.
Definition: decompilation_arguments.cpp:204
bool hasMode() const
Is the mode set?
Definition: decompilation_arguments.cpp:90
DecompilationArguments withSelDecompDecoding(const std::string &decoding)
Returns a copy of the arguments with a different type of decoding for selective decompilation.
Definition: decompilation_arguments.cpp:159
DecompilationArguments withFile(const std::string &id, const std::shared_ptr< File > &file) const
Returns a copy of the files with a differing file of the given ID.
Definition: decompilation_arguments.cpp:241
std::string selDecompRanges() const
Returns the ranges for selective decompilation.
Definition: decompilation_arguments.cpp:143
ResourceArguments & argument(const std::string &id, const std::string &value)
Sets the argument of the given ID to the given value.
Definition: resource_arguments.cpp:52
bool hasSelDecompDecoding() const
Is the type of decoding for selective decompilation set?
Definition: decompilation_arguments.cpp:167
DecompilationArguments withInputFile(const std::shared_ptr< File > &file) const
Returns a copy of the arguments with a different input file.
Definition: decompilation_arguments.cpp:189
~DecompilationArguments()
Destructs the arguments.
DecompilationArguments withArgument(const std::string &id, const std::string &value) const
Returns a copy of the arguments with a differing argument of the given ID.
Definition: decompilation_arguments.cpp:221
std::string mode() const
Returns the mode.
Definition: decompilation_arguments.cpp:97