retdec-cpp
|
Base class of arguments for all services. More...
#include <resource_arguments.h>
Public Types | |
using | ArgumentIterator = Arguments::const_iterator |
Iterator for arguments. More... | |
using | FileIterator = Files::const_iterator |
Iterator for files. More... | |
Public Member Functions | |
Construction, Assignment, and Destruction | |
ResourceArguments () | |
Constructs default arguments. More... | |
ResourceArguments (const ResourceArguments &other) | |
Copy-constructs arguments from the given arguments. More... | |
ResourceArguments (ResourceArguments &&other) | |
Move-constructs arguments from the given arguments. More... | |
ResourceArguments & | operator= (const ResourceArguments &other) |
Copy-assigns the given arguments. More... | |
ResourceArguments & | operator= (ResourceArguments &&other) |
Move-assigns the given arguments. More... | |
~ResourceArguments () | |
Destructs the arguments. More... | |
Generic Access To Arguments | |
ResourceArguments & | argument (const std::string &id, const std::string &value) |
Sets the argument of the given ID to the given value. More... | |
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. More... | |
bool | hasArgument (const std::string &id) const |
Is an argument of the given ID present? More... | |
std::string | argument (const std::string &id) const |
Returns the value of the given argument. More... | |
ArgumentIterator | argumentsBegin () const |
Returns an iterator to the beginning of arguments. More... | |
ArgumentIterator | argumentsEnd () const |
Returns an iterator past the last argument. More... | |
Generic Access To Files | |
ResourceArguments & | file (const std::string &id, const std::shared_ptr< File > &file) |
Sets the file of the given ID to the given value. More... | |
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. More... | |
bool | hasFile (const std::string &id) const |
Is a file of the given ID present? More... | |
std::shared_ptr< File > | file (const std::string &id) const |
Returns the file of the given ID. More... | |
FileIterator | filesBegin () const |
Returns an iterator to the beginning of arguments. More... | |
FileIterator | filesEnd () const |
Returns an iterator past the last argument. More... | |
Protected Attributes | |
Arguments | arguments |
Arguments. More... | |
Files | files |
Files. More... | |
Base class of arguments for all services.
using retdec::ResourceArguments::ArgumentIterator = Arguments::const_iterator |
Iterator for arguments.
using retdec::ResourceArguments::FileIterator = Files::const_iterator |
Iterator for files.
|
default |
Constructs default arguments.
|
default |
Copy-constructs arguments from the given arguments.
|
default |
Move-constructs arguments from the given arguments.
|
default |
Destructs the arguments.
ResourceArguments & retdec::ResourceArguments::argument | ( | const std::string & | id, |
const std::string & | value | ||
) |
Sets the argument of the given ID to the given value.
std::string retdec::ResourceArguments::argument | ( | const std::string & | id | ) | const |
Returns the value of the given argument.
If there is no such argument, it returns the empty string.
ResourceArguments::ArgumentIterator retdec::ResourceArguments::argumentsBegin | ( | ) | const |
Returns an iterator to the beginning of arguments.
ResourceArguments::ArgumentIterator retdec::ResourceArguments::argumentsEnd | ( | ) | const |
Returns an iterator past the last argument.
ResourceArguments & retdec::ResourceArguments::file | ( | const std::string & | id, |
const std::shared_ptr< File > & | file | ||
) |
Sets the file of the given ID to the given value.
std::shared_ptr< File > retdec::ResourceArguments::file | ( | const std::string & | id | ) | const |
Returns the file of the given ID.
If there is no such file, it returns the null pointer.
ResourceArguments::FileIterator retdec::ResourceArguments::filesBegin | ( | ) | const |
Returns an iterator to the beginning of arguments.
ResourceArguments::FileIterator retdec::ResourceArguments::filesEnd | ( | ) | const |
Returns an iterator past the last argument.
bool retdec::ResourceArguments::hasArgument | ( | const std::string & | id | ) | const |
Is an argument of the given ID present?
bool retdec::ResourceArguments::hasFile | ( | const std::string & | id | ) | const |
Is a file of the given ID present?
|
default |
Copy-assigns the given arguments.
|
default |
Move-assigns the given arguments.
ResourceArguments retdec::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.
ResourceArguments retdec::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.
|
protected |
Arguments.
|
protected |
Files.