Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

Human.h

00001 /*
00002  * Human.h -- class interface for humans
00003  * Copyright (C) 2002  Eric Lemings <elemings@users.sourceforge.net>
00004  *
00005  * This software is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This software is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this software; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00018  * 02111-1307, USA
00019  *
00020  * RCS: $Id: Human.h,v 1.3 2003/04/13 05:25:21 elemings Exp $
00021  */
00022 
00023 #ifdef __cplusplus
00024 
00025 #  ifndef OGS_CREATURES_HUMANOIDS_HUMAN_H
00026 #    define OGS_CREATURES_HUMANOIDS_HUMAN_H
00027 
00028 #    include <ogs/core/Die.h>
00029 #    include <ogs/core/details/Maturity.h>
00030 #    include <ogs/creatures/Humanoid.h>
00031 #    include <ogs/creatures/humanoids/Namespace.h>
00032 
00033 OGS_BEGIN_CREATURES_HUMANOIDS_NAMESPACE
00034 
00046 class Human: public ogs::creatures::Humanoid,
00047              public ogs::core::details::Maturity {
00048   public:
00049     Human ();
00050 
00051     unsigned getAdultAge () const;
00052     unsigned getMiddleAge () const;
00053     unsigned getOldAge () const;
00054     unsigned getVenerableAge () const;
00055     const ogs::core::Die& getMaximumAge () const;
00056 
00057   protected:
00058     static ogs::core::Abilities createAbilities ();
00059 
00060   private:
00061     static const ogs::core::Die _maximumAge;
00062 };
00063 
00067 inline Human::Human ():
00068   Humanoid (ogs::core::Die (HIT_DIE, 1), createAbilities ()) {
00069   // empty constructor body
00070 }
00071 
00078 inline unsigned
00079 Human::getAdultAge () const {
00080   return (15);
00081 }
00082 
00089 inline unsigned
00090 Human::getMiddleAge () const {
00091   return (35);
00092 }
00093 
00100 inline unsigned
00101 Human::getOldAge () const {
00102   return (53);
00103 }
00104 
00111 inline unsigned
00112 Human::getVenerableAge () const {
00113   return (70);
00114 }
00115 
00122 inline const ogs::core::Die&
00123 Human::getMaximumAge () const {
00124   return (this->_maximumAge);
00125 }
00126 
00127 OGS_END_CREATURES_HUMANOIDS_NAMESPACE
00128 
00129 #  endif /* !defined OGS_CREATURES_HUMANOIDS_HUMAN_H */
00130 
00131 #endif /* defined __cplusplus */
00132 

Generated on Sun Apr 20 03:36:20 2003 for Open Gaming System (OGS) by doxygen1.3