monotone

monotone Mtn Source Tree

Root/commands.hh

1#ifndef __COMMANDS_HH__
2#define __COMMANDS_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 <string>
10#include <vector>
11
12// this defines a global function which processes command-line-like things,
13// possibly from the command line and possibly internal scripting if we ever
14// bind tcl or lua or something in here
15
16class app_state;
17struct utf8;
18
19struct usage
20{
21 usage(std::string const & w) : which(w) {}
22 std::string which;
23};
24
25namespace commands {
26 void explain_usage(std::string const & cmd, std::ostream & out);
27 std::string complete_command(std::string const & cmd);
28 int process(app_state & app, std::string const & cmd, std::vector<utf8> const & args);
29 std::set<int> command_options(std::string const & cmd);
30};
31
32#endif

Archive Download this file

Branches

Tags

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