FACT++  1.0
string FitsDumper::Format ( const string &  fmt,
const MyColumn col,
size_t  i 
) const
private

Definition at line 339 of file fitsdump.cc.

References Tools::Form(), GetDouble(), GetInteger(), and Tools::Scientific().

340 {
341  switch (*format.rbegin())
342  {
343  case 'd':
344  case 'i':
345  case 'o':
346  case 'u':
347  case 'x':
348  case 'X':
349  return Tools::Form(format.c_str(), GetDouble(col, i));
350 
351  case 'e':
352  case 'E':
353  case 'f':
354  case 'F':
355  case 'g':
356  case 'G':
357  case 'a':
358  case 'A':
359  return Tools::Form(format.c_str(), GetInteger(col, i));
360 
361  case 'h':
362  {
363  string rc = Tools::Scientific(GetDouble(col, i));
364  *remove_if(rc.begin(), rc.end(), ::isspace)=0;
365  return rc;
366  }
367  }
368 
369  return "";
370 }
int i
Definition: db_dim_client.c:21
int64_t GetInteger(const MyColumn &, size_t) const
Definition: fitsdump.cc:307
std::string Form(const char *fmt,...)
Definition: tools.cc:45
std::string Scientific(uint64_t val)
Definition: tools.cc:148
double GetDouble(const MyColumn &, size_t) const
Definition: fitsdump.cc:275

+ Here is the call graph for this function: