00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef __cplusplus
00024
00025 # ifndef OGS_CORE_MATURITY_H
00026 # define OGS_CORE_MATURITY_H
00027
00028 # include <ogs/core/Die.h>
00029 # include <ogs/core/details/Namespace.h>
00030
00031 OGS_BEGIN_CORE_DETAILS_NAMESPACE
00032
00045 class Maturity {
00046 public:
00054 virtual unsigned getAdultAge () const = 0;
00055
00066 virtual unsigned getMiddleAge () const = 0;
00067
00075 virtual unsigned getOldAge () const = 0;
00076
00085 virtual unsigned getVenerableAge () const = 0;
00086
00095 virtual const Die& getMaximumAge () const = 0;
00096
00097 unsigned rollMaximumAge () const;
00098 };
00099
00107 inline unsigned Maturity::rollMaximumAge () const {
00108 const Die& maximumAge = getMaximumAge ();
00109 return (getVenerableAge () + maximumAge.rollValue ());
00110 }
00111
00112 OGS_END_CORE_DETAILS_NAMESPACE
00113
00114 # endif
00115
00116 #endif
00117