synfig-core  1.0.3
optionsprocessor.h
Go to the documentation of this file.
1 /* === S Y N F I G ========================================================= */
23 /* ========================================================================= */
24 
25 #ifndef __SYNFIG_OPTIONSPROCESSOR_H
26 #define __SYNFIG_OPTIONSPROCESSOR_H
27 
28 #include <string>
29 #include <vector>
30 #include <synfig/canvas.h>
31 #include <boost/filesystem.hpp>
32 #include <boost/program_options.hpp>
33 
34 // TODO rename to CommandLineHandler and move the options creation inside.
37 {
38 public:
39  OptionsProcessor(boost::program_options::variables_map& vm,
40  const boost::program_options::options_description& po_visible);
41 
42 #ifdef _DEBUG
43  void process_debug_options() throw (SynfigToolException&);
44 #endif
45 
49 
52  void process_info_options();
53 
57  Job extract_job();
58 
61 
65 
66  void print_target_video_codecs_help() const;
67 
68 private:
71  void extract_canvas_info(Job& job);
72 
73  boost::program_options::variables_map _vm;
74  boost::program_options::options_description _po_visible;
75 
76  struct VideoCodec
77  {
78  VideoCodec(const std::string& name_, const std::string& description_)
79  : name(name_), description(description_)
80  { }
81 
82  std::string name, description;
83  };
87  std::vector<VideoCodec> _allowed_video_codecs;
88 };
89 
90 #endif // __SYNFIG_OPTIONSPROCESSOR_H