retdec-cpp
Public Types | Protected Attributes | List of all members
retdec::ResourceArguments Class Reference

Base class of arguments for all services. More...

#include <resource_arguments.h>

Inheritance diagram for retdec::ResourceArguments:
retdec::AnalysisArguments retdec::DecompilationArguments

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...
 
ResourceArgumentsoperator= (const ResourceArguments &other)
 Copy-assigns the given arguments. More...
 
ResourceArgumentsoperator= (ResourceArguments &&other)
 Move-assigns the given arguments. More...
 
 ~ResourceArguments ()
 Destructs the arguments. More...
 
Generic Access To Arguments
ResourceArgumentsargument (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
ResourceArgumentsfile (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< Filefile (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...
 

Detailed Description

Base class of arguments for all services.

Member Typedef Documentation

using retdec::ResourceArguments::ArgumentIterator = Arguments::const_iterator

Iterator for arguments.

using retdec::ResourceArguments::FileIterator = Files::const_iterator

Iterator for files.

Constructor & Destructor Documentation

retdec::ResourceArguments::ResourceArguments ( )
default

Constructs default arguments.

retdec::ResourceArguments::ResourceArguments ( const ResourceArguments other)
default

Copy-constructs arguments from the given arguments.

retdec::ResourceArguments::ResourceArguments ( ResourceArguments &&  other)
default

Move-constructs arguments from the given arguments.

retdec::ResourceArguments::~ResourceArguments ( )
default

Destructs the arguments.

Member Function Documentation

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?

ResourceArguments & retdec::ResourceArguments::operator= ( const ResourceArguments other)
default

Copy-assigns the given arguments.

ResourceArguments & retdec::ResourceArguments::operator= ( ResourceArguments &&  other)
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.

Member Data Documentation

Arguments retdec::ResourceArguments::arguments
protected

Arguments.

Files retdec::ResourceArguments::files
protected

Files.


The documentation for this class was generated from the following files: