hospital.h

Go to the documentation of this file.
00001 // Class Name: hospital
00002 //
00003 // Purpose:
00004 //
00005 //   Provides a simple hospital drawing that can be plotted on a canvas.
00006 //
00007 // Model:
00008 //
00009 //   The origin of the hospital corresponds with the lower left corner of
00010 //   the drawing.
00011 //
00012 // Methods:
00013 //
00014 //   hospital(origin, draw_on)
00015 //       The constructor accepts an "origin" for the hospital and a target
00016 //       window to "draw_on".
00017 //
00018 //   draw()
00019 //       Plots the hospital on its current canvas.
00020 //
00021 //   erase()
00022 //       Draws the hospital in its current canvas's background color.
00023 //
00024 //   dimensions()
00025 //       Returns a rectangle that bounds the hospital at its current position.
00026 //
00027 //   set_origin(origin)
00028 //       Changes the location of the hospital for the next plot.
00029 
00030 #ifndef HOSPITAL_CLASS
00031 #define HOSPITAL_CLASS
00032 
00033 #include "fill_box.h"
00034 
00035 class hospital
00036 {
00037 public:
00038   hospital(const c_point &origin = c_point(0, 0), canvas *draw_on = NIL);
00039 
00040   void draw();
00041   void erase();
00042 
00043   c_rectangle dimensions();
00044 
00045   void set_origin(const c_point &origin);
00046 
00047 private:
00048   filled_box body;
00049   filled_box vertical_bar;
00050   filled_box horizontal_bar;
00051   canvas *my_canvas;
00052   c_point my_origin;
00053 };
00054 
00055 #endif

Generated on Fri Nov 28 04:29:34 2008 for HOOPLE Libraries by  doxygen 1.5.1