15314Sstever@gmail.com/* 25314Sstever@gmail.com * Copyright (c) 2007 The Regents of The University of Michigan 35314Sstever@gmail.com * All rights reserved. 45314Sstever@gmail.com * 55314Sstever@gmail.com * Redistribution and use in source and binary forms, with or without 65314Sstever@gmail.com * modification, are permitted provided that the following conditions are 75314Sstever@gmail.com * met: redistributions of source code must retain the above copyright 85314Sstever@gmail.com * notice, this list of conditions and the following disclaimer; 95314Sstever@gmail.com * redistributions in binary form must reproduce the above copyright 105314Sstever@gmail.com * notice, this list of conditions and the following disclaimer in the 115314Sstever@gmail.com * documentation and/or other materials provided with the distribution; 125314Sstever@gmail.com * neither the name of the copyright holders nor the names of its 135314Sstever@gmail.com * contributors may be used to endorse or promote products derived from 145314Sstever@gmail.com * this software without specific prior written permission. 155314Sstever@gmail.com * 165314Sstever@gmail.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 175314Sstever@gmail.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 185314Sstever@gmail.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 195314Sstever@gmail.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 205314Sstever@gmail.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 215314Sstever@gmail.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 225314Sstever@gmail.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 235314Sstever@gmail.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 245314Sstever@gmail.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 255314Sstever@gmail.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 265314Sstever@gmail.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 275314Sstever@gmail.com */ 285314Sstever@gmail.com 295314Sstever@gmail.com/* @file 305314Sstever@gmail.com * Printable Object Base Class Declaration 315314Sstever@gmail.com */ 325314Sstever@gmail.com 335314Sstever@gmail.com#ifndef __PRINTABLE_HH__ 345314Sstever@gmail.com#define __PRINTABLE_HH__ 355314Sstever@gmail.com 365314Sstever@gmail.com#include <ostream> 375314Sstever@gmail.com#include <string> 385314Sstever@gmail.com 395315Sstever@gmail.com/** 405315Sstever@gmail.com * Abstract base class for objects which support being printed 415315Sstever@gmail.com * to a stream for debugging. Primarily used to support PrintReq 425315Sstever@gmail.com * in memory system. 435315Sstever@gmail.com */ 445314Sstever@gmail.comclass Printable 455314Sstever@gmail.com{ 465314Sstever@gmail.com public: 475314Sstever@gmail.com Printable() {} 485314Sstever@gmail.com virtual ~Printable() {} 495314Sstever@gmail.com 505314Sstever@gmail.com virtual void print(std::ostream &os, 515314Sstever@gmail.com int verbosity = 0, 525314Sstever@gmail.com const std::string &prefix = "") const = 0; 535314Sstever@gmail.com}; 545314Sstever@gmail.com 555314Sstever@gmail.com#endif // __PRINTABLE_HH__ 56