Canola
0.8.D001
|
#include <card_reader.h>
The window_card_reader class is used to represent a window within which the card images are animated to simulate a card reader drawing each card in and passing the holes over the optical sensors.
Definition at line 35 of file card_reader.h.
typedef std::vector<gtk_image_ptr_t> window_card_reader::card_image_widgets_t [private] |
Definition at line 109 of file card_reader.h.
typedef std::vector<pixbuf_ptr_t> window_card_reader::card_pixbufs_t [private] |
Definition at line 98 of file card_reader.h.
typedef boost::shared_ptr<Gtk::Image> window_card_reader::gtk_image_ptr_t [private] |
Definition at line 107 of file card_reader.h.
typedef Glib::RefPtr<Gdk::Pixbuf> window_card_reader::pixbuf_ptr_t [private] |
Definition at line 96 of file card_reader.h.
typedef Glib::RefPtr<window_card_reader> window_card_reader::pointer |
Definition at line 39 of file card_reader.h.
window_card_reader::~window_card_reader | ( | ) | [virtual] |
The destructor.
Definition at line 27 of file card_reader.cc.
window_card_reader::window_card_reader | ( | calculator_gnome * | dst | ) | [private] |
The constructor. It is private on purpose, use the create class method instead.
Definition at line 32 of file card_reader.cc.
window_card_reader::window_card_reader | ( | ) | [private] |
The default constructor. Do not use.
window_card_reader::window_card_reader | ( | const window_card_reader & | rhs | ) | [private] |
The copy constructor. Do not use.
rhs | The right hand side of the initialization. |
window_card_reader::pointer window_card_reader::create | ( | calculator_gnome * | dst | ) | [static] |
The create class method is used to create new dynamicall allocated isnatnces of this class.
dst | The destination, the calulator into which the program is to be loaded. |
Definition at line 59 of file card_reader.cc.
void window_card_reader::done | ( | void | ) | [private] |
The done method is used to dismiss the window when the last of the last simulated card has passed under the simulated card reader.
Definition at line 248 of file card_reader.cc.
bool window_card_reader::empty | ( | void | ) | const [private] |
The empty method is used to determine whether or not any cards are presently loaded into the card reader simulation.
Definition at line 181 of file card_reader.cc.
bool window_card_reader::is_busy | ( | void | ) |
The is_busy method may be used to determine whether or not the card reader is currently animating the reading of a card set.
Definition at line 278 of file card_reader.cc.
bool window_card_reader::on_animation_timer | ( | void | ) | [private] |
The on_animation_timer method is used to update the card positions each time the animation timer ticks over.
Definition at line 189 of file card_reader.cc.
window_card_reader& window_card_reader::operator= | ( | const window_card_reader & | rhs | ) | [private] |
The assignment operator. Do not use.
rhs | The right hand side of the assignment. |
bool window_card_reader::start | ( | const std::string & | src, |
bool | binary = false |
||
) |
The start method is used to start the card reader animation going.
src | The source, the file to read to obtain the program. |
binary | Whether or not he file containing the program to be loaded is assembler text (false) or binary (true). |
Definition at line 89 of file card_reader.cc.
sigc::connection window_card_reader::animation_timer [private] |
The animation_timer instance variable is used to remember the timer being used to animate the cards, vis a the on_animation_timer method.
Definition at line 128 of file card_reader.h.
The card_image_widgets instance variable is used to remember the Gtk::Image instances, one for each card pixbuf.
Definition at line 115 of file card_reader.h.
The card_pixbufs instance variable is used to remember the images of each vcard to be animated. They are actually faithful images of the cards that the program would require.
Definition at line 105 of file card_reader.h.
int window_card_reader::current_address [private] |
The current_address instance variable is used to remember the address from which to fetch the next opcode to be forwarded to the dst destination.
Definition at line 151 of file card_reader.h.
size_t window_card_reader::current_card_number [private] |
The current_card_number instance variable is used to remember which card is currently being animated. Once this exceeds the size of card_image_widgets, we are done.
Definition at line 158 of file card_reader.h.
double window_card_reader::current_card_started [private] |
The current_card_started instance variable is used to remember the time in seconds (see getdaytime(2)) that the current phase of the current card started reading. The time implies the position, thanks to pixels_per_second.
Definition at line 174 of file card_reader.h.
bool window_card_reader::currently_moving_left [private] |
The currently_moving_left instance variable is used to remember whether the current card is moving left (true) or moving up (false). Only when moving up does the card pass under the simulated card reader.
Definition at line 166 of file card_reader.h.
calculator_proxy window_card_reader::dst [private] |
The dst instance variable is used to remember the program, and also where to forward opcodes to, at the right time.
Definition at line 88 of file card_reader.h.
Gtk::Fixed window_card_reader::layout [private] |
The layout instance variable is used to remember the positions of each of the card image widgets.
Definition at line 94 of file card_reader.h.
int window_card_reader::pixels_per_instruction [private] |
The pixels_per_instruction instance variable is used to remember how many pixels pass under the read position for one instruction. This is used within on_animation_timer to determine when to forward opcodes.
Definition at line 144 of file card_reader.h.
double window_card_reader::pixels_per_second [private] |
The pixels_per_second instance variable is used to remember how man pixels of the card image pass under the read head per second. This ensures that each card takes 4 seconds to read, but this isn't a constant becaise each display is different.
Definition at line 136 of file card_reader.h.