00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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 }