00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _DECAF_UTIL_LOGGING_LEVEL_H_
00019 #define _DECAF_UTIL_LOGGING_LEVEL_H_
00020
00021 #include <decaf/util/Config.h>
00022
00023 #include <decaf/lang/Comparable.h>
00024 #include <decaf/lang/exceptions/IllegalArgumentException.h>
00025
00026 namespace decaf {
00027 namespace util {
00028 namespace logging {
00029
00056 class DECAF_API Level : public decaf::lang::Comparable<Level> {
00057 private:
00058
00059 std::string name;
00060 int value;
00061
00062 public:
00063
00068 static const Level INHERIT;
00069
00074 static const Level OFF;
00075
00083 static const Level SEVERE;
00084
00091 static const Level WARNING;
00092
00100 static const Level INFO;
00101
00110 static const Level DEBUG;
00111
00120 static const Level CONFIG;
00121
00137 static const Level FINE;
00138
00144 static const Level FINER;
00145
00149 static const Level FINEST;
00150
00155 static const Level ALL;
00156
00157 protected:
00158
00167 Level( const std::string& name, int value );
00168
00169 public:
00170
00171 virtual ~Level();
00172
00176 int intValue() const {
00177 return this->value;
00178 }
00179
00183 std::string getName() const {
00184 return this->name;
00185 }
00186
00190 std::string toString() const {
00191 return this->name;
00192 }
00193
00194 public:
00195
00196 virtual int compareTo( const Level& value ) const;
00197
00198 virtual bool equals( const Level& value ) const;
00199
00200 virtual bool operator==( const Level& value ) const;
00201
00202 virtual bool operator<( const Level& value ) const;
00203
00204 public:
00205
00226 static Level parse( const std::string& name );
00227
00228 };
00229
00230 }}}
00231
00232 #endif