template <class Elf = Elf<>, AbiPtrTraitsApi<const char, Elf> AbiTraits = LocalAbiTraits>

class Soname

Defined at line 20 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

This provides an optimized type for holding a DT_SONAME / DT_NEEDED string.

It always hashes the string to make equality comparisons faster.

Public Members

static const bool kLocal

Public Methods

void Soname<Elf, AbiTraits> ()

Defined at line 24 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

void Soname<Elf, AbiTraits> (const Soname<Elf, AbiTraits> & )

Defined at line 26 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

void Soname<Elf, AbiTraits> (std::string_view name)

Defined at line 28 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

Soname<Elf, AbiTraits> & operator= (const Soname<Elf, AbiTraits> & )

Defined at line 34 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

Soname<Elf, AbiTraits> & operator= (std::string_view name)

Defined at line 36 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

std::string_view str ()

Defined at line 43 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

const char * c_str ()

This can only be used if the std::string_view used in construction is

known to point to a NUL-terminated string, such as a string literal or a

DT_STRTAB entry.

Defined at line 52 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

size_t copy (char * dest, size_t count, size_t pos)

This is slightly different from str().copy() because it also includes the

'

\

0' terminator in the count of chars to be copied. Hence it can return

up to size() + 1, not only up to size() like std::string_view::copy.

Defined at line 62 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

size_t copy (char * dest, size_t count, size_t pos)

This is slightly different from str().copy() because it also includes the

'

\

0' terminator in the count of chars to be copied. Hence it can return

up to size() + 1, not only up to size() like std::string_view::copy.

Defined at line 62 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

size_t copy_size ()

This returns the size of a buffer sufficient for copy() not to truncate.

Defined at line 74 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

bool empty ()

Defined at line 76 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

uint32_t size ()

Defined at line 78 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

uint32_t hash ()

Defined at line 80 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

bool operator== (const Soname<Elf, AbiTraits> & other)

Defined at line 82 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

auto operator<=> (const Soname<Elf, AbiTraits> & other)

Defined at line 88 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h

auto equal_to ()

This returns a convenient unary predicate for using things such as

std::ranges::find_if or std::ranges::any_of across a range of things that

support operator==(const Soname

&

).

Defined at line 97 of file ../../src/lib/elfldltl/include/lib/elfldltl/soname.h