monotone

monotone Mtn Source Tree

Root/rev_types.hh

1// Copyright (C) 2007 Zack Weinberg <zackw@panix.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#ifndef __REV_TYPES_HH__
11#define __REV_TYPES_HH__
12
13// This file contains forward declarations and typedefs for all of the basic
14// types associated with revision handling. It should be included instead
15// of (any or all of) basic_io.hh, cset.hh, graph.hh, paths.hh, revision.hh,
16// roster.hh, and database.hh when all that is necessary is these
17// declarations.
18
19#include <boost/shared_ptr.hpp>
20#include "vocab.hh"
21#include "numeric_vocab.hh"
22#include "hybrid_map.hh"
23#include "vector.hh"
24
25// full definitions in basic_io.hh
26namespace basic_io
27{
28 struct printer;
29 struct parser;
30 struct stanza;
31}
32
33// full definitions in cset.hh
34typedef std::map<attr_key, attr_value> attr_map_t;
35typedef u32 node_id;
36struct cset;
37struct editable_tree;
38
39// full definitions in graph.hh
40struct rev_graph;
41struct reconstruction_graph;
42typedef std::vector<id> reconstruction_path;
43typedef std::multimap<revision_id, revision_id> rev_ancestry_map;
44
45// full definitions in paths.hh
46class any_path;
47class bookkeeping_path;
48class file_path;
49class system_path;
50class path_component;
51
52// full definitions in revision.hh
53struct revision_t;
54typedef std::map<revision_id, boost::shared_ptr<cset> > edge_map;
55typedef edge_map::value_type edge_entry;
56
57// full definitions in rev_height.hh
58class rev_height;
59
60// full definitions in roster.hh
61struct node_id_source;
62struct node;
63struct dir_node;
64struct file_node;
65struct marking_t;
66class roster_t;
67class editable_roster_base;
68
69typedef boost::shared_ptr<node> node_t;
70typedef boost::shared_ptr<file_node> file_t;
71typedef boost::shared_ptr<dir_node> dir_t;
72typedef std::map<node_id, marking_t> marking_map;
73
74typedef std::map<path_component, node_t> dir_map;
75typedef hybrid_map<node_id, node_t> node_map;
76
77// (true, "val") or (false, "") are both valid attr values (for proper
78// merging, we have to widen the attr_value type to include a first-class
79// "undefined" value).
80typedef std::map<attr_key, std::pair<bool, attr_value> > full_attr_map_t;
81
82// full definitions in database.hh
83class database;
84class conditional_transaction_guard;
85class transaction_guard;
86
87typedef boost::shared_ptr<roster_t const> roster_t_cp;
88typedef boost::shared_ptr<marking_map const> marking_map_cp;
89typedef std::pair<roster_t_cp, marking_map_cp> cached_roster;
90
91typedef std::map<revision_id, cached_roster> parent_map;
92typedef parent_map::value_type parent_entry;
93
94#endif // __REV_TYPES_HH__
95
96// Local Variables:
97// mode: C++
98// fill-column: 76
99// c-file-style: "gnu"
100// indent-tabs-mode: nil
101// End:
102// 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