5
* Created on: Oct 6, 2009
7
* Copyright (c) 2009 Jacob Dekel
8
* $Id: Arguments.cpp 34 2009-11-07 06:15:58Z jacob $
10
* This program is free software: you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation, either version 3 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program. If not, see <http://www.gnu.org/licenses/>.
25
#include "HerculesStudio.h"
26
#include "Arguments.h"
30
Arguments Arguments::instance;
32
Arguments::Arguments() :
37
Arguments::~Arguments()
41
Arguments& Arguments::getInstance()
46
bool Arguments::helpRequested() const
51
const std::string& Arguments::configFileName() const
56
const std::string& Arguments::resourceFileName() const
61
int Arguments::parse(int argc, char * argv[])
66
if (argv[0][0] != '-') return(-1);
77
if (argc > 0) mConfigFile = argv[0];
83
if (argc > 0) mResourceFile = argv[0];
91
hOutDebug(1,"resource file:'" << mResourceFile << "'");
95
void Arguments::printUsage()
97
std::cout << "Usage:" << std::endl << std::endl
98
<< "\tHerculesStudio [ -f <hercules-config-file> ] [ -r <hercules-run-commands-file> ] [ -h ]"