FACT++  1.0
string FitsDumper::Format ( const string &  fmt,
const double &  val 
) const
private

Definition at line 372 of file fitsdump.cc.

References Dump(), first, Tools::Form(), and Tools::Scientific().

Referenced by Dump().

373 {
374  switch (*format.rbegin())
375  {
376  case 'd':
377  case 'i':
378  case 'o':
379  case 'u':
380  case 'x':
381  case 'X':
382  return Tools::Form(format.c_str(), int64_t(val));
383 
384  case 'e':
385  case 'E':
386  case 'f':
387  case 'F':
388  case 'g':
389  case 'G':
390  case 'a':
391  case 'A':
392  return Tools::Form(format.c_str(), val);
393 
394  case 'h':
395  {
396  string rc = Tools::Scientific(val);
397  *remove_if(rc.begin(), rc.end(), ::isspace)=0;
398  return rc;
399  }
400  }
401 
402  return "";
403 }
std::string Form(const char *fmt,...)
Definition: tools.cc:45
std::string Scientific(uint64_t val)
Definition: tools.cc:148

+ Here is the call graph for this function:

+ Here is the caller graph for this function: