monotone

monotone Mtn Source Tree

Root/selectors.hh

1#ifndef __SELECTORS_HH__
2#define __SELECTORS_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 <algorithm>
15#include <set>
16
17class app_state;
18
19namespace selectors
20{
21
22 typedef enum
23 {
24 sel_author,
25 sel_branch,
26 sel_head,
27 sel_date,
28 sel_tag,
29 sel_ident,
30 sel_cert,
31 sel_earlier,
32 sel_later,
33 sel_parent,
34 sel_unknown
35 }
36 selector_type;
37
38 void
39 complete_selector(std::string const & orig_sel,
40 std::vector<std::pair<selector_type, std::string> > const & limit,
41 selector_type & type,
42 std::set<std::string> & completions,
43 app_state & app);
44 std::vector<std::pair<selector_type, std::string> >
45 parse_selector(std::string const & str,
46 app_state & app);
47
48}; // namespace selectors
49
50// Local Variables:
51// mode: C++
52// fill-column: 76
53// c-file-style: "gnu"
54// indent-tabs-mode: nil
55// End:
56// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
57
58#endif // __SELECTORS_HH__

Archive Download this file

Branches

Tags

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