monotone

monotone Mtn Source Tree

Root/app_state.hh

1#ifndef __APP_STATE_HH__
2#define __APP_STATE_HH__
3
4// copyright (C) 2002, 2003 graydon hoare <graydon@pobox.com>
5// all rights reserved.
6// licensed to the public under the terms of the GNU GPL (>= 2)
7// see the file COPYING for details
8
9class app_state;
10class lua_hooks;
11
12#include <string>
13
14#include "database.hh"
15#include "lua.hh"
16#include "work.hh"
17#include "vocab.hh"
18
19// this class is supposed to hold all (or.. well, most) of the state of the
20// application, barring some unfortunate static objects like the debugging /
21// logging system and the command objects, for the time being. the vague intent
22// being to make life easier for anyone who wants to embed this program as a
23// library someday
24
25class app_state
26{
27public:
28 rsa_keypair_id signing_key;
29 utf8 branch_name;
30 database db;
31 lua_hooks lua;
32 bool options_changed;
33 options_map options;
34
35 void set_branch(utf8 const & name);
36 void set_database(utf8 const & filename);
37 void set_signing_key(utf8 const & key);
38 void write_options();
39
40 explicit app_state();
41 ~app_state();
42private:
43};
44
45#endif // __APP_STATE_HH__

Archive Download this file

Branches

Tags

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