retdec-cpp
analysis_arguments.h
Go to the documentation of this file.
1 
8 #ifndef RETDEC_ANALYSIS_ARGUMENTS_H
9 #define RETDEC_ANALYSIS_ARGUMENTS_H
10 
11 #include <map>
12 #include <memory>
13 #include <string>
14 
16 
17 namespace retdec {
18 
23 public:
33 
36  AnalysisArguments &verbose(const std::string &verbose);
37  AnalysisArguments withVerbose(const std::string &verbose) const;
38  bool hasVerbose() const;
39  std::string verbose() const;
41 
44  AnalysisArguments &inputFile(const std::shared_ptr<File> &file);
45  AnalysisArguments withInputFile(const std::shared_ptr<File> &file) const;
46  bool hasInputFile() const;
47  std::shared_ptr<File> inputFile() const;
49 
53  AnalysisArguments &argument(const std::string &id,
54  const std::string &value);
55  AnalysisArguments withArgument(const std::string &id,
56  const std::string &value) const;
58 
62  AnalysisArguments &file(const std::string &id,
63  const std::shared_ptr<File> &file);
64  AnalysisArguments withFile(const std::string &id,
65  const std::shared_ptr<File> &file) const;
67 };
68 
69 } // namespace retdec
70 
71 #endif
AnalysisArguments withInputFile(const std::shared_ptr< File > &file) const
Returns a copy of the arguments with a different input file.
Definition: analysis_arguments.cpp:107
The namespace of the library.
Definition: doxygen.h:8
Base class of arguments for all services.
Definition: resource_arguments.h:22
AnalysisArguments & operator=(const AnalysisArguments &other)
Copy-assigns the given arguments.
AnalysisArguments withVerbose(const std::string &verbose) const
Returns a copy of the arguments with a verbose mode.
Definition: analysis_arguments.cpp:75
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
AnalysisArguments & file(const std::string &id, const std::shared_ptr< File > &file)
Sets the file of the given ID to the given value.
Definition: analysis_arguments.cpp:149
bool hasInputFile() const
Is the input file set?
Definition: analysis_arguments.cpp:115
AnalysisArguments()
Constructs default arguments.
std::string verbose() const
Should the analysis be run in the verbose mode?
Definition: analysis_arguments.cpp:92
std::shared_ptr< File > inputFile() const
Returns the input file.
Definition: analysis_arguments.cpp:122
Base class of arguments for all services.
AnalysisArguments & argument(const std::string &id, const std::string &value)
Sets the argument of the given ID to the given value.
Definition: analysis_arguments.cpp:129
~AnalysisArguments()
Destructs the arguments.
AnalysisArguments 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: analysis_arguments.cpp:159
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
Arguments for analyses.
Definition: analysis_arguments.h:22
AnalysisArguments 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: analysis_arguments.cpp:139
bool hasVerbose() const
Is the verbose argument set?
Definition: analysis_arguments.cpp:85