retdec
Public Member Functions | Private Types | Private Attributes | List of all members
retdec::ctypes::Module Class Reference

Storage for C functions. More...

#include <module.h>

Collaboration diagram for retdec::ctypes::Module:
Collaboration graph
[legend]

Public Member Functions

 Module (const std::shared_ptr< Context > &context)
 Constructs a new module. More...
 
bool hasFunctionWithName (const std::string &name) const
 Checks if module contains function. More...
 
std::shared_ptr< FunctiongetFunctionWithName (const std::string &name) const
 Returns function from module. More...
 
void addFunction (const std::shared_ptr< Function > &function)
 Adds new function to module. More...
 
std::shared_ptr< ContextgetContext () const
 

Private Types

using Functions = std::unordered_map< std::string, std::shared_ptr< Function > >
 

Private Attributes

std::shared_ptr< Contextcontext
 Container for all functions and types. More...
 
Functions functions
 Container for functions in this module. More...
 

Detailed Description

Storage for C functions.

Member Typedef Documentation

◆ Functions

using retdec::ctypes::Module::Functions = std::unordered_map<std::string, std::shared_ptr<Function> >
private

Constructor & Destructor Documentation

◆ Module()

retdec::ctypes::Module::Module ( const std::shared_ptr< Context > &  context)
explicit

Constructs a new module.

Member Function Documentation

◆ addFunction()

void retdec::ctypes::Module::addFunction ( const std::shared_ptr< Function > &  function)

Adds new function to module.

Preconditions
  • function is not null

◆ getContext()

std::shared_ptr< Context > retdec::ctypes::Module::getContext ( ) const

◆ getFunctionWithName()

std::shared_ptr< Function > retdec::ctypes::Module::getFunctionWithName ( const std::string &  name) const

Returns function from module.

Returns
Requested function. If it is not in module return null.

◆ hasFunctionWithName()

bool retdec::ctypes::Module::hasFunctionWithName ( const std::string &  name) const

Checks if module contains function.

Member Data Documentation

◆ context

std::shared_ptr<Context> retdec::ctypes::Module::context
private

Container for all functions and types.

◆ functions

Functions retdec::ctypes::Module::functions
private

Container for functions in this module.


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