1/*******************************************************************\
3Module: Container for C-Strings
5Author: Daniel Kroening, kroening@kroening.com
7\*******************************************************************/
12#ifndef CPROVER_UTIL_STRING_CONTAINER_H
13#define CPROVER_UTIL_STRING_CONTAINER_H
20#include <unordered_map>
23// NOLINTNEXTLINE(readability/identifiers)
56 // constructor and destructor
60 // the pointer is guaranteed to be stable
66 // the reference is guaranteed to be stable
75 // The keys are std::string_views into the std::string objects owned by
76 // string_list below; std::list keeps those addresses stable and the interned
77 // strings are never mutated, so the keys remain valid for the lifetime of
79 // the 'unsigned' ought to be size_t
80 typedef std::unordered_map<std::string_view, unsigned, string_view_hasht>
84 unsigned get(std::string_view);
100#endif // CPROVER_UTIL_STRING_CONTAINER_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
std::unordered_map< std::string_view, unsigned, string_view_hasht > hash_tablet
std::vector< std::string * > string_vectort
unsigned get(std::string_view)
string_vectort string_vector
const std::string & get_string(size_t no) const
std::list< std::string > string_listt
unsigned operator[](std::string_view s)
const char * c_str(size_t no) const
string_container_statisticst compute_statistics() const
std::size_t operator()(std::string_view s) const
size_t hash_string(const dstringt &s)
string_containert & get_string_container()
Get a reference to the global string container.
Has estimated statistics about string container (estimated because this only uses public information,...
memory_sizet vector_memory_usage
void dump_on_stream(std::ostream &out) const
memory_sizet strings_memory_usage
memory_sizet list_memory_usage
memory_sizet map_memory_usage