Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

OFIRMA.H Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

OFIRMA.H

Go to the documentation of this file.
00001 //Filename    : OFIRMA.H
00002 //Description : Object Firm Array
00003 //owner         : ho
00004 
00005 #ifndef __OFIRMA_H
00006 #define __OFIRMA_H
00007 
00008 #ifndef __ODYNARRB_H
00009 #include <ODYNARRB.H>
00010 #endif
00011 
00012 //--------- Define class FirmArray ----------//
00013 
00014 class Firm;
00015 
00019 class FirmArray : public DynArrayB {
00020 public:
00021     int  selected_recno;                          // the firm current being selected
00022 
00023     int  touched_recno;                           // the firm which the mouse cursor currently touches
00024     int  touched_frame_count;
00025 
00026 public:
00027     FirmArray();
00028     ~FirmArray();
00029 
00030     void  init();
00031     void  deinit();
00032 
00033     int add_firm(int xLoc, int yLoc, int firmId);
00034     int create_firm(int firmId);
00035     void  select_firm(int firmRecno);
00036 
00037     void  del_firm(int);
00038     int   firm_class_size(int);
00039 
00040     int   process();
00041     void  next_day();
00042     void  next_month();
00043     void  next_year();
00044 
00045     void  skip(int);
00046 
00047     int   write_file(File*);
00048     int   read_file(File*);
00049 
00050 #ifdef DEBUG
00051     Firm* operator()();                           // reference to current Firm record
00052     Firm* operator[](int recNo);
00053 #else
00054     Firm* operator()()          { return (Firm*) get_ptr(); }
00055     Firm* operator[](int recNo)   { return (Firm*) get_ptr(recNo); }
00056 #endif
00057 
00058     int   is_deleted(int recNo)                   // whether the item is deleted or not
00059         { return get_ptr(recNo) == NULL; }
00060 
00061 };
00062 
00063 //---------------------------------------------//
00064 
00065 extern FirmArray firm_array;
00066 
00067 //---------------------------------------------//
00068 #endif

Generated on Fri Aug 23 01:37:40 2002 for VirtualU by doxygen1.2.17