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_MAGIC_RANGE_H
00026 # define OGS_MAGIC_RANGE_H
00027
00028 # include <ogs/magic/Namespace.h>
00029
00030 OGS_BEGIN_MAGIC_NAMESPACE
00031
00043 class Range {
00044 public:
00048 enum Type {
00050 PERSONAL = 1,
00051
00053 TOUCH,
00054
00056 ABSOLUTE,
00057
00059 CLOSE,
00060
00062 MEDIUM,
00063
00065 LONG,
00066
00068 UNLIMITED,
00069 };
00070
00071 static Range Personal ();
00072 static Range Touch ();
00073 static Range Unlimited ();
00074
00075 Type getType () const;
00076
00077 protected:
00078 Range (Type type);
00079
00080 private:
00081 Type _type;
00082 };
00083
00089 inline Range Range::Personal () {
00090 return (Range (Range::PERSONAL));
00091 }
00092
00098 inline Range Range::Touch () {
00099 return (Range (Range::TOUCH));
00100 }
00101
00107 inline Range Range::Unlimited () {
00108 return (Range (Range::UNLIMITED));
00109 }
00110
00116 inline Range::Range (Type type): _type (type) {
00117
00118 }
00119
00125 inline Range::Type Range::getType () const {
00126 return (this->_type);
00127 };
00128
00129 OGS_END_MAGIC_NAMESPACE
00130
00131 # endif
00132
00133 #endif
00134