|
presage 0.9.1
|
#include "presage.h"#include <curses.h>#include <getopt.h>#include <iostream>#include <sstream>#include <list>
Go to the source code of this file.
Classes | |
| class | PresageDemoCallback |
Macros | |
| #define | NOMACROS |
Functions | |
| void | parseCommandLineArgs (int argc, char **argv) |
| void | printUsage () |
| void | printVersion () |
| void | disclaimer () |
| void | draw_title_win (WINDOW *) |
| void | draw_context_win (WINDOW *, std::string) |
| void | draw_function_keys (WINDOW *) |
| void | draw_previous_suggestions (std::vector< std::string >, bool, const int, int) |
| size_t | getGreatestSuggestionLength (std::vector< std::string > suggestions) |
| int | main (int argc, char **argv) |
| void | drawMsgWin (WINDOW *win, std::vector< std::string > words) |
| void | parseCommandLineArgs (int argc, char *argv[]) |
Variables | |
| const char | PROGRAM_NAME [] = "presage_demo" |
| std::string | suggestions |
| std::string | config |
| std::stringstream | buffer |
| #define NOMACROS |
Definition at line 35 of file presageDemo.cpp.
| void disclaimer | ( | ) |
Definition at line 317 of file presageDemo.cpp.
References disclaimer().
Referenced by disclaimer(), main(), and parseCommandLineArgs().


| void draw_context_win | ( | WINDOW * | win, |
| std::string | str ) |
Definition at line 212 of file presageDemo.cpp.
References draw_context_win().
Referenced by draw_context_win(), main(), and parseCommandLineArgs().


| void draw_function_keys | ( | WINDOW * | win | ) |
Definition at line 237 of file presageDemo.cpp.
References draw_function_keys(), and suggestions.
Referenced by draw_function_keys(), main(), and parseCommandLineArgs().


| void draw_previous_suggestions | ( | std::vector< std::string > | words, |
| bool | contextChange, | ||
| const int | starty, | ||
| int | startx ) |
Definition at line 249 of file presageDemo.cpp.
References draw_previous_suggestions(), getGreatestSuggestionLength(), and suggestions.
Referenced by draw_previous_suggestions(), main(), and parseCommandLineArgs().


| void draw_title_win | ( | WINDOW * | title_win | ) |
Definition at line 351 of file presageDemo.cpp.
References draw_title_win().
Referenced by draw_title_win(), main(), and parseCommandLineArgs().


| void drawMsgWin | ( | WINDOW * | win, |
| std::vector< std::string > | words ) |
Definition at line 221 of file presageDemo.cpp.
References drawMsgWin().
Referenced by drawMsgWin().


| size_t getGreatestSuggestionLength | ( | std::vector< std::string > | suggestions | ) |
Definition at line 304 of file presageDemo.cpp.
References getGreatestSuggestionLength(), and suggestions.
Referenced by draw_previous_suggestions(), getGreatestSuggestionLength(), and parseCommandLineArgs().


| int main | ( | int | argc, |
| char ** | argv ) |
Demo program using curses.
This demo displays the text entered in a top windows that stretches across the screen. The current prediction is displayed immediately underneath the text window, at the leftmost position.
The previous predictions are displayed in cronological order to the right of the current prediction.
Subsequent predictions shifted to the right, so that the current prediction is always on the left hand side. Context switches are marked in some way (either a vertical bar or a box enclosing the other prediction boxes).
Definition at line 114 of file presageDemo.cpp.
References buffer, Presage::completion(), config, Presage::config(), Presage::context(), Presage::context_change(), disclaimer(), draw_context_win(), draw_function_keys(), draw_previous_suggestions(), draw_title_win(), main(), parseCommandLineArgs(), Presage::predict(), PresageDemoCallback::PresageDemoCallback(), and suggestions.
Referenced by main(), and main().


| void parseCommandLineArgs | ( | int | argc, |
| char ** | argv ) |
References disclaimer(), draw_context_win(), draw_function_keys(), draw_previous_suggestions(), draw_title_win(), getGreatestSuggestionLength(), parseCommandLineArgs(), printUsage(), printVersion(), and suggestions.
Referenced by main(), main(), parseCommandLineArgs(), and parseCommandLineArgs().


| void parseCommandLineArgs | ( | int | argc, |
| char * | argv[] ) |
Definition at line 362 of file presageDemo.cpp.
References config, parseCommandLineArgs(), printUsage(), printVersion(), and suggestions.

| void printUsage | ( | ) |
Definition at line 418 of file presageDemo.cpp.
References printUsage(), and PROGRAM_NAME.
Referenced by main(), parseCommandLineArgs(), parseCommandLineArgs(), and printUsage().


| void printVersion | ( | ) |
Definition at line 409 of file presageDemo.cpp.
References printVersion(), and PROGRAM_NAME.
Referenced by parseCommandLineArgs(), parseCommandLineArgs(), and printVersion().


| std::stringstream buffer |
Definition at line 71 of file presageDemo.cpp.
Referenced by AbbreviationExpansionPredictor::cacheAbbreviationsExpansions(), main(), and PresageDemoCallback::PresageDemoCallback().
| std::string config |
Definition at line 70 of file presageDemo.cpp.
Referenced by AbbreviationExpansionPredictor::AbbreviationExpansionPredictor(), ARPAPredictor::ARPAPredictor(), ContextTracker::ContextTracker(), DejavuPredictor::DejavuPredictor(), DictionaryPredictor::DictionaryPredictor(), DummyPredictor::DummyPredictor(), Profile::init_configuration(), main(), main(), parse_cmd_line_args(), parseCommandLineArgs(), Predictor::Predictor(), presage_new_with_config(), Profile::read_into_configuration(), RecencyPredictor::RecencyPredictor(), Simulator::Simulator(), and SmoothedNgramPredictor::SmoothedNgramPredictor().
| const char PROGRAM_NAME[] = "presage_demo" |
Definition at line 52 of file presageDemo.cpp.
Referenced by print_usage(), print_version(), printUsage(), printVersion(), usage(), and version().
| std::string suggestions |
Definition at line 69 of file presageDemo.cpp.
Referenced by draw_function_keys(), draw_previous_suggestions(), getGreatestSuggestionLength(), main(), parse_cmd_line_args(), parseCommandLineArgs(), and parseCommandLineArgs().