Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CannedInput Class Reference

This class implements the ability to simulate mouse movements at run-time for an application. More...

#include <CannedInput.h>

Inheritance diagram for CannedInput:

XMLCannedInput List of all members.

Public Methods

virtual bool execute_one_event (Drawing *)=0
 Execute the next canned input from the stream.


Static Public Methods

CannedInput * make_canned_input (const std::string &filename, std::istream &is)
 Create a canned input stream.


Protected Methods

 CannedInput (const std::string &fn)
 Create a canned input stream with the given string used for error messages.

virtual ~CannedInput ()

Protected Attributes

std::string filename

Detailed Description

This class implements the ability to simulate mouse movements at run-time for an application.

Created in ApiMain() when the program starts, and used by the Drawing class.


Constructor & Destructor Documentation

CannedInput::CannedInput const std::string &    fn [inline, protected]
 

Create a canned input stream with the given string used for error messages.

00038 : filename(fn) {}

virtual CannedInput::~CannedInput   [inline, protected, virtual]
 

00040 {}


Member Function Documentation

virtual bool CannedInput::execute_one_event Drawing   [pure virtual]
 

Execute the next canned input from the stream.

A simulated input event is read from the stream and executed on the given drawing.

Returns :
  • True if an event was executed. Then the timer is set, so this function can be called again.
  • False if there are no more canned input events. In this case, the timer is not changed.

Implemented in XMLCannedInput.

CannedInput * CannedInput::make_canned_input const std::string &    filename,
std::istream &    is
[static]
 

Create a canned input stream.

Parameters:
filename  string describing where input comes from. Used for documentation purposes only.
is  input stream to read from.

00037 {
00038   try {
00039     return new XMLCannedInput(filename,is);
00040   } catch (exception& e) {
00041     cerr << "Canned input error: " << e.what() << endl;
00042     return 0;
00043   }
00044 }


Member Data Documentation

std::string CannedInput::filename [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 8 10:52:27 2002 for Draw by doxygen1.2.17