X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Farray2dfile.cpp;h=49f90f45182c30c656ee2bdb17162cce4e01a059;hp=e0ab0a4e55d60bec0a5f3e4147ad27e2a0196798;hb=4076fbc077adfd9ee610beef09b52d9e12c14abb;hpb=c39188dafe238b70c0e2dd45fd1cd2e2be95a7dc diff --git a/libctsim/array2dfile.cpp b/libctsim/array2dfile.cpp index e0ab0a4..49f90f4 100644 --- a/libctsim/array2dfile.cpp +++ b/libctsim/array2dfile.cpp @@ -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; } } + +void +Array2dFileLabel::printBrief (std::ostringstream& os) const +{ + if (m_labelType == L_HISTORY) { + os << "History ("; + if (m_calcTime > 0) + os << m_calcTime << " secs, "; + os << getDateString().c_str() << "): " << m_strLabel.c_str() << "\n"; + } else if (m_labelType == L_USER) { + os << "Note (" << getDateString() << "): " << m_strLabel << "\n"; + } else { + os << "Unknown (" << getDateString() << "): " << m_strLabel << "\n"; + } +} /////////////////////////////////////////////////////////////////////////// @@ -696,6 +711,16 @@ Array2dFile::printLabelsBrief (std::ostream& os) const } } +void +Array2dFile::printLabelsBrief (std::ostringstream& os) const +{ + for (constLabelIterator l = m_labels.begin(); l != m_labels.end(); l++) { + const Array2dFileLabel& label = **l; + + label.printBrief (os); + } +} + const Array2dFileLabel& Array2dFile::labelGet (int i) const