LIEF: Library to Instrument Executable Formats Version 0.15.1
Loading...
Searching...
No Matches
LIEF::PE::DataDirectory Class Reference

Class that represents a PE data directory entry. More...

#include <DataDirectory.hpp>

Inheritance diagram for LIEF::PE::DataDirectory:
Collaboration diagram for LIEF::PE::DataDirectory:

Public Types

enum class  TYPES : uint32_t {
  EXPORT_TABLE = 0 , IMPORT_TABLE , RESOURCE_TABLE , EXCEPTION_TABLE ,
  CERTIFICATE_TABLE , BASE_RELOCATION_TABLE , DEBUG_DIR , ARCHITECTURE ,
  GLOBAL_PTR , TLS_TABLE , LOAD_CONFIG_TABLE , BOUND_IMPORT ,
  IAT , DELAY_IMPORT_DESCRIPTOR , CLR_RUNTIME_HEADER , RESERVED ,
  UNKNOWN
}
 
- Public Types inherited from LIEF::Object
template<class T >
using output_t = add_pointer_t<decay_t<T>>
 
template<class T >
using output_const_t = add_pointer_t<add_const_t<decay_t<T>>>
 

Public Member Functions

 DataDirectory ()=default
 
 DataDirectory (TYPES type)
 
 DataDirectory (const details::pe_data_directory &header, TYPES type)
 
 DataDirectory (const DataDirectory &other)=default
 
DataDirectoryoperator= (const DataDirectory &other)=default
 
 DataDirectory (DataDirectory &&other) noexcept=default
 
DataDirectoryoperator= (DataDirectory &&other) noexcept=default
 
 ~DataDirectory () override=default
 
uint32_t RVA () const
 The relative virtual address of the content of this data directory.
 
uint32_t size () const
 The size of the content.
 
bool has_section () const
 Check if the content of this data directory is associated with a PE Cection.
 
Sectionsection ()
 Section associated with the DataDirectory.
 
const Sectionsection () const
 
TYPES type () const
 Type of the data directory.
 
void size (uint32_t size)
 
void RVA (uint32_t rva)
 
void accept (Visitor &visitor) const override
 
- Public Member Functions inherited from LIEF::Object
 Object ()
 
 Object (const Object &other)
 
Objectoperator= (const Object &other)
 
template<class T >
output_t< T > as ()
 
template<class T >
output_const_t< T > as () const
 
virtual bool operator== (const Object &other) const
 
virtual bool operator!= (const Object &other) const
 
virtual ~Object ()
 

Static Public Attributes

static constexpr size_t DEFAULT_NB = 16
 

Detailed Description

Class that represents a PE data directory entry.

Member Enumeration Documentation

◆ TYPES

enum class LIEF::PE::DataDirectory::TYPES : uint32_t
strong
Enumerator
EXPORT_TABLE 
IMPORT_TABLE 
RESOURCE_TABLE 
EXCEPTION_TABLE 
CERTIFICATE_TABLE 
BASE_RELOCATION_TABLE 
DEBUG_DIR 
ARCHITECTURE 
GLOBAL_PTR 
TLS_TABLE 
LOAD_CONFIG_TABLE 
BOUND_IMPORT 
IAT 
DELAY_IMPORT_DESCRIPTOR 
CLR_RUNTIME_HEADER 
RESERVED 
UNKNOWN 

Constructor & Destructor Documentation

◆ DataDirectory() [1/5]

LIEF::PE::DataDirectory::DataDirectory ( )
default

◆ DataDirectory() [2/5]

LIEF::PE::DataDirectory::DataDirectory ( TYPES type)
inline

◆ DataDirectory() [3/5]

LIEF::PE::DataDirectory::DataDirectory ( const details::pe_data_directory & header,
TYPES type )

◆ DataDirectory() [4/5]

LIEF::PE::DataDirectory::DataDirectory ( const DataDirectory & other)
default

◆ DataDirectory() [5/5]

LIEF::PE::DataDirectory::DataDirectory ( DataDirectory && other)
defaultnoexcept

◆ ~DataDirectory()

LIEF::PE::DataDirectory::~DataDirectory ( )
overridedefault

Member Function Documentation

◆ accept()

void LIEF::PE::DataDirectory::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ has_section()

bool LIEF::PE::DataDirectory::has_section ( ) const
inline

Check if the content of this data directory is associated with a PE Cection.

◆ operator=() [1/2]

DataDirectory & LIEF::PE::DataDirectory::operator= ( const DataDirectory & other)
default

◆ operator=() [2/2]

DataDirectory & LIEF::PE::DataDirectory::operator= ( DataDirectory && other)
defaultnoexcept

◆ RVA() [1/2]

uint32_t LIEF::PE::DataDirectory::RVA ( ) const
inline

The relative virtual address of the content of this data directory.

◆ RVA() [2/2]

void LIEF::PE::DataDirectory::RVA ( uint32_t rva)
inline

◆ section() [1/2]

Section * LIEF::PE::DataDirectory::section ( )
inline

Section associated with the DataDirectory.

◆ section() [2/2]

const Section * LIEF::PE::DataDirectory::section ( ) const
inline

◆ size() [1/2]

uint32_t LIEF::PE::DataDirectory::size ( ) const
inline

The size of the content.

◆ size() [2/2]

void LIEF::PE::DataDirectory::size ( uint32_t size)
inline

◆ type()

TYPES LIEF::PE::DataDirectory::type ( ) const
inline

Type of the data directory.

Member Data Documentation

◆ DEFAULT_NB

size_t LIEF::PE::DataDirectory::DEFAULT_NB = 16
staticconstexpr

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