Back to index

enigmail  1.4.3
Public Member Functions | Static Public Member Functions | Static Public Attributes
Elf_Rel Class Reference

#include <elfxx.h>

Inheritance diagram for Elf_Rel:
Inheritance graph
[legend]
Collaboration diagram for Elf_Rel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Elf_Rel (std::ifstream &file, char ei_class, char ei_data)
void serialize (std::ofstream &file, char ei_class, char ei_data)

Static Public Member Functions

static unsigned int size (char ei_class)

Static Public Attributes

static const unsigned int sh_type = SHT_REL
static const unsigned int d_tag = DT_REL
static const unsigned int d_tag_count = DT_RELCOUNT

Detailed Description

Definition at line 554 of file elfxx.h.


Constructor & Destructor Documentation

Elf_Rel::Elf_Rel ( std::ifstream &  file,
char  ei_class,
char  ei_data 
) [inline]

Definition at line 556 of file elfxx.h.

    : serializable<Elf_Rel_Traits>(file, ei_class, ei_data) {};

Member Function Documentation

void serializable< Elf_Rel_Traits >::serialize ( std::ofstream &  file,
char  ei_class,
char  ei_data 
) [inline, inherited]

Definition at line 251 of file elfxx.h.

    {
        if (ei_class == ELFCLASS32) {
            typename T::Type32 e;
            if (ei_data == ELFDATA2LSB) {
                T::template swap<little_endian>(*this, e);
                file.write((char *)&e, sizeof(e));
                return;
            } else if (ei_data == ELFDATA2MSB) {
                T::template swap<big_endian>(*this, e);
                file.write((char *)&e, sizeof(e));
                return;
            }
        } else if (ei_class == ELFCLASS64) {
            typename T::Type64 e;
            if (ei_data == ELFDATA2LSB) {
                T::template swap<little_endian>(*this, e);
                file.write((char *)&e, sizeof(e));
                return;
            } else if (ei_data == ELFDATA2MSB) {
                T::template swap<big_endian>(*this, e);
                file.write((char *)&e, sizeof(e));
                return;
            }
        }
        throw std::runtime_error("Unsupported ELF class or data encoding");
    }
static unsigned int serializable< Elf_Rel_Traits >::size ( char  ei_class) [inline, static, inherited]

Definition at line 279 of file elfxx.h.

    {
        if (ei_class == ELFCLASS32)
            return sizeof(typename T::Type32);
        else if (ei_class == ELFCLASS64)
            return sizeof(typename T::Type64);
        return 0;
    }

Member Data Documentation

const unsigned int Elf_Rel::d_tag = DT_REL [static]

Definition at line 560 of file elfxx.h.

const unsigned int Elf_Rel::d_tag_count = DT_RELCOUNT [static]

Definition at line 561 of file elfxx.h.

const unsigned int Elf_Rel::sh_type = SHT_REL [static]

Definition at line 559 of file elfxx.h.


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