8 #ifndef RETDEC_RESOURCE_ARGUMENTS_H 9 #define RETDEC_RESOURCE_ARGUMENTS_H 25 using Arguments = std::map<std::string, std::string>;
28 using Files = std::map<std::string, std::shared_ptr<File>>;
51 const std::string &value);
53 const std::string &value)
const;
55 std::string
argument(
const std::string &
id)
const;
63 const std::shared_ptr<File> &
file);
65 const std::shared_ptr<File> &
file)
const;
66 bool hasFile(
const std::string &
id)
const;
67 std::shared_ptr<File>
file(
const std::string &
id)
const;
The namespace of the library.
Definition: doxygen.h:8
FileIterator filesBegin() const
Returns an iterator to the beginning of arguments.
Definition: resource_arguments.cpp:136
Base class of arguments for all services.
Definition: resource_arguments.h:22
bool hasArgument(const std::string &id) const
Is an argument of the given ID present?
Definition: resource_arguments.cpp:71
ResourceArguments 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: resource_arguments.cpp:61
Files::const_iterator FileIterator
Iterator for files.
Definition: resource_arguments.h:35
ArgumentIterator argumentsEnd() const
Returns an iterator past the last argument.
Definition: resource_arguments.cpp:94
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
ResourceArguments 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: resource_arguments.cpp:110
ArgumentIterator argumentsBegin() const
Returns an iterator to the beginning of arguments.
Definition: resource_arguments.cpp:87
~ResourceArguments()
Destructs the arguments.
Files files
Files.
Definition: resource_arguments.h:77
Arguments::const_iterator ArgumentIterator
Iterator for arguments.
Definition: resource_arguments.h:32
bool hasFile(const std::string &id) const
Is a file of the given ID present?
Definition: resource_arguments.cpp:120
ResourceArguments()
Constructs default arguments.
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 arguments
Arguments.
Definition: resource_arguments.h:74
ResourceArguments & operator=(const ResourceArguments &other)
Copy-assigns the given arguments.
FileIterator filesEnd() const
Returns an iterator past the last argument.
Definition: resource_arguments.cpp:143