Fawkes API  Fawkes Development Version
camargp.h
1 
2 /***************************************************************************
3  * camargp.h - Camera argument parser
4  *
5  * Created: Wed Apr 11 15:44:51 2007
6  * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
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 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __FIREVISION_FVUTILS_SYSTEM_CAMARGP_H_
25 #define __FIREVISION_FVUTILS_SYSTEM_CAMARGP_H_
26 
27 #include <fvcams/camera.h>
28 
29 #include <map>
30 #include <string>
31 #include <vector>
32 
33 namespace firevision {
34 #if 0 /* just to make Emacs auto-indent happy */
35 }
36 #endif
37 
39 {
40  public:
41  CameraArgumentParser(const char *as);
43 
44  bool has(std::string s) const;
45  std::string get(std::string s) const;
46  long int get_int(std::string s) const;
47  double get_float(std::string s) const;
48  std::map<std::string, std::string> parameters() const;
49  std::vector<std::string> arguments() const;
50  std::string cam_id() const;
51  std::string cam_type() const;
52 
53  private:
54  std::string _cam_type;
55  std::string _cam_id;
56  std::map<std::string, std::string> values;
57  std::vector<std::string> args;
58 };
59 
60 } // end namespace firevision
61 
62 #endif
~CameraArgumentParser()
Destructor.
Definition: camargp.cpp:114
CameraArgumentParser(const char *as)
Constructor.
Definition: camargp.cpp:71
Camera argument parser.
Definition: camargp.h:38
std::string cam_id() const
Get camera ID.
Definition: camargp.cpp:139
std::vector< std::string > arguments() const
Get the arguments.
Definition: camargp.cpp:228
bool has(std::string s) const
Check if an parameter was given.
Definition: camargp.cpp:152
double get_float(std::string s) const
Get the value of the given parameter as integer.
Definition: camargp.cpp:208
std::string cam_type() const
Get camera type.
Definition: camargp.cpp:127
long int get_int(std::string s) const
Get the value of the given parameter as integer.
Definition: camargp.cpp:184
std::map< std::string, std::string > parameters() const
Get a map of parameters.
Definition: camargp.cpp:238