#include <configuration.h>
Public Types | |
enum | CRITERIUM { DATE, PATH, DOMAIN } |
What statistics do we keep: for date, path or domain? More... | |
Public Methods | |
Configuration () | |
~Configuration () | |
CRITERIUM | format () const |
Return format criterium (as in the configuration file). | |
unsigned int | max_level () const |
Maximum element of levels(). | |
const set<unsigned int>& | levels () const |
Category levels we keep. | |
bool | parse (istream &) |
Parse a configuration file/stream. | |
Private Attributes | |
CRITERIUM | format_ |
set<unsigned int> | levels_ |
unsigned int | max_level_ |
Definition at line 9 of file configuration.h.
|
What statistics do we keep: for date, path or domain?
Definition at line 12 of file configuration.h. 00012 { DATE, PATH, DOMAIN }; |
|
Definition at line 6 of file configuration.C. 00006 : format_(DATE), max_level_(0) { 00007 } |
|
Definition at line 14 of file configuration.h. 00014 {} |
|
Return format criterium (as in the configuration file).
Definition at line 17 of file configuration.h. Referenced by Stats::add().
00017 { return format_; } |
|
Maximum element of levels().
Definition at line 19 of file configuration.h. Referenced by Stats::add().
00019 { return max_level_; } |
|
Category levels we keep.
Definition at line 21 of file configuration.h. Referenced by Stats::add().
00021 { return levels_; } |
|
Parse a configuration file/stream.
Definition at line 10 of file configuration.C. Referenced by main().
00010 { 00011 /* This is just a test implementation, we arbirarily set format_, 00012 levels_ end max_level_ in order to make testing Stats possible. 00013 I tested by commenting out approriate parts of the code below. 00014 */ 00015 /* 00016 // DOMAIN test I tested by commenting out approriate parts of the code below. 00017 format_ = DOMAIN; 00018 levels_.insert(1); 00019 levels_.insert(2); 00020 levels_.insert(3); 00021 max_level_ = 3; 00022 */ 00023 /* 00024 // PATH test 00025 format_ = PATH; 00026 levels_.insert(1); 00027 levels_.insert(2); 00028 levels_.insert(3); 00029 levels_.insert(4); 00030 max_level_ = 4; 00031 */ 00032 // DATE test 00033 format_ = DATE; 00034 levels_.insert(1); 00035 levels_.insert(2); 00036 levels_.insert(3); 00037 levels_.insert(4); 00038 max_level_ = 3; 00039 00040 return true; 00041 } |
|
Definition at line 25 of file configuration.h. |
|
Definition at line 26 of file configuration.h. |
|
Definition at line 27 of file configuration.h. |