include/person-obj.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 "skill-list.hpp"
00025 #include "material-benefit-list.hpp"
00026 
00027 #ifndef _PERSON_OBJ_HPP_
00028 #define _PERSON_OBJ_HPP_
00029 class skillList;
00030 
00031 
00032 
00033 
00034 
00035 #define STRENGTH 0
00036 #define DEXTERITY 1
00037 #define ENDURANCE 2
00038 #define INTELLIGENCE 3
00039 #define EDUCATION 4 
00040 #define SOCIALSTANDING 5
00041 
00048 class personObj
00049 {
00050 public:
00054         personObj();
00055         
00062         void setStrength(int s);
00067         int  getStrength(); 
00068         
00074         void setDexterity(int d) ;
00075         
00081         int getDexterity();
00082         
00088         void setEndurance(int c);
00094         int getEndurance();
00095         
00101         int getIntelligence();
00102         
00108         void setIntelligence(int i);
00109         
00115         int getEducation();
00116         
00122         void setEducation(int e);
00123         
00129         void  setSocialStanding(int s);
00130         
00136         int   getSocialStanding();
00137         
00143         int getAge();
00144         
00150         void setAge(int a);
00151         
00159         void incrementAttribute(int attr,int incr);
00160         
00166         int getIndexedAttribute(int ix);
00167         
00172         void incrementStrength(int ix);
00173         
00178         void incrementDexterity(int ix);
00179         
00184         void incrementEndurance(int ix);
00185         
00190         void incrementIntelligence(int ix);
00191         
00196         void incrementEducation(int ix);
00197         
00202         void incrementSocialStanding(int ix);
00203         
00208         void incrementAge(int ix);
00209         
00217         void setService(char* s);
00218         
00225         char* getService();
00226         
00232         int wasRejected();
00239         void setAccepted(int i);
00240         
00246         int getAccepted();
00247         
00254         int survived();
00255         
00256         
00263         void setAlive(int a);
00264         
00271         int getAlive();
00272         
00279         void setTerms(int t);
00280         
00287         int getTerms();
00288         
00295         int getCommissioned();
00296         
00303         void setCommissioned(int c);
00304         
00311         void setRank(int r);
00312         
00319         int  getRank();
00325         void setCash(double c);
00326         
00332         double getCash();
00333         
00334         
00342         char** listOfSkills();
00343 
00344         
00351         char* toString();
00352         
00358         char* UPPasString();
00359         
00366         void addSkill(int s,int l);
00367         
00373         int skillCount();
00374         
00381         char* listOfSkillString();
00382         
00388         skillList* getSkillList();
00389         
00395         materialBenefitList* getBenefitList();
00396         
00402         void addMaterialBenefit(materialBenefit* b);
00403         
00404         
00405 protected:
00406 
00407 private:
00408         union {
00409                 struct {
00410                         int strength;
00411                         int dexterity;
00412                         int endurance;
00413                         int intelligence;
00414                         int education;
00415                         int social_standing;
00416                 } a;
00417                 int upp[6];
00418         } physical_stats;
00419         
00420         int age;
00421         char*       service;
00422         int         accepted;
00423         int                     alive;
00424         int             terms;
00425         int                     commissioned;
00426         int         rank;
00427         double          cash;
00428 
00429         skillList       *skills;
00430         materialBenefitList  *musterOutBenefits;
00431 };
00432 
00433 #endif // _PERSON_OBJ_HPP_

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