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>
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_unknown
34 }
35 selector_type;
36
37 void
38 complete_selector(std::string const & orig_sel,
39 std::vector<std::pair<selector_type, std::string> > const & limit,
40 selector_type & type,
41 std::set<std::string> & completions,
42 app_state & app);
43 std::vector<std::pair<selector_type, std::string> >
44 parse_selector(std::string const & str,
45 app_state & app);
46
47}; // namespace selectors
48
49// Local Variables:
50// mode: C++
51// fill-column: 76
52// c-file-style: "gnu"
53// indent-tabs-mode: nil
54// End:
55// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
56
57#endif // __SELECTORS_HH__

Archive Download this file

Branches

Tags

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