1 | #ifndef __RCS_FILE_HH__␊ |
2 | #define __RCS_FILE_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 "vector.hh"␊ |
14 | #include <map>␊ |
15 | #include <boost/shared_ptr.hpp>␊ |
16 | ␊ |
17 | struct rcs_admin␊ |
18 | {␊ |
19 | std::string head;␊ |
20 | std::string branch;␊ |
21 | std::multimap<std::string, std::string> symbols;␊ |
22 | };␊ |
23 | ␊ |
24 | struct rcs_delta␊ |
25 | {␊ |
26 | std::string num;␊ |
27 | std::string date;␊ |
28 | std::string author;␊ |
29 | std::vector<std::string> branches;␊ |
30 | std::string next;␊ |
31 | std::string state; // dead, Exp (or Stab, Rel)␊ |
32 | };␊ |
33 | ␊ |
34 | struct rcs_deltatext␊ |
35 | {␊ |
36 | std::string num;␊ |
37 | std::string log;␊ |
38 | std::string text;␊ |
39 | };␊ |
40 | ␊ |
41 | struct rcs_file␊ |
42 | {␊ |
43 | rcs_admin admin;␊ |
44 | std::map<std::string, boost::shared_ptr<rcs_delta> > deltas;␊ |
45 | std::map<std::string, boost::shared_ptr<rcs_deltatext> > deltatexts;␊ |
46 | void push_delta(rcs_delta const & d)␊ |
47 | {␊ |
48 | boost::shared_ptr<rcs_delta> dp(new rcs_delta(d));␊ |
49 | deltas.insert(make_pair(dp->num,dp));␊ |
50 | }␊ |
51 | void push_deltatext(rcs_deltatext const & dt)␊ |
52 | {␊ |
53 | boost::shared_ptr<rcs_deltatext> dp(new rcs_deltatext(dt));␊ |
54 | deltatexts.insert(make_pair(dp->num, dp));␊ |
55 | }␊ |
56 | };␊ |
57 | ␊ |
58 | void parse_rcs_file(std::string const & filename, rcs_file & r);␊ |
59 | ␊ |
60 | // Local Variables:␊ |
61 | // mode: C++␊ |
62 | // fill-column: 76␊ |
63 | // c-file-style: "gnu"␊ |
64 | // indent-tabs-mode: nil␊ |
65 | // End:␊ |
66 | // vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:␊ |
67 | ␊ |
68 | #endif // __RCS_FILE_HH__␊ |