retdec-cpp
List of all members
retdec::DecompilationArguments Class Reference

Arguments for decompilations. More...

#include <decompilation_arguments.h>

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

Public Member Functions

Construction, Assignment, and Destruction
 DecompilationArguments ()
 Constructs default arguments. More...
 
 DecompilationArguments (const DecompilationArguments &other)
 Copy-constructs arguments from the given arguments. More...
 
 DecompilationArguments (DecompilationArguments &&other)
 Move-constructs arguments from the given arguments. More...
 
DecompilationArgumentsoperator= (const DecompilationArguments &other)
 Copy-assigns the given arguments. More...
 
DecompilationArgumentsoperator= (DecompilationArguments &&other)
 Move-assigns the given arguments. More...
 
 ~DecompilationArguments ()
 Destructs the arguments. More...
 
Mode
DecompilationArgumentsmode (const std::string &mode)
 Sets the mode. More...
 
DecompilationArguments withMode (const std::string &mode) const
 Returns a copy of the arguments with a different mode. More...
 
bool hasMode () const
 Is the mode set? More...
 
std::string mode () const
 Returns the mode. More...
 
Selective Decompilation: Ranges
DecompilationArgumentsselDecompRanges (const std::string &ranges)
 Sets ranges for selective decompilation. More...
 
DecompilationArguments withSelDecompRanges (const std::string &ranges)
 Returns a copy of the arguments with a different ranges for selective decompilation. More...
 
bool hasSelDecompRanges () const
 Are the ranges for selective decompilation set? More...
 
std::string selDecompRanges () const
 Returns the ranges for selective decompilation. More...
 
Selective Decompilation: Decoding
DecompilationArgumentsselDecompDecoding (const std::string &decoding)
 Sets type of decoding for selective decompilation. More...
 
DecompilationArguments withSelDecompDecoding (const std::string &decoding)
 Returns a copy of the arguments with a different type of decoding for selective decompilation. More...
 
bool hasSelDecompDecoding () const
 Is the type of decoding for selective decompilation set? More...
 
std::string selDecompDecoding () const
 Returns the type of decoding for selective decompilation. More...
 
Files: Input
DecompilationArgumentsinputFile (const std::shared_ptr< File > &file)
 Sets the input file. More...
 
DecompilationArguments withInputFile (const std::shared_ptr< File > &file) const
 Returns a copy of the arguments with a different input file. More...
 
bool hasInputFile () const
 Is the input file set? More...
 
std::shared_ptr< FileinputFile () const
 Returns the input file. More...
 
Generic Access To Arguments
DecompilationArgumentsargument (const std::string &id, const std::string &value)
 Sets the argument of the given ID to the given value. More...
 
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. More...
 
Generic Access To Files
DecompilationArgumentsfile (const std::string &id, const std::shared_ptr< File > &file)
 Sets the file of the given ID to the given value. More...
 
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. More...
 
- Public Member Functions inherited from retdec::ResourceArguments
 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...
 
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...
 
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...
 

Additional Inherited Members

- Public Types inherited from retdec::ResourceArguments
using ArgumentIterator = Arguments::const_iterator
 Iterator for arguments. More...
 
using FileIterator = Files::const_iterator
 Iterator for files. More...
 
- Protected Attributes inherited from retdec::ResourceArguments
Arguments arguments
 Arguments. More...
 
Files files
 Files. More...
 

Detailed Description

Arguments for decompilations.

Constructor & Destructor Documentation

retdec::DecompilationArguments::DecompilationArguments ( )
default

Constructs default arguments.

retdec::DecompilationArguments::DecompilationArguments ( const DecompilationArguments other)
default

Copy-constructs arguments from the given arguments.

retdec::DecompilationArguments::DecompilationArguments ( DecompilationArguments &&  other)
default

Move-constructs arguments from the given arguments.

retdec::DecompilationArguments::~DecompilationArguments ( )
default

Destructs the arguments.

Member Function Documentation

DecompilationArguments & retdec::DecompilationArguments::argument ( const std::string &  id,
const std::string &  value 
)

Sets the argument of the given ID to the given value.

DecompilationArguments & retdec::DecompilationArguments::file ( const std::string &  id,
const std::shared_ptr< File > &  file 
)

Sets the file of the given ID to the given value.

bool retdec::DecompilationArguments::hasInputFile ( ) const

Is the input file set?

bool retdec::DecompilationArguments::hasMode ( ) const

Is the mode set?

bool retdec::DecompilationArguments::hasSelDecompDecoding ( ) const

Is the type of decoding for selective decompilation set?

bool retdec::DecompilationArguments::hasSelDecompRanges ( ) const

Are the ranges for selective decompilation set?

DecompilationArguments & retdec::DecompilationArguments::inputFile ( const std::shared_ptr< File > &  file)

Sets the input file.

std::shared_ptr< File > retdec::DecompilationArguments::inputFile ( ) const

Returns the input file.

DecompilationArguments & retdec::DecompilationArguments::mode ( const std::string &  mode)

Sets the mode.

Available modes are:

  • bin: Decompilation of a binary file in the ELF or WinPE format.
  • c: Decompilation of a C file.
std::string retdec::DecompilationArguments::mode ( ) const

Returns the mode.

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

Copy-assigns the given arguments.

DecompilationArguments & retdec::DecompilationArguments::operator= ( DecompilationArguments &&  other)
default

Move-assigns the given arguments.

DecompilationArguments & retdec::DecompilationArguments::selDecompDecoding ( const std::string &  decoding)

Sets type of decoding for selective decompilation.

std::string retdec::DecompilationArguments::selDecompDecoding ( ) const

Returns the type of decoding for selective decompilation.

DecompilationArguments & retdec::DecompilationArguments::selDecompRanges ( const std::string &  ranges)

Sets ranges for selective decompilation.

Each range is of the form ADDRESS-ADDRESS, where ADDRESS is a non-negative hexadecimal number. The ranges have to be divided by commas. The addresses are case-insensitive, so 0xFF is the same as 0xff. The addresses can be surrounded by spaces.

Examples
args.selDecompRanges("0x0-0xffff")
args.selDecompRanges("0x0-0x2eef,0x3000-0x4fff")
args.selDecompRanges(" 0x0 - 0xfa, 0xFC - 0xFF ")
std::string retdec::DecompilationArguments::selDecompRanges ( ) const

Returns the ranges for selective decompilation.

DecompilationArguments retdec::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.

DecompilationArguments retdec::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.

DecompilationArguments retdec::DecompilationArguments::withInputFile ( const std::shared_ptr< File > &  file) const

Returns a copy of the arguments with a different input file.

DecompilationArguments retdec::DecompilationArguments::withMode ( const std::string &  mode) const

Returns a copy of the arguments with a different mode.

See the description of mode(const std::string &mode) for more details.

DecompilationArguments retdec::DecompilationArguments::withSelDecompDecoding ( const std::string &  decoding)

Returns a copy of the arguments with a different type of decoding for selective decompilation.

DecompilationArguments retdec::DecompilationArguments::withSelDecompRanges ( const std::string &  ranges)

Returns a copy of the arguments with a different ranges for selective decompilation.

See the description of selDecompRanges(const std::string &ranges) for more details.


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