libtld 2.0.14
A library to determine the Top-Level Domain name of any Internet URI.
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
tld_string_manager Class Reference

Public Member Functions

string_id_t add_string (std::string const &s)
 
std::size_t compressed_length () const
 
std::string const & compressed_strings () const
 
string_id_t find_string (std::string const &s)
 
string_id_t get_next_string_id () const
 
std::string get_string (string_id_t id) const
 
std::size_t get_string_offset (std::string const &s) const
 
std::size_t get_string_offset (string_id_t id) const
 
std::size_t included_count () const
 
std::size_t included_length () const
 
std::size_t max_length () const
 
void merge_strings ()
 
std::size_t merged_count () const
 
std::size_t merged_length () const
 
std::size_t size () const
 
std::size_t total_length () const
 

Private Types

typedef std::set< string_id_t > set_id_t
 

Private Member Functions

std::string::size_type end_start_match (std::string const &s1, std::string const &s2)
 
bool merge_two_strings ()
 

Private Attributes

std::size_t f_included_count = 0
 
std::size_t f_included_length = 0
 
std::size_t f_max_length = 0
 
std::size_t f_merged_count = 0
 
std::size_t f_merged_length = 0
 
std::string f_merged_strings = std::string()
 
string_id_t f_next_id = STRING_ID_NULL
 
tld_string::map_by_id_t f_strings_by_id = tld_string::map_by_id_t()
 
tld_string::map_by_string_t f_strings_by_string = tld_string::map_by_string_t()
 
set_id_t f_strings_reviewed = set_id_t()
 
std::size_t f_total_length = 0
 

Detailed Description

Definition at line 81 of file tld_compiler.h.

Member Typedef Documentation

◆ set_id_t

typedef std::set<string_id_t> tld_string_manager::set_id_t
private

Definition at line 102 of file tld_compiler.h.

Member Function Documentation

◆ add_string()

string_id_t tld_string_manager::add_string ( std::string const &  s)

Definition at line 103 of file tld_compiler.cpp.

◆ compressed_length()

std::size_t tld_string_manager::compressed_length ( ) const

Definition at line 178 of file tld_compiler.cpp.

◆ compressed_strings()

std::string const & tld_string_manager::compressed_strings ( ) const

Definition at line 172 of file tld_compiler.cpp.

◆ end_start_match()

std::string::size_type tld_string_manager::end_start_match ( std::string const &  s1,
std::string const &  s2 
)
private

Definition at line 184 of file tld_compiler.cpp.

◆ find_string()

string_id_t tld_string_manager::find_string ( std::string const &  s)

Definition at line 125 of file tld_compiler.cpp.

◆ get_next_string_id()

string_id_t tld_string_manager::get_next_string_id ( ) const

Definition at line 148 of file tld_compiler.cpp.

◆ get_string()

std::string tld_string_manager::get_string ( string_id_t  id) const

Definition at line 137 of file tld_compiler.cpp.

◆ get_string_offset() [1/2]

std::size_t tld_string_manager::get_string_offset ( std::string const &  s) const

Definition at line 349 of file tld_compiler.cpp.

◆ get_string_offset() [2/2]

std::size_t tld_string_manager::get_string_offset ( string_id_t  id) const

Definition at line 355 of file tld_compiler.cpp.

◆ included_count()

std::size_t tld_string_manager::included_count ( ) const

Definition at line 325 of file tld_compiler.cpp.

◆ included_length()

std::size_t tld_string_manager::included_length ( ) const

Definition at line 331 of file tld_compiler.cpp.

◆ max_length()

std::size_t tld_string_manager::max_length ( ) const

Definition at line 160 of file tld_compiler.cpp.

◆ merge_strings()

void tld_string_manager::merge_strings ( )

Definition at line 201 of file tld_compiler.cpp.

◆ merge_two_strings()

bool tld_string_manager::merge_two_strings ( )
private

Definition at line 263 of file tld_compiler.cpp.

◆ merged_count()

std::size_t tld_string_manager::merged_count ( ) const

Definition at line 337 of file tld_compiler.cpp.

◆ merged_length()

std::size_t tld_string_manager::merged_length ( ) const

Definition at line 343 of file tld_compiler.cpp.

◆ size()

std::size_t tld_string_manager::size ( ) const

Definition at line 154 of file tld_compiler.cpp.

◆ total_length()

std::size_t tld_string_manager::total_length ( ) const

Definition at line 166 of file tld_compiler.cpp.

Member Data Documentation

◆ f_included_count

std::size_t tld_string_manager::f_included_count = 0
private

Definition at line 115 of file tld_compiler.h.

◆ f_included_length

std::size_t tld_string_manager::f_included_length = 0
private

Definition at line 116 of file tld_compiler.h.

◆ f_max_length

std::size_t tld_string_manager::f_max_length = 0
private

Definition at line 113 of file tld_compiler.h.

◆ f_merged_count

std::size_t tld_string_manager::f_merged_count = 0
private

Definition at line 117 of file tld_compiler.h.

◆ f_merged_length

std::size_t tld_string_manager::f_merged_length = 0
private

Definition at line 118 of file tld_compiler.h.

◆ f_merged_strings

std::string tld_string_manager::f_merged_strings = std::string()
private

Definition at line 119 of file tld_compiler.h.

◆ f_next_id

string_id_t tld_string_manager::f_next_id = STRING_ID_NULL
private

Definition at line 109 of file tld_compiler.h.

◆ f_strings_by_id

tld_string::map_by_id_t tld_string_manager::f_strings_by_id = tld_string::map_by_id_t()
private

Definition at line 111 of file tld_compiler.h.

◆ f_strings_by_string

tld_string::map_by_string_t tld_string_manager::f_strings_by_string = tld_string::map_by_string_t()
private

Definition at line 110 of file tld_compiler.h.

◆ f_strings_reviewed

set_id_t tld_string_manager::f_strings_reviewed = set_id_t()
private

Definition at line 112 of file tld_compiler.h.

◆ f_total_length

std::size_t tld_string_manager::f_total_length = 0
private

Definition at line 114 of file tld_compiler.h.


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

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.