PresageCallback Class Referenceabstract

`#include <presageCallback.h>`

Inheritance diagram for PresageCallback:
Collaboration diagram for PresageCallback:

## Public Member Functions

virtual | ~PresageCallback ()
virtual std::string | get_past_stream () const =0
virtual std::string | get_future_stream () const =0

## Protected Member Functions

| PresageCallback ()

## Detailed Description

Abstract callback object used to retrieve context from user application.

A concrete callback implementation must implement the getPastStream() and getFutureStream() method which are responsible for retrieving the context from the user text buffer.

Using a callback object decouples the user application from the chosen text buffer (which could be a simple string, a graphical text widget, a file stream, etc.) and frees the caller from having to explicitly notify of any updates to the context. Presage will invoke on the callback whenever access to contextual data is required.

getPastStream() must return a string containing the text preceding the current insertion point.

getFutureStream() must return a string containing the text following the current insertion point.

Definition at line 65 of file presageCallback.h.

## Constructor & Destructor Documentation

## ~PresageCallback()

virtual PresageCallback::~PresageCallback | ( |  | ) |

inline virtual

Definition at line 67 of file presageCallback.h.

## PresageCallback()

PresageCallback::PresageCallback | ( |  | ) |

inline protected

Definition at line 73 of file presageCallback.h.

## Member Function Documentation

## get_future_stream()

virtual std::string PresageCallback::get_future_stream | ( |  | ) | const

pure virtual

Implemented in CPresageCallback, LegacyPresageCallback, PresageDemoCallback, and SimulatorPresageCallback.

Referenced by ContextTracker::getFutureStream(), and ContextTracker::toString().

Here is the caller graph for this function:

## get_past_stream()

virtual std::string PresageCallback::get_past_stream | ( |  | ) | const

pure virtual

Implemented in CPresageCallback, LegacyPresageCallback, PresageDemoCallback, and SimulatorPresageCallback.

Referenced by ContextTracker::getPastStream(), ContextTracker::getToken(), and ContextTracker::toString().

Here is the caller graph for this function:

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

- /build/presage-hvZ4Ld/presage-0.9.1/src/lib/presageCallback.h