Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/network/src/util/ArgReader.h @ 1494

Last change on this file since 1494 was 1494, checked in by rgrieder, 16 years ago
  • set the svn:eol-style property to all files so, that where ever you check out, you'll get the right line endings (had to change every file with mixed endings to windows in order to set the property)
  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1/* *   ORXONOX - the hottest 3D action shooter ever to exist *                    > www.orxonox.net < * * *   License notice: * *   This program is free software; you can redistribute it and/or *   modify it under the terms of the GNU General Public License *   as published by the Free Software Foundation; either version 2 *   of the License, or (at your option) any later version. * *   This program is distributed in the hope that it will be useful, *   but WITHOUT ANY WARRANTY; without even the implied warranty of *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *   GNU General Public License for more details. * *   You should have received a copy of the GNU General Public License *   along with this program; if not, write to the Free Software *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. * *   Author: *      Benjamin Knecht <beni_at_orxonox.net> *   Co-authors: *      ... * *//**
2 @file  Argreader.h
3 @brief reads arguments
4 @author Benjamin Knecht <beni_at_orxonox.net>
5 */
6
7#ifndef _ArgReader_H__
8#define _ArgReader_H__
9
10#include "UtilPrereqs.h"#include <string>
11class _UtilExport ArgReader
12{
13  public:
14    ArgReader(int argc, char **argv);
15    void checkArgument(std::string option, std::string& string, bool must=false);
16    void checkArgument(std::string option, int& integer, bool must=false);
17    void checkArgument(std::string option, float& floating, bool must=false);
18    bool errorHandling();
19  private:
20    int checkOption(std::string option);
21
22  private:
23    int counter_;
24    char **arguments_;
25    bool fail_;
26    std::string errorStr_;
27};
28
29#endif /* _ArgReader_H__ */
Note: See TracBrowser for help on using the repository browser.