|
rlmm::basic_callback< Lock > Struct Template Reference
[The Readline classes.]
#include <rlmm/callback.hh>
Inheritance diagram for rlmm::basic_callback< Lock >:
[legend]Collaboration diagram for rlmm::basic_callback< Lock >:
[legend]List of all members.
Detailed Description
template<typename Lock>
struct rlmm::basic_callback< Lock >
Readline in call-back mode.
In this mode, the user application controls the event loop, and readline is only executed when so requested from the application. The member function read should be called when the application deems that terminal input is ok. This mode is useful for for example GUIs, and probably also multithreaded programs. There can only be one call back handler at a given time. The member function handle is called when a full line is read by successive call-backs.
Note, that you still need to instantice a rlmm::readline object to control other aspects of the C library.
Simply instanising an object of a sub-class will not install the handler - the member function install must be called on the object. When the object is deleted (out of scope or explicit delete), the call back handler is removed.
Constructor & Destructor Documentation
|
Remove and free the call back handler.
|
Member Function Documentation
template<typename Lock> |
virtual void rlmm::basic_callback< Lock >::handle |
( |
char * |
line |
) |
[inline, virtual] |
|
|
Abstract member function to overload.
This member function is called when a full line is read from the input. - Parameters:
-
|
template<typename Lock> |
void rlmm::basic_callback< Lock >::install |
( |
const std::string & |
p |
) |
[inline] |
|
|
Set the prompt, and install call back handler.
|
|
Method to execute periodically.
Read one (or more) character from the input. - Examples:
-
callback.cc.
|
Friends And Related Function Documentation
template<typename Lock> |
friend class singleton [friend] |
|
Member Data Documentation
The documentation for this struct was generated from the following file:
Top of page
Last update Fri Aug 26 15:19:53 2005
Christian Holm
Created by DoxyGen 1.4.4
|