Minsky
minsky::anonymous_namespace{plotWidget.cc}::TimeFormatter Struct Reference
Collaboration diagram for minsky::anonymous_namespace{plotWidget.cc}::TimeFormatter:
Collaboration graph

Public Member Functions

 TimeFormatter (const std::string &format)
 
std::string operator() (const string &label, double x, double y) const
 

Public Attributes

std::string format
 

Detailed Description

Definition at line 540 of file plotWidget.cc.

Constructor & Destructor Documentation

◆ TimeFormatter()

minsky::anonymous_namespace{plotWidget.cc}::TimeFormatter::TimeFormatter ( const std::string &  format)
inline

Definition at line 543 of file plotWidget.cc.

Member Function Documentation

◆ operator()()

std::string minsky::anonymous_namespace{plotWidget.cc}::TimeFormatter::operator() ( const string &  label,
double  x,
double  y 
) const
inline

Definition at line 544 of file plotWidget.cc.

References minsky::str().

545  {
546  ostringstream r;
547  r.precision(3);
548  r<<label<<":("<<str(ptime(date(1970,Jan,1))+microseconds(static_cast<long long>(1E6*x)),format)
549  <<","<<y<<")";
550  return r.str();
551  }
std::string str(T x)
utility function to create a string representation of a numeric type
Definition: str.h:33
Here is the call graph for this function:

Member Data Documentation

◆ format

std::string minsky::anonymous_namespace{plotWidget.cc}::TimeFormatter::format

Definition at line 542 of file plotWidget.cc.


The documentation for this struct was generated from the following file: