Ignore:
Timestamp:
Apr 30, 2007, 11:54:25 PM (14 years ago)
Author:
Peter Johansson
Message:

turned Configuration class into a singleton

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Configuration.cc

    r229 r264  
    3535namespace svndigest{
    3636
     37  Configuration* Configuration::instance_=NULL;
     38
     39
    3740  Configuration::Configuration(void)
     41  {
     42  }
     43
     44
     45  void Configuration::load(void)
    3846  {
    3947    set_default();
     
    4149
    4250
    43   Configuration::Configuration(std::istream& is)
     51  void Configuration::load(std::istream& is)
    4452  {
    4553    assert(is.good());
     
    6674      }
    6775    }
     76  }
     77
     78
     79  Configuration* Configuration::instance(void)
     80  {
     81    if (!instance_)
     82      instance_ = new Configuration;
     83    return instance_;
    6884  }
    6985
Note: See TracChangeset for help on using the changeset viewer.