⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 args2.h

📁 一个用MATLAB语言编写的摄像机标定工具箱,内容丰富
💻 H
字号:
//
// args2.h
//
// $Id: args2.h,v 1.1.1.1 2001/02/28 00:28:35 cstolte Exp $
//

#ifndef SGL_ARGS2_H
#define SGL_ARGS2_H

#include <sgl/defs.h>

class Arg;

class ArgParser2 {
public:
  ArgParser2();
  ~ArgParser2();

  void optional(const char *sw, const char *helpstr, 
		int *i, int num);
  void optional(const char *sw, const char *helpstr, 
		double *d, int num);
  void optional(const char *sw, const char *helpstr, 
		float *f, int num);
  void optional(const char *sw, const char *helpstr, 
		char **str, int num);
  void optional(const char *sw, const char *helpstr, bool *b);
  void optional(char ***floaters, const char *helpstr, int num);
  void optional(char **floater, const char *helpstr);
 
  void required(const char *sw, const char *helpstr, 
		int *i, int num);
  void required(const char *sw, const char *helpstr,
		double *d, int num);
  void required(const char *sw, const char *helpstr,
		float *f, int num);
  void required(const char *sw, const char *helpstr,
		char **str, int num);
  void required(char ***floaters, const char *helpstr, int num);
  void required(char **floater, const char *helpstr);

  void process(const char *prog_name, int argc, char **argv);
  void print_help(const char *prog_name) const;

  friend std::ostream &operator<<(std::ostream &os, const ArgParser2 &ap);

private:
  Arg *item_list;

  bool added_floaters, floaters_required;
  int wanted_floaters, floaters_pos;
  char **floaters;
  char *floater_help;

  void add_arg(Arg *a);
};

#endif /* SGL_ARGS2_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -