presage  0.9.2~beta
Public Member Functions | Private Attributes | List of all members
PresageDemoCallback Class Reference
Inheritance diagram for PresageDemoCallback:
Inheritance graph
Collaboration diagram for PresageDemoCallback:
Collaboration graph

Public Member Functions

 PresageDemoCallback (std::stringstream &buffer)
 
std::string get_past_stream () const
 
std::string get_future_stream () const
 
- Public Member Functions inherited from PresageCallback
virtual ~PresageCallback ()
 

Private Attributes

std::stringstream & m_buffer
 
const std::string empty
 

Additional Inherited Members

- Protected Member Functions inherited from PresageCallback
 PresageCallback ()
 

Detailed Description

Callback object for presage demo application.

We need to provide a callback class to allow presage to query the application's text buffer. In a real world application, this would fetch the text from whatever object stores the text composition (i.e. a GUI widget in a graphical interface)

For the purpose of this demonstration program, the callback class will retrieve contextual data from a standard stringstream object.

Definition at line 86 of file presageDemo.cpp.

Constructor & Destructor Documentation

◆ PresageDemoCallback()

PresageDemoCallback::PresageDemoCallback ( std::stringstream &  buffer)
inline

Definition at line 88 of file presageDemo.cpp.

Member Function Documentation

◆ get_future_stream()

std::string PresageDemoCallback::get_future_stream ( ) const
inlinevirtual

Implements PresageCallback.

Definition at line 91 of file presageDemo.cpp.

References empty.

◆ get_past_stream()

std::string PresageDemoCallback::get_past_stream ( ) const
inlinevirtual

Implements PresageCallback.

Definition at line 90 of file presageDemo.cpp.

References m_buffer.

Member Data Documentation

◆ empty

const std::string PresageDemoCallback::empty
private

Definition at line 95 of file presageDemo.cpp.

Referenced by get_future_stream().

◆ m_buffer

std::stringstream& PresageDemoCallback::m_buffer
private

Definition at line 94 of file presageDemo.cpp.

Referenced by get_past_stream().


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