31#if __cplusplus >= 201103L
32#define EXCEPT(...) noexcept(false)
34#define EXCEPT(...) throw(__VA_ARGS__)
280 void* past_stream_cb_arg,
282 void* future_stream_cb_arg,
286 void* past_stream_cb_arg,
288 void* future_stream_cb_arg,
317 const char* variable,
321 const char* variable,
Tracks user interaction and context.
bool context_change() const EXCEPT(PresageException)
Returns true if a context change occured.
Configuration * configuration
std::string context() const EXCEPT(PresageException)
Returns the text entered so far.
void save_config() const EXCEPT(PresageException)
Save current configuration to file.
void learn(const std::string text) const EXCEPT(PresageException)
Learn from text offline.
std::vector< std::string > predict() EXCEPT(PresageException)
Obtain a prediction.
Presage(PresageCallback *callback) EXCEPT(PresageException)
ContextTracker * contextTracker
std::string completion(std::string str) EXCEPT(PresageException)
Request presage to return the completion string for the given predicted token.
PredictorRegistry * predictorRegistry
PresageCallback * callback(PresageCallback *callback) EXCEPT(PresageException)
Callback getter/setter.
std::string prefix() const EXCEPT(PresageException)
Returns the current prefix.
ProfileManager * profileManager
std::string config(const std::string variable) const EXCEPT(PresageException)
Gets the value of specified configuration variable.
PredictorActivator * predictorActivator
const char *(* _presage_callback_get_past_stream)(void *)
const char *(* _presage_callback_get_future_stream)(void *)
presage_error_code_t presage_prefix(presage_t prsg, char **result)
presage_error_code_t presage_context(presage_t prsg, char **result)
presage_error_code_t presage_completion(presage_t prsg, const char *token, char **result)
struct _presage * presage_t
presage_error_code_t presage_predict(presage_t prsg, char ***result)
presage_error_code_t presage_learn(presage_t prsg, const char *text)
void presage_free_string_array(char **str)
presage_error_code_t presage_new(_presage_callback_get_past_stream past_stream_cb, void *past_stream_cb_arg, _presage_callback_get_future_stream future_stream_cb, void *future_stream_cb_arg, presage_t *result)
presage_error_code_t presage_config_set(presage_t prsg, const char *variable, const char *value)
presage_error_code_t presage_context_change(presage_t prsg, int *result)
presage_error_code_t presage_new_with_config(_presage_callback_get_past_stream past, void *past_stream_cb_arg, _presage_callback_get_future_stream future_stream_cb, void *future_stream_cb_arg, const char *config, presage_t *result)
presage_error_code_t presage_config(presage_t prsg, const char *variable, char **result)
void presage_free(presage_t prsg)
void presage_free_string(char *str)
presage_error_code_t presage_save_config(presage_t prsg)