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_DETAILS_QUANTITY_H
00026 # define OGS_CORE_DETAILS_QUANTITY_H
00027
00028 # include <ogs/core/Detail.h>
00029 # include <ogs/core/details/Namespace.h>
00030
00031 OGS_BEGIN_CORE_DETAILS_NAMESPACE
00032
00038 class Quantity: public Detail {
00039 public:
00041 enum Aspect {
00042 AGE,
00043 HEIGHT,
00044 WEIGHT
00045 };
00046
00047 Quantity (Aspect aspect, float value);
00048
00049 Aspect getAspect () const;
00050 float getValue () const;
00051 void setValue (float value);
00052
00053 private:
00054 Aspect _aspect;
00055 float _value;
00056 };
00057
00064 inline Quantity::Quantity (Aspect aspect, float value):
00065 _aspect (aspect), _value (value) { }
00066
00072 inline Quantity::Aspect Quantity::getAspect () const {
00073 return (this->_aspect);
00074 }
00075
00081 inline float Quantity::getValue () const {
00082 return (this->_value);
00083 }
00084
00090 inline void Quantity::setValue (float value) {
00091 this->_value = value;
00092 }
00093
00094 OGS_END_CORE_DETAILS_NAMESPACE
00095
00096 # endif
00097
00098 #endif
00099