4 #ifndef tools_file_format
5 #define tools_file_format
48 #define TOOLS_GLOBAL_EXT(a_name)\
49 inline const std::string& s_ext_##a_name() {\
50 static const std::string s_v("."+std::string(#a_name));\
89 #undef TOOLS_GLOBAL_EXT
91 inline void formats(std::vector<std::string>& a_v) {
93 a_v.push_back(s_format_guessed());
94 a_v.push_back(s_format_hdf5());
95 a_v.push_back(s_format_fits());
96 a_v.push_back(s_format_fog());
97 a_v.push_back(s_format_dot());
98 a_v.push_back(s_format_dcm());
99 a_v.push_back(s_format_iv());
100 a_v.push_back(s_format_wrl());
101 a_v.push_back(s_format_jpeg());
102 a_v.push_back(s_format_png());
103 a_v.push_back(s_format_root());
104 a_v.push_back(s_format_dst());
105 a_v.push_back(s_format_csv());
106 a_v.push_back(s_format_hippo());
107 a_v.push_back(s_format_scenarios());
108 a_v.push_back(s_format_slides());
109 a_v.push_back(s_format_zvid());
110 a_v.push_back(s_format_exsg());
111 a_v.push_back(s_format_bsg());
112 a_v.push_back(s_format_gdml());
113 a_v.push_back(s_format_mac());
114 a_v.push_back(s_format_cmnd());
115 a_v.push_back(s_format_aida());
116 a_v.push_back(s_format_jive());
117 a_v.push_back(s_format_heprep());
118 a_v.push_back(s_format_zheprep());
119 a_v.push_back(s_format_lua());
120 a_v.push_back(s_format_py());
121 a_v.push_back(s_format_kumac());
122 a_v.push_back(s_format_insh());
123 a_v.push_back(s_format_shp());
124 a_v.push_back(s_format_simbad());
127 inline std::string
ext_fmt(
const std::string& a_ext) {
128 if(a_ext==s_ext_fits())
return s_format_fits();
129 if(a_ext==s_ext_aida())
return s_format_aida();
130 if(a_ext==s_ext_root())
return s_format_root();
131 if(a_ext==s_ext_dst())
return s_format_dst();
132 if(a_ext==s_ext_csv())
return s_format_csv();
133 if(a_ext==s_ext_tnt())
return s_format_hippo();
134 if(a_ext==s_ext_hiptxt())
return s_format_hippo();
135 if(a_ext==s_ext_hdf5())
return s_format_hdf5();
136 if(a_ext==s_ext_jpeg())
return s_format_jpeg();
137 if(a_ext==s_ext_jpg())
return s_format_jpeg();
138 if(a_ext==s_ext_png())
return s_format_png();
139 if(a_ext==s_ext_fog())
return s_format_fog();
140 if(a_ext==s_ext_dot())
return s_format_dot();
141 if(a_ext==s_ext_dcm())
return s_format_dcm();
142 if(a_ext==s_ext_iv())
return s_format_iv();
143 if(a_ext==s_ext_hiv())
return s_format_iv();
144 if(a_ext==s_ext_wrl())
return s_format_wrl();
145 if(a_ext==s_ext_exsg())
return s_format_exsg();
146 if(a_ext==s_ext_bsg())
return s_format_bsg();
147 if(a_ext==s_ext_scenarios())
return s_format_scenarios();
148 if(a_ext==s_ext_slides())
return s_format_slides();
149 if(a_ext==s_ext_zvid())
return s_format_zvid();
150 if(a_ext==s_ext_gdml())
return s_format_gdml();
151 if(a_ext==s_ext_mac())
return s_format_mac();
152 if(a_ext==s_ext_cmnd())
return s_format_cmnd();
153 if(a_ext==s_ext_jive())
return s_format_jive();
154 if(a_ext==s_ext_heprep())
return s_format_heprep();
155 if(a_ext==s_ext_zheprep())
return s_format_zheprep();
156 if(a_ext==s_ext_lua())
return s_format_lua();
157 if(a_ext==s_ext_py())
return s_format_py();
158 if(a_ext==s_ext_kumac())
return s_format_kumac();
159 if(a_ext==s_ext_insh())
return s_format_insh();
160 if(a_ext==s_ext_shp())
return s_format_shp();
161 if(a_ext==s_ext_simbad())
return s_format_simbad();
162 return s_format_guessed();
166 if(a_format==s_format_guessed())
return true;
183 if(a_format==s_format_exsg())
return true;
188 if(a_format==s_format_bsg())
return true;
204 if(a_format==
"gl2ps_eps")
return true;
205 if(a_format==
"gl2ps_ps")
return true;
206 if(a_format==
"gl2ps_pdf")
return true;
207 if(a_format==
"gl2ps_svg")
return true;
208 if(a_format==
"gl2ps_tex")
return true;
209 if(a_format==
"gl2ps_pgf")
return true;
210 if(a_format==
"inzb_ps")
return true;
211 if(a_format==
"inzb_jpeg")
return true;
212 if(a_format==
"inzb_png")
return true;
217 if(a_format==
"inzb_ps")
return true;
218 if(a_format==
"inzb_jpeg")
return true;
219 if(a_format==
"inzb_png")
return true;
224 if(a_format==
"gl2ps_eps") {a_ext =
"eps";
return true;}
225 if(a_format==
"gl2ps_ps") {a_ext =
"ps";
return true;}
226 if(a_format==
"gl2ps_pdf") {a_ext =
"pdf";
return true;}
227 if(a_format==
"gl2ps_svg") {a_ext =
"svg";
return true;}
228 if(a_format==
"gl2ps_tex") {a_ext =
"tex";
return true;}
229 if(a_format==
"gl2ps_pgf") {a_ext =
"pgf";
return true;}
230 if(a_format==
"inzb_ps") {a_ext =
"ps";
return true;}
231 if(a_format==
"inzb_jpeg") {a_ext =
"jpeg";
return true;}
232 if(a_format==
"inzb_png") {a_ext =
"png";
return true;}