monotone

monotone Mtn Source Tree

Root/rcs_file.hh

1#ifndef __RCS_FILE_HH__
2#define __RCS_FILE_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
9#include <vector>
10#include <string>
11#include <map>
12#include <boost/shared_ptr.hpp>
13
14struct rcs_admin
15{
16 std::string head;
17 std::string branch;
18 std::multimap<std::string, std::string> symbols;
19};
20
21struct rcs_delta
22{
23 std::string num;
24 std::string date;
25 std::string author;
26 std::vector<std::string> branches;
27 std::string next;
28 std::string state; // dead, Exp (or Stab, Rel)
29};
30
31struct rcs_deltatext
32{
33 std::string num;
34 std::string log;
35 std::string text;
36};
37
38struct rcs_file
39{
40 rcs_admin admin;
41 std::map<std::string, boost::shared_ptr<rcs_delta> > deltas;
42 std::map<std::string, boost::shared_ptr<rcs_deltatext> > deltatexts;
43 void push_delta(rcs_delta const & d)
44 {
45 boost::shared_ptr<rcs_delta> dp(new rcs_delta(d));
46 deltas.insert(make_pair(dp->num,dp));
47 }
48 void push_deltatext(rcs_deltatext const & dt)
49 {
50 boost::shared_ptr<rcs_deltatext> dp(new rcs_deltatext(dt));
51 deltatexts.insert(make_pair(dp->num, dp));
52 }
53};
54
55void parse_rcs_file(std::string const & filename, rcs_file & r);
56
57#endif // __RCS_FILE_HH__

Archive Download this file

Branches

Tags

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