Deleted Added
sdiff udiff text old ( 8243:63e849f0f341 ) new ( 8296:be7f03723412 )
full compact
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 34 unchanged lines hidden (view full) ---

43#include <cmath>
44#include <fstream>
45#include <iostream>
46#include <sstream>
47#include <string>
48
49#include "base/stats/info.hh"
50#include "base/stats/text.hh"
51#include "base/cast.hh"
52#include "base/misc.hh"
53#include "base/str.hh"
54
55using namespace std;
56
57#ifndef NAN
58float __nan();

--- 73 unchanged lines hidden (view full) ---

132
133bool
134Text::valid() const
135{
136 return stream != NULL && stream->good();
137}
138
139void
140Text::begin()
141{
142 ccprintf(*stream, "\n---------- Begin Simulation Statistics ----------\n");
143}
144
145void
146Text::end()
147{
148 ccprintf(*stream, "\n---------- End Simulation Statistics ----------\n");
149 stream->flush();
150}
151
152bool
153Text::noOutput(const Info &info)
154{
155 if (!info.flags.isSet(display))

--- 420 unchanged lines hidden (view full) ---

576}
577
578void
579Text::visit(const FormulaInfo &info)
580{
581 visit((const VectorInfo &)info);
582}
583
584Output *
585initText(const string &filename, bool desc)
586{
587 static Text text;
588 static bool connected = false;
589
590 if (!connected) {
591 text.open(*simout.find(filename));
592 text.descriptions = desc;
593 connected = true;
594 }
595
596 return &text;
597}
598
599} // namespace Stats