output.hh revision 8514:57c96df312a1
16145Snate@binkert.org/*
26145Snate@binkert.org * Copyright (c) 2004-2005 The Regents of The University of Michigan
36145Snate@binkert.org * All rights reserved.
46145Snate@binkert.org *
56145Snate@binkert.org * Redistribution and use in source and binary forms, with or without
66145Snate@binkert.org * modification, are permitted provided that the following conditions are
76145Snate@binkert.org * met: redistributions of source code must retain the above copyright
86145Snate@binkert.org * notice, this list of conditions and the following disclaimer;
96145Snate@binkert.org * redistributions in binary form must reproduce the above copyright
106145Snate@binkert.org * notice, this list of conditions and the following disclaimer in the
116145Snate@binkert.org * documentation and/or other materials provided with the distribution;
126145Snate@binkert.org * neither the name of the copyright holders nor the names of its
136145Snate@binkert.org * contributors may be used to endorse or promote products derived from
146145Snate@binkert.org * this software without specific prior written permission.
156145Snate@binkert.org *
166145Snate@binkert.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
176145Snate@binkert.org * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
186145Snate@binkert.org * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
196145Snate@binkert.org * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
206145Snate@binkert.org * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
216145Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
226145Snate@binkert.org * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236145Snate@binkert.org * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246145Snate@binkert.org * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256145Snate@binkert.org * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
266145Snate@binkert.org * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276145Snate@binkert.org *
286145Snate@binkert.org * Authors: Nathan Binkert
297832Snate@binkert.org */
307832Snate@binkert.org
318645Snilay@cs.wisc.edu#ifndef __BASE_STATS_OUTPUT_HH__
327054Snate@binkert.org#define __BASE_STATS_OUTPUT_HH__
338232Snate@binkert.org
348229Snate@binkert.org#include <list>
3510301Snilay@cs.wisc.edu#include <string>
366154Snate@binkert.org
3710895Snilay@cs.wisc.edunamespace Stats {
386154Snate@binkert.org
396145Snate@binkert.orgclass Info;
407055Snate@binkert.orgclass ScalarInfo;
417055Snate@binkert.orgclass VectorInfo;
426145Snate@binkert.orgclass DistInfo;
436145Snate@binkert.orgclass VectorDistInfo;
446145Snate@binkert.orgclass Vector2dInfo;
456145Snate@binkert.orgclass FormulaInfo;
466145Snate@binkert.orgclass SparseHistInfo; // Sparse histogram
4710895Snilay@cs.wisc.edu
486145Snate@binkert.orgstruct Output
499499Snilay@cs.wisc.edu{
509230Snilay@cs.wisc.edu    virtual ~Output() {}
519465Snilay@cs.wisc.edu    virtual void begin() = 0;
529230Snilay@cs.wisc.edu    virtual void end() = 0;
536145Snate@binkert.org    virtual bool valid() const = 0;
548259SBrad.Beckmann@amd.com
557054Snate@binkert.org    virtual void visit(const ScalarInfo &info) = 0;
566145Snate@binkert.org    virtual void visit(const VectorInfo &info) = 0;
576145Snate@binkert.org    virtual void visit(const DistInfo &info) = 0;
589499Snilay@cs.wisc.edu    virtual void visit(const VectorDistInfo &info) = 0;
599230Snilay@cs.wisc.edu    virtual void visit(const Vector2dInfo &info) = 0;
609465Snilay@cs.wisc.edu    virtual void visit(const FormulaInfo &info) = 0;
619230Snilay@cs.wisc.edu    virtual void visit(const SparseHistInfo &info) = 0; // Sparse histogram
626145Snate@binkert.org};
638259SBrad.Beckmann@amd.com
647054Snate@binkert.org} // namespace Stats
656145Snate@binkert.org
666145Snate@binkert.org#endif // __BASE_STATS_OUTPUT_HH__
677054Snate@binkert.org