Frobby  0.9.5
main.h
Go to the documentation of this file.
1 /* Frobby: Software for monomial ideal computations.
2  Copyright (C) 2007 Bjarke Hammersholt Roune (www.broune.com)
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see http://www.gnu.org/licenses/.
16 */
17 #ifndef MAIN_GUARD
18 #define MAIN_GUARD
19 
20 // This function plays the role that main() usually would.
21 int frobbyMain(int argc, const char** argv);
22 
23 // This wraps around frobbyMain and adds debug capabilities when DEBUG
24 // is defined.
25 int main(int argc, const char** argv);
26 
27 // The exit codes below are returned from frobbyMain and main. The
28 // only part of these codes that can be counted on in future versions
29 // of Frobby is that a zero exit code means success, while a non-zero
30 // exit code indicates some kind of error.
31 
32 // Everything went well
33 static const int ExitCodeSuccess = 0;
34 
35 // A normal error occured, such as a syntax error.
36 static const int ExitCodeError = 1;
37 
38 // An error that should be impossible to trigger occured. This
39 // indicates a bug in Frobby.
40 static const int ExitCodeInternalError = 2;
41 
42 // Frobby ran out of memory.
43 static const int ExitCodeOutOfMemory = 3;
44 
45 // Frobby encountered an exception that it does not know about.
46 static const int ExitCodeUnknownError = 4;
47 
48 #endif
int main(int argc, const char **argv)
This function is the entry point for Frobby as a console program.
Definition: main.cpp:78
static const int ExitCodeInternalError
Definition: main.h:40
static const int ExitCodeUnknownError
Definition: main.h:46
static const int ExitCodeOutOfMemory
Definition: main.h:43
static const int ExitCodeSuccess
Definition: main.h:33
static const int ExitCodeError
Definition: main.h:36
int frobbyMain(int argc, const char **argv)
This function runs the Frobby console interface.
Definition: main.cpp:34