ldpk
ldpk_model_parser.h
Go to the documentation of this file.
1 #ifndef ldpk_model_parser_sdv
2 #define ldpk_model_parser_sdv
3 
4 #include <ldpk/tde4_ld_plugin.h>
5 #include <ldpk/ldpk_error.h>
6 #include <iostream>
7 #include <string>
8 
11 
12 namespace ldpk
13  {
17  {
18  private:
19  tde4_ld_plugin *_model;
20  bool _verbose;
21 
24  bool parse_string_optional(std::istream& cin,std::string& s);
26  void parse_string(std::istream& cin,const std::string& par,std::string& s);
28  void parse_double(std::istream& cin,const std::string& par,double& v);
30  void parse_int(std::istream& cin,const std::string& par,int& v);
32  void parse_bool(std::istream& cin,const std::string& par,bool& v);
33 
34  public:
35  model_parser(bool verbose = true):_model(0),_verbose(verbose)
36  { }
37  void set_model(tde4_ld_plugin* m)
38  { _model = m; }
43  void parse(std::istream& cin);
44  };
45  }
46 
47 #endif
Exception classes for ldpk.
A class for reading distortion model parameters from a stream. Might be helpful for testing...
Definition: ldpk_model_parser.h:16
The namespace of (most of the) things related to the Lens Distortion Plugin Kit.
Definition: ldpk.h:19
void parse(std::istream &cin)
Read parameter-value pairs from stream and set in model. Parameter names are as defined in the plugin...
Definition: ldpk_model_parser.C:70
Lens Distortion Plugin Base Class.
Definition: tde4_ld_plugin.h:29