r333: *** empty log message ***
[ctsim.git] / libctsim / array2dfile.cpp
index e0ab0a4e55d60bec0a5f3e4147ad27e2a0196798..49f90f45182c30c656ee2bdb17162cce4e01a059 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: array2dfile.cpp,v 1.25 2001/01/02 06:29:23 kevin Exp $
+**  $Id: array2dfile.cpp,v 1.26 2001/01/02 07:47:36 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -168,6 +168,21 @@ Array2dFileLabel::printBrief (std::ostream& os) const
     os << "Unknown (" << getDateString() << "): " << m_strLabel << std::endl;\r
   }\r
 }\r
+
+void\r
+Array2dFileLabel::printBrief (std::ostringstream& os) const\r
+{\r
+  if (m_labelType == L_HISTORY) {\r
+    os << "History (";\r
+    if (m_calcTime > 0)\r
+      os << m_calcTime << " secs, ";\r
+    os << getDateString().c_str() << "): " << m_strLabel.c_str() << "\n";
+  } else if (m_labelType == L_USER) {\r
+    os << "Note (" <<  getDateString() << "): " << m_strLabel << "\n";
+  } else {\r
+    os << "Unknown (" << getDateString() << "): " << m_strLabel << "\n";
+  }\r
+}\r
 \r
 
 ///////////////////////////////////////////////////////////////////////////
@@ -696,6 +711,16 @@ Array2dFile::printLabelsBrief (std::ostream& os) const
   }\r
 }\r
 \r
+void
+Array2dFile::printLabelsBrief (std::ostringstream& os) const\r
+{\r
+  for (constLabelIterator l = m_labels.begin(); l != m_labels.end(); l++) {\r
+    const Array2dFileLabel& label = **l;\r
+    \r
+    label.printBrief (os);\r
+  }\r
+}\r
+\r
 
 const Array2dFileLabel&
 Array2dFile::labelGet (int i) const