include/book2/book2-ship-hull.hpp

00001 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
00002 /*
00003  * frpuniverse
00004  * Copyright (C) Peter L. Berghold 2008 <peter@berghold.net>
00005  * 
00006  * frpuniverse is free software.
00007  * 
00008  * You may redistribute it and/or modify it under the terms of the
00009  * GNU General Public License, as published by the Free Software
00010  * Foundation; either version 2 of the License, or (at your option)
00011  * any later version.
00012  * 
00013  * frpuniverse is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  * See the GNU General Public License for more details.
00017  * 
00018  * You should have received a copy of the GNU General Public License
00019  * along with frpuniverse.  If not, write to:
00020  *      The Free Software Foundation, Inc.,
00021  *      51 Franklin Street, Fifth Floor
00022  *      Boston, MA  02110-1301, USA.
00023  */
00024 
00025 #ifndef _BOOK2_SHIP_HULL_HPP_
00026 #define _BOOK2_SHIP_HULL_HPP_
00027 
00028 
00033 #define SH100 0
00034 #define SH200 1 
00035 #define SH400 2
00036 #define SH600 3
00037 #define SH800 4
00038 #define SH1000 5
00039 
00040 typedef enum {
00041         standard,custom
00042 } typeHull;
00043 
00044 
00045 class book2ShipHull
00046 {
00047 public:
00052         book2ShipHull();
00053         
00060         book2ShipHull(int ix);
00061         
00073         book2ShipHull(double m, double d);
00074         
00080         typeHull getHullType();
00081         
00087         void setHullType(typeHull t);
00088         
00089         
00090         /* 
00091          * get the hull size 
00092          * 
00093          * @return double value representing the hull size. 
00094          */
00095         double getSize();
00096         
00102         void setSize(double s);
00103         
00109         double getMainCompartment();
00110         
00116         void setMainCompartment(double s);
00117         
00124         double getDriveCompartment();
00125         
00131         void setDriveCompartment(double s);
00132         
00133         
00139         double getCost();
00140         
00146         void setCost(double c);
00147         
00148         
00154         int isStreamlined();
00155         
00161         void isStreamlined(int s);
00162         
00163 protected:
00164 
00165 private:
00166         typeHull        hullType;            /* Standard or custom */
00167         double      size;                /* How large? */
00168         double      mainCompartment;     /* How much is allocated to the main compartment? */
00169         double          driveCompartment;    /* How much is allocated to the drives? */
00170         double      cost;                /* Base hull cost */
00171         double      totalCost;           /* Adjusted hull cost */
00172         int         streamlined;         /* 1= streamlined  0= non-streamlined */
00173         
00174 };
00175 
00176 #endif // _BOOK2_SHIP_HULL_HPP_

Generated on Fri Mar 7 16:40:52 2008 for frpuniverse by  doxygen 1.4.7