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

#include <iostream.hpp>

Public Types

using pos_type = std::streampos
 
using off_type = std::streamoff
 

Public Member Functions

 vector_iostream ()=default
 
 vector_iostream (bool endian_swap)
 
void reserve (size_t size)
 
vector_iostreamput (uint8_t c)
 
vector_iostreamwrite (const uint8_t *s, std::streamsize n)
 
vector_iostreamwrite (span< const uint8_t > sp)
 
vector_iostreamwrite (std::vector< uint8_t > s)
 
vector_iostreamwrite (const std::string &s)
 
vector_iostreamwrite (size_t count, uint8_t value)
 
vector_iostreamwrite_sized_int (uint64_t value, size_t size)
 
vector_iostreamwrite (const vector_iostream &other)
 
template<class T , typename = typename std::enable_if<std::is_standard_layout<T>::value && std::is_trivial<T>::value>::type>
vector_iostreamwrite (const T &t)
 
template<typename T >
vector_iostreamwrite_conv (const T &t)
 
template<typename T >
vector_iostreamwrite_conv_array (const std::vector< T > &v)
 
vector_iostreamalign (size_t alignment, uint8_t fill=0)
 
template<typename T , size_t size>
vector_iostreamwrite (const std::array< T, size > &t)
 
template<typename T >
vector_iostreamwrite (const std::vector< T > &elements)
 
vector_iostreamwrite_uleb128 (uint64_t value)
 
vector_iostreamwrite_sleb128 (int64_t value)
 
vector_iostreamget (std::vector< uint8_t > &c)
 
vector_iostreammove (std::vector< uint8_t > &c)
 
vector_iostreamflush ()
 
size_t size () const
 
pos_type tellp () const
 
vector_iostreamseekp (pos_type p)
 
vector_iostreamseekp (vector_iostream::off_type p, std::ios_base::seekdir dir)
 
const std::vector< uint8_t > & raw () const
 
std::vector< uint8_t > & raw ()
 
void set_endian_swap (bool swap)
 

Static Public Member Functions

static size_t uleb128_size (uint64_t value)
 
static size_t sleb128_size (int64_t value)
 

Member Typedef Documentation

◆ off_type

using LIEF::vector_iostream::off_type = std::streamoff

◆ pos_type

using LIEF::vector_iostream::pos_type = std::streampos

Constructor & Destructor Documentation

◆ vector_iostream() [1/2]

LIEF::vector_iostream::vector_iostream ( )
default

◆ vector_iostream() [2/2]

LIEF::vector_iostream::vector_iostream ( bool endian_swap)
inline

Member Function Documentation

◆ align()

vector_iostream & LIEF::vector_iostream::align ( size_t alignment,
uint8_t fill = 0 )

◆ flush()

vector_iostream & LIEF::vector_iostream::flush ( )
inline

◆ get()

vector_iostream & LIEF::vector_iostream::get ( std::vector< uint8_t > & c)
inline

◆ move()

vector_iostream & LIEF::vector_iostream::move ( std::vector< uint8_t > & c)
inline

◆ put()

vector_iostream & LIEF::vector_iostream::put ( uint8_t c)

◆ raw() [1/2]

std::vector< uint8_t > & LIEF::vector_iostream::raw ( )
inline

◆ raw() [2/2]

const std::vector< uint8_t > & LIEF::vector_iostream::raw ( ) const
inline

Referenced by write().

◆ reserve()

void LIEF::vector_iostream::reserve ( size_t size)
inline

References size().

◆ seekp() [1/2]

vector_iostream & LIEF::vector_iostream::seekp ( pos_type p)
inline

◆ seekp() [2/2]

vector_iostream & LIEF::vector_iostream::seekp ( vector_iostream::off_type p,
std::ios_base::seekdir dir )

◆ set_endian_swap()

void LIEF::vector_iostream::set_endian_swap ( bool swap)
inline

◆ size()

size_t LIEF::vector_iostream::size ( ) const
inline

Referenced by reserve(), and write_sized_int().

◆ sleb128_size()

static size_t LIEF::vector_iostream::sleb128_size ( int64_t value)
static

◆ tellp()

pos_type LIEF::vector_iostream::tellp ( ) const
inline

Referenced by write().

◆ uleb128_size()

static size_t LIEF::vector_iostream::uleb128_size ( uint64_t value)
static

◆ write() [1/9]

template<typename T , size_t size>
vector_iostream & LIEF::vector_iostream::write ( const std::array< T, size > & t)
inline

References write().

◆ write() [2/9]

vector_iostream & LIEF::vector_iostream::write ( const std::string & s)

◆ write() [3/9]

template<typename T >
vector_iostream & LIEF::vector_iostream::write ( const std::vector< T > & elements)
inline

References write().

◆ write() [4/9]

template<class T , typename = typename std::enable_if<std::is_standard_layout<T>::value && std::is_trivial<T>::value>::type>
vector_iostream & LIEF::vector_iostream::write ( const T & t)
inline

References tellp().

◆ write() [5/9]

vector_iostream & LIEF::vector_iostream::write ( const uint8_t * s,
std::streamsize n )

◆ write() [6/9]

vector_iostream & LIEF::vector_iostream::write ( const vector_iostream & other)
inline

References raw(), and write().

◆ write() [7/9]

vector_iostream & LIEF::vector_iostream::write ( size_t count,
uint8_t value )
inline

◆ write() [8/9]

vector_iostream & LIEF::vector_iostream::write ( span< const uint8_t > sp)
inline

References write().

◆ write() [9/9]

vector_iostream & LIEF::vector_iostream::write ( std::vector< uint8_t > s)

◆ write_conv()

template<typename T >
vector_iostream & LIEF::vector_iostream::write_conv ( const T & t)

◆ write_conv_array()

template<typename T >
vector_iostream & LIEF::vector_iostream::write_conv_array ( const std::vector< T > & v)

◆ write_sized_int()

vector_iostream & LIEF::vector_iostream::write_sized_int ( uint64_t value,
size_t size )
inline

References size(), and write().

◆ write_sleb128()

vector_iostream & LIEF::vector_iostream::write_sleb128 ( int64_t value)

◆ write_uleb128()

vector_iostream & LIEF::vector_iostream::write_uleb128 ( uint64_t value)

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