Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

StatLocation.C

Go to the documentation of this file.
00001 // Copyright (C) 2001, Compaq Computer Corporation
00002 // 
00003 // This file is part of Vesta.
00004 // 
00005 // Vesta is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 // 
00010 // Vesta is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with Vesta; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 // Last modified on Thu Aug  5 00:54:35 EDT 2004 by ken@xorian.net  
00020 
00021 #include "StatLocation.H"
00022 
00023 using std::ostream;
00024 using std::endl;
00025 
00026 static void Newline_Indent(ostream &os, int i) throw ()
00027 {
00028   os << endl;
00029   for (; i > 0; i--) os << ' ';
00030 }
00031 
00032 void Stat::Location::print(ostream &out, int indent) const
00033 {
00034   out << "path = " << path;
00035   if(has_pk)
00036     {
00037       Newline_Indent(out, indent);
00038       out << "pk = " << pk;
00039       Newline_Indent(out, indent);
00040       out << "sourceFunc = " << sourceFunc;
00041       if(has_cfp)
00042         {
00043           Newline_Indent(out, indent);
00044           out << "namesEpoch = " << namesEpoch;
00045           Newline_Indent(out, indent);
00046           out << "cfp = " << cfp;
00047           if(has_ci)
00048             {
00049               Newline_Indent(out, indent);
00050               out << "ci = " << ci;
00051             }
00052         }
00053     }
00054 }
00055 
00056 ostream &operator<<(ostream &out, const Stat::Location &loc)
00057 {
00058   loc.print(out);
00059   return out;
00060 }

Generated on Mon May 8 00:48:36 2006 for Vesta by  doxygen 1.4.2