include/material-benefit.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 #include "slink-node.hpp"
00025 #include <stdio.h>
00026 
00027 #ifndef _MATERIAL_BENEFIT_HPP_
00028 #define _MATERIAL_BENEFIT_HPP_
00029 
00030 #define MB_BLADE "Blade"
00031 #define MB_GUN   "Gun"
00032 #define MB_HIGH_PASSAGE "High Passage"
00033 #define MB_LOW_PASSAGE  "Low Passage"
00034 #define MB_TAS          "Traveller's Aid Society"
00035 
00038 #define MB_SCOUT                "Type \"S\" Scout"
00039 #define MB_FREE_TRADER  "Type \"A\" Free Trader"
00040 #define MB_FAT_TRADER   "Fat Trader"
00041 #define MB_CORSAIR  "Type \"C\" Corsair"
00042 #define MB_YACHT    "Type \"Y\" Yacht"
00043 #define MB_SEEKER       "Seeker"
00044 #define MB_SAFARI   "Safari Ship"
00045 #define MB_LAB      "Laboratory Ship" 
00046 
00047 #define MB_TAG "material-benefit"
00048 #define MB_TYPE "material-benefit-type"
00049 #define MB_QUANTITY "material-benefit-quantity"
00050 #define MB_AGE "material-benefit-age"
00051 
00052 
00065 class materialBenefit: public slinkNode
00066 {
00067 public:
00074         materialBenefit(char *s);
00075         
00076                 
00083         void merge(materialBenefit *p);
00084         
00090         int getQuantity();
00091         
00097         void setQuantity(int q);
00098         
00104         char *getSignature();
00105         
00111         virtual void XMLout(FILE* fout);
00112         
00113 protected:
00114 
00115 private:
00116         char* signature; /*<! Each subclass from this has it's own signature */
00117         int   quantity;
00118         
00119 };
00120 
00121 #endif // _MATERIAL_BENEFIT_HPP_

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