monotone

monotone Mtn Source Tree

Root/app_state.hh

1#ifndef __APP_STATE_HH__
2#define __APP_STATE_HH__
3
4// Copyright (C) 2002 Graydon Hoare <graydon@pobox.com>
5//
6// This program is made available under the GNU GPL version 2.0 or
7// greater. See the accompanying file COPYING for details.
8//
9// This program is distributed WITHOUT ANY WARRANTY; without even the
10// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11// PURPOSE.
12
13#include <boost/shared_ptr.hpp>
14#include "botan/rng.h"
15
16#include "options.hh"
17#include "lua_hooks.hh"
18
19// This class holds any state that needs to be persistent across multiple
20// commands, or be accessible to the lua hooks (which includes anything
21// needed by mtn_automate()).
22
23class app_state_private;
24class database_impl;
25class app_state
26{
27 boost::shared_ptr<app_state_private> _hidden;
28public:
29 explicit app_state();
30 ~app_state();
31
32 boost::shared_ptr<database_impl> &
33 lookup_db(system_path const & f);
34
35 options opts;
36 lua_hooks lua;
37 bool mtn_automate_allowed;
38 boost::shared_ptr<Botan::RandomNumberGenerator> rng;
39};
40
41// Local Variables:
42// mode: C++
43// fill-column: 76
44// c-file-style: "gnu"
45// indent-tabs-mode: nil
46// End:
47// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
48
49#endif // __APP_STATE_HH__

Archive Download this file

Branches

Tags

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