monotone

monotone Mtn Source Tree

Root/app_state.cc

1// Copyright (C) 2002 Graydon Hoare <graydon@pobox.com>
2//
3// This program is made available under the GNU GPL version 2.0 or
4// greater. See the accompanying file COPYING for details.
5//
6// This program is distributed WITHOUT ANY WARRANTY; without even the
7// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8// PURPOSE.
9
10#include "base.hh"
11#include "app_state.hh"
12#include "database.hh"
13
14#include <map>
15
16class app_state_private
17{
18public:
19 std::map<system_path, boost::shared_ptr<database_impl> > databases;
20};
21
22app_state::app_state()
23 : _hidden(new app_state_private()), lua(this), mtn_automate_allowed(false),
24 rng(Botan::RandomNumberGenerator::make_rng())
25{}
26
27app_state::~app_state()
28{}
29
30boost::shared_ptr<database_impl> &
31app_state::lookup_db(system_path const & f)
32{
33 return _hidden->databases[f];
34}
35
36// Local Variables:
37// mode: C++
38// fill-column: 76
39// c-file-style: "gnu"
40// indent-tabs-mode: nil
41// End:
42// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status