presage  0.9.2~beta
Classes | Typedefs | Functions
presage.h File Reference
#include "presageException.h"
#include "presageCallback.h"
#include <string>
#include <vector>
#include <map>
Include dependency graph for presage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Presage
 Presage, the intelligent predictive text entry platform. More...
 
struct  presage_suggestion_t
 

Typedefs

typedef struct _presagepresage_t
 
typedef presage_suggestion_tpresage_prediction_t
 

Functions

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_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)
 
void presage_free (presage_t prsg)
 
void presage_free_string (char *str)
 
void presage_free_string_array (char **str)
 
void presage_free_prediction (presage_prediction_t prediction)
 
presage_error_code_t presage_predict (presage_t prsg, char ***result)
 
presage_error_code_t presage_predict_with_filter (presage_t prsg, const char **filter, presage_prediction_t *result)
 
presage_error_code_t presage_learn (presage_t prsg, const char *text)
 
presage_error_code_t presage_completion (presage_t prsg, const char *token, char **result)
 
presage_error_code_t presage_context (presage_t prsg, char **result)
 
presage_error_code_t presage_context_change (presage_t prsg, int *result)
 
presage_error_code_t presage_prefix (presage_t prsg, char **result)
 
presage_error_code_t presage_config (presage_t prsg, const char *variable, char **result)
 
presage_error_code_t presage_config_set (presage_t prsg, const char *variable, const char *value)
 
presage_error_code_t presage_save_config (presage_t prsg)
 
presage_error_code_t presage_version (presage_t prsg, char **result)
 

Typedef Documentation

◆ presage_prediction_t

Definition at line 285 of file presage.h.

◆ presage_t

typedef struct _presage* presage_t

Definition at line 278 of file presage.h.

Function Documentation

◆ presage_completion()

presage_error_code_t presage_completion ( presage_t  prsg,
const char *  token,
char **  result 
)

Definition at line 470 of file presage.cpp.

References alloc_c_str(), Presage::completion(), presage_exception_handler_with_result, and _presage::presage_object.

Here is the call graph for this function:

◆ presage_config()

presage_error_code_t presage_config ( presage_t  prsg,
const char *  variable,
char **  result 
)

Definition at line 502 of file presage.cpp.

References alloc_c_str(), Presage::config(), presage_exception_handler_with_result, and _presage::presage_object.

Here is the call graph for this function:

◆ presage_config_set()

presage_error_code_t presage_config_set ( presage_t  prsg,
const char *  variable,
const char *  value 
)

Definition at line 510 of file presage.cpp.

References Presage::config(), presage_exception_handler, and _presage::presage_object.

Here is the call graph for this function:

◆ presage_context()

presage_error_code_t presage_context ( presage_t  prsg,
char **  result 
)

Definition at line 478 of file presage.cpp.

References alloc_c_str(), Presage::context(), presage_exception_handler_with_result, and _presage::presage_object.

Here is the call graph for this function:

◆ presage_context_change()

presage_error_code_t presage_context_change ( presage_t  prsg,
int *  result 
)

Definition at line 486 of file presage.cpp.

References Presage::context_change(), presage_exception_handler_with_result, and _presage::presage_object.

Here is the call graph for this function:

◆ presage_free()

void presage_free ( presage_t  prsg)

Definition at line 353 of file presage.cpp.

References _presage::presage_callback_object, and _presage::presage_object.

◆ presage_free_prediction()

void presage_free_prediction ( presage_prediction_t  prediction)

Definition at line 380 of file presage.cpp.

References presage_suggestion_t::token.

◆ presage_free_string()

void presage_free_string ( char *  str)

Definition at line 364 of file presage.cpp.

◆ presage_free_string_array()

void presage_free_string_array ( char **  str)

Definition at line 369 of file presage.cpp.

◆ presage_learn()

presage_error_code_t presage_learn ( presage_t  prsg,
const char *  text 
)

Definition at line 462 of file presage.cpp.

References Presage::learn(), presage_exception_handler, and _presage::presage_object.

Here is the call graph for this function:

◆ presage_new()

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 
)

Definition at line 310 of file presage.cpp.

References presage_exception_handler_with_result.

◆ presage_new_with_config()

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 
)

Definition at line 331 of file presage.cpp.

References config, and presage_exception_handler_with_result.

◆ presage_predict()

presage_error_code_t presage_predict ( presage_t  prsg,
char ***  result 
)

Definition at line 391 of file presage.cpp.

References Presage::predict(), presage_exception_handler_with_result, and _presage::presage_object.

Here is the call graph for this function:

◆ presage_predict_with_filter()

presage_error_code_t presage_predict_with_filter ( presage_t  prsg,
const char **  filter,
presage_prediction_t result 
)

◆ presage_prefix()

presage_error_code_t presage_prefix ( presage_t  prsg,
char **  result 
)

Definition at line 494 of file presage.cpp.

References alloc_c_str(), Presage::prefix(), presage_exception_handler_with_result, and _presage::presage_object.

Here is the call graph for this function:

◆ presage_save_config()

presage_error_code_t presage_save_config ( presage_t  prsg)

Definition at line 518 of file presage.cpp.

References presage_exception_handler, _presage::presage_object, and Presage::save_config().

Here is the call graph for this function:

◆ presage_version()

presage_error_code_t presage_version ( presage_t  prsg,
char **  result 
)

Definition at line 526 of file presage.cpp.

References alloc_c_str(), presage_exception_handler_with_result, _presage::presage_object, and Presage::version().

Here is the call graph for this function: