monotone

monotone Mtn Source Tree

Root/commands.hh

1#ifndef __COMMANDS_HH__
2#define __COMMANDS_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 <string>
14#include <vector>
15#include <set>
16
17// this defines a global function which processes command-line-like things,
18// possibly from the command line and possibly internal scripting if we ever
19// bind tcl or lua or something in here
20
21class app_state;
22class utf8;
23
24struct usage
25{
26 usage(std::string const & w) : which(w) {}
27 std::string which;
28};
29
30namespace commands {
31 void explain_usage(std::string const & cmd, std::ostream & out);
32 std::string complete_command(std::string const & cmd);
33 int process(app_state & app, std::string const & cmd, std::vector<utf8> const & args);
34 std::set<int> command_options(std::string const & cmd);
35};
36
37// Local Variables:
38// mode: C++
39// fill-column: 76
40// c-file-style: "gnu"
41// indent-tabs-mode: nil
42// End:
43// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
44
45#endif

Archive Download this file

Branches

Tags

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