libabigail
Public Member Functions | List of all members
interned_string_pool Class Reference

The interned string pool. More...

#include <abg-interned-str.h>

Public Member Functions

 interned_string_pool ()
 Default constructor. More...
 
 ~interned_string_pool ()
 Destructor. More...
 
interned_string create_string (const std::string &)
 Create an interned string with a given value. More...
 
const char * get_string (const char *s) const
 Get a pointer to the interned string which has a given value. More...
 
bool has_string (const char *s) const
 Test if the interned string pool already contains a string with a given value. More...
 

Detailed Description

The interned string pool.

This is where all the distinct strings represented by the interned strings leave. The pool is the actor responsible for creating interned strings.

Definition at line 226 of file abg-interned-str.h.

Constructor & Destructor Documentation

◆ interned_string_pool()

Default constructor.

Definition at line 85 of file abg-ir.cc.

◆ ~interned_string_pool()

Destructor.

Definition at line 134 of file abg-ir.cc.

Member Function Documentation

◆ create_string()

interned_string create_string ( const std::string &  str_value)

Create an interned string with a given value.

Parameters
str_valuethe value of the interned string to create.
Returns
the new created instance of interned_string created.

Definition at line 125 of file abg-ir.cc.

◆ get_string()

const char * get_string ( const char *  s) const

Get a pointer to the interned string which has a given value.

Parameters
sthe value of the interned string to look for.
Returns
a pointer to the raw string of characters which has the value of s. Or null if no string with value s was interned.

Definition at line 108 of file abg-ir.cc.

◆ has_string()

bool has_string ( const char *  s) const

Test if the interned string pool already contains a string with a given value.

Parameters
sthe string to test for.
Returns
true if the pool contains a string with the value s.

Definition at line 98 of file abg-ir.cc.


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