home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / install / fips / source / fipsspec.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-11  |  2.8 KB  |  100 lines

  1. /* 
  2.     FIPS - the First nondestructive Interactive Partition Splitting program 
  3.  
  4.     Module fipsspec.h 
  5.  
  6.     RCS - Header: 
  7.     $Header: c:/daten/fips/source/main/RCS/fipsspec.h 1.1 1994/05/25 22:20:28 schaefer Exp schaefer $ 
  8.  
  9.     Copyright (C) 1993 Arno Schaefer 
  10.  
  11.     This program is free software; you can redistribute it and/or modify 
  12.     it under the terms of the GNU General Public License as published by 
  13.     the Free Software Foundation; either version 2 of the License, or 
  14.     (at your option) any later version. 
  15.  
  16.     This program is distributed in the hope that it will be useful, 
  17.     but WITHOUT ANY WARRANTY; without even the implied warranty of 
  18.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  19.     GNU General Public License for more details. 
  20.  
  21.     You should have received a copy of the GNU General Public License 
  22.     along with this program; if not, write to the Free Software 
  23.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  24.  
  25.  
  26.     Report problems and direct all questions to: 
  27.  
  28.     schaefer@rbg.informatik.th-darmstadt.de 
  29. */ 
  30.  
  31. #ifndef FIPSSPEC_H 
  32. #define FIPSSPEC_H 
  33.  
  34. #include "logdr_st.h" 
  35. #include "hdstruct.h" 
  36.  
  37. class fips_bpb:public bios_parameter_block 
  38. public: 
  39.     void print (void); 
  40.     void calculate_new_boot (const partition_info &partition_info); 
  41. }; 
  42.  
  43. class fips_partition_table:public partition_table 
  44. public: 
  45.     void print (void); 
  46.     void calculate_new_root (dword new_start_cylinder,partition *partition,const drive_geometry &geometry); 
  47. }; 
  48.  
  49. class fips_harddrive:public harddrive 
  50.     fips_partition_table pr_partition_table; 
  51. protected: 
  52.     void get_geometry (void); 
  53. public: 
  54.     void reset (void); 
  55.     class partition_table &partition_table() { return pr_partition_table; } 
  56.     void print_partition_table (void) { pr_partition_table.print(); } 
  57.     void calculate_new_root (dword new_start_cylinder,partition *partition) 
  58.     { 
  59.         pr_partition_table.calculate_new_root (new_start_cylinder,partition,geometry); 
  60.     } 
  61.     void check (void); 
  62.  
  63.     fips_harddrive (int number):harddrive (number) { get_geometry(); }  // to write register info to debugfile 
  64.     fips_harddrive (fips_harddrive &hd):harddrive (hd) {} 
  65.     void operator= (fips_harddrive &hd) 
  66.     { 
  67.         harddrive::operator= (hd); 
  68.     } 
  69. }; 
  70.  
  71. class fips_logdrive_info:public logical_drive_info 
  72. public: 
  73.     void put_debug_info (void); 
  74. }; 
  75.  
  76. class fips_partition:public partition 
  77.     fips_bpb pr_bpb; 
  78.     fips_logdrive_info pr_info; 
  79. public: 
  80.     bios_parameter_block &bpb() { return pr_bpb; } 
  81.     logical_drive_info &info() { return pr_info; } 
  82.  
  83.     void print_bpb (void) { pr_bpb.print(); } 
  84.     void write_info_debugfile (void) { pr_info.put_debug_info(); } 
  85.     void calculate_new_boot (void) 
  86.     { 
  87.         pr_bpb.calculate_new_boot (*partition_info); 
  88.     } 
  89.     void check (void); 
  90.  
  91.     fips_partition (class fips_harddrive *drive,int number):partition(drive,number) {} 
  92. }; 
  93.  
  94. #endif 
  95.