GCC Middle and Back End API Reference
|
#include <spellcheck.h>
Public Types | |
typedef GOAL_TYPE | goal_t |
typedef CANDIDATE_TYPE | candidate_t |
typedef edit_distance_traits< goal_t > | goal_traits |
typedef edit_distance_traits< candidate_t > | candidate_traits |
Public Member Functions | |
best_match (GOAL_TYPE goal, edit_distance_t best_distance_so_far=MAX_EDIT_DISTANCE) | |
void | consider (candidate_t candidate) |
void | set_best_so_far (CANDIDATE_TYPE best_candidate, edit_distance_t best_distance, size_t best_candidate_len) |
edit_distance_t | get_cutoff (size_t candidate_len) const |
candidate_t | get_best_meaningful_candidate () const |
candidate_t | blithely_get_best_candidate () const |
edit_distance_t | get_best_distance () const |
size_t | get_best_candidate_length () const |
Private Attributes | |
const char * | m_goal |
size_t | m_goal_len |
candidate_t | m_best_candidate |
edit_distance_t | m_best_distance |
size_t | m_best_candidate_len |
A type for use when determining the best match against a string, expressed as a template so that we can match against various string-like types (const char *, frontend identifiers, and preprocessor macros). This type accumulates the best possible match against GOAL_TYPE for a sequence of elements of CANDIDATE_TYPE, whilst minimizing the number of calls to get_edit_distance and to edit_distance_traits<T>::get_length.
CANDIDATE_TYPE best_match< GOAL_TYPE, CANDIDATE_TYPE >::candidate_t |
edit_distance_traits<candidate_t> best_match< GOAL_TYPE, CANDIDATE_TYPE >::candidate_traits |
GOAL_TYPE best_match< GOAL_TYPE, CANDIDATE_TYPE >::goal_t |
edit_distance_traits<goal_t> best_match< GOAL_TYPE, CANDIDATE_TYPE >::goal_traits |
|
inline |
|
inline |
|
inline |
References candidate(), best_match< GOAL_TYPE, CANDIDATE_TYPE >::get_cutoff(), get_edit_distance(), best_match< GOAL_TYPE, CANDIDATE_TYPE >::m_best_candidate, best_match< GOAL_TYPE, CANDIDATE_TYPE >::m_best_candidate_len, best_match< GOAL_TYPE, CANDIDATE_TYPE >::m_best_distance, best_match< GOAL_TYPE, CANDIDATE_TYPE >::m_goal, and best_match< GOAL_TYPE, CANDIDATE_TYPE >::m_goal_len.
Referenced by find_closest_identifier(), find_closest_string(), and get_closest_sanitizer_option().
|
inline |
|
inline |
|
inline |
References best_match< GOAL_TYPE, CANDIDATE_TYPE >::get_cutoff(), best_match< GOAL_TYPE, CANDIDATE_TYPE >::m_best_candidate, best_match< GOAL_TYPE, CANDIDATE_TYPE >::m_best_candidate_len, best_match< GOAL_TYPE, CANDIDATE_TYPE >::m_best_distance, and NULL.
Referenced by find_closest_identifier(), find_closest_string(), and get_closest_sanitizer_option().
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
Referenced by best_match< GOAL_TYPE, CANDIDATE_TYPE >::consider().
|
private |