Public Member Functions | Private Member Functions | Private Attributes | List of all members
auto_complete Class Reference

#include <auto-complete.h>

Public Member Functions

 auto_complete (std::set< std::string > dictionary, bool bypass=false)
 
std::string get_line (std::function< bool()> to_stop=[](){return false;})
 

Private Member Functions

void backspace (const int num_of_backspaces)
 
std::string chars2_queue_to_string () const
 
std::string get_last_word (const std::string &line) const
 
char getch_nolock (std::function< bool()> stop=[](){return false;})
 
void handle_special_key (const std::vector< uint8_t > &chars)
 
std::vector< std::stringsearch (const std::string &word) const
 

Private Attributes

bool _bypass
 
std::vector< char > _chars2_queue
 
std::set< std::string_dictionary
 
std::vector< std::string_finds_vec
 
std::vector< std::string_history_words
 
unsigned _history_words_index
 
bool _is_first_time_up_arrow
 
int _num_of_chars2_in_line
 
unsigned _tab_index
 

Detailed Description

Definition at line 28 of file auto-complete.h.

Constructor & Destructor Documentation

auto_complete::auto_complete ( std::set< std::string dictionary,
bool  bypass = false 
)
explicit

Definition at line 38 of file auto-complete.cpp.

Member Function Documentation

void auto_complete::backspace ( const int  num_of_backspaces)
private

Definition at line 60 of file auto-complete.cpp.

string auto_complete::chars2_queue_to_string ( ) const
private

Definition at line 42 of file auto-complete.cpp.

string auto_complete::get_last_word ( const std::string line) const
private

Definition at line 51 of file auto-complete.cpp.

string auto_complete::get_line ( std::function< bool()>  to_stop = []() {return false;})

Definition at line 181 of file auto-complete.cpp.

char auto_complete::getch_nolock ( std::function< bool()>  stop = [](){return false;})
private

Definition at line 124 of file auto-complete.cpp.

void auto_complete::handle_special_key ( const std::vector< uint8_t > &  chars)
private

Definition at line 81 of file auto-complete.cpp.

vector< string > auto_complete::search ( const std::string word) const
private

Definition at line 12 of file auto-complete.cpp.

Member Data Documentation

bool auto_complete::_bypass
private

Definition at line 50 of file auto-complete.h.

std::vector<char> auto_complete::_chars2_queue
private

Definition at line 45 of file auto-complete.h.

std::set<std::string> auto_complete::_dictionary
private

Definition at line 42 of file auto-complete.h.

std::vector<std::string> auto_complete::_finds_vec
private

Definition at line 48 of file auto-complete.h.

std::vector<std::string> auto_complete::_history_words
private

Definition at line 43 of file auto-complete.h.

unsigned auto_complete::_history_words_index
private

Definition at line 44 of file auto-complete.h.

bool auto_complete::_is_first_time_up_arrow
private

Definition at line 49 of file auto-complete.h.

int auto_complete::_num_of_chars2_in_line
private

Definition at line 46 of file auto-complete.h.

unsigned auto_complete::_tab_index
private

Definition at line 47 of file auto-complete.h.


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


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:31