Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Configuration Class Reference

A Configuration object represents the httpstats configuration. More...

#include <configuration.h>

List of all members.

Public Types

enum  CRITERIUM { DATE, PATH, DOMAIN }

Public Methods

 Configuration ()
 ~Configuration ()
CRITERIUM format () const
unsigned int max_level () const
const set<unsigned int>& levels () const
bool parse (istream &)

Private Attributes

CRITERIUM format_
set<unsigned int> levels_
unsigned int max_level_


Detailed Description

A Configuration object represents the httpstats configuration.

Definition at line 9 of file configuration.h.


Member Enumeration Documentation

enum Configuration::CRITERIUM
 

Enumeration values:
DATE  
PATH  
DOMAIN  

Definition at line 11 of file configuration.h.

00011 { DATE, PATH, DOMAIN };


Constructor & Destructor Documentation

Configuration::Configuration ( )
 

Definition at line 6 of file configuration.C.

00006                             : format_(DATE), max_level_(0) {
00007 }

Configuration::~Configuration ( ) [inline]
 

Definition at line 13 of file configuration.h.

00013 {}


Member Function Documentation

CRITERIUM Configuration::format ( ) const [inline]
 

Definition at line 15 of file configuration.h.

Referenced by Stats::add().

00015 { return format_; }

unsigned int Configuration::max_level ( ) const [inline]
 

Definition at line 16 of file configuration.h.

Referenced by Stats::add().

00016 { return max_level_; }

const set< unsigned int > & Configuration::levels<unsigned int> ( ) const [inline]
 

Definition at line 17 of file configuration.h.

Referenced by Stats::add().

00017 { return levels_; }

bool Configuration::parse ( istream & is )
 

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_ = 4;
00039 return true;
00040 }


Member Data Documentation

CRITERIUM Configuration::format_ [private]
 

Definition at line 21 of file configuration.h.

set< unsigned int > Configuration::levels_<unsigned int> [private]
 

Definition at line 22 of file configuration.h.

unsigned int Configuration::max_level_ [private]
 

Definition at line 23 of file configuration.h.


The documentation for this class was generated from the following files:
httpstats-stage02a [ 7 April, 2001]