faults.hh revision 2132
113521Sgabeblack@google.com/* 213521Sgabeblack@google.com * Copyright (c) 2003-2005 The Regents of The University of Michigan 313521Sgabeblack@google.com * All rights reserved. 413521Sgabeblack@google.com * 513521Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without 613521Sgabeblack@google.com * modification, are permitted provided that the following conditions are 713521Sgabeblack@google.com * met: redistributions of source code must retain the above copyright 813521Sgabeblack@google.com * notice, this list of conditions and the following disclaimer; 913521Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright 1013521Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the 1113521Sgabeblack@google.com * documentation and/or other materials provided with the distribution; 1213521Sgabeblack@google.com * neither the name of the copyright holders nor the names of its 1313521Sgabeblack@google.com * contributors may be used to endorse or promote products derived from 1413521Sgabeblack@google.com * this software without specific prior written permission. 1513521Sgabeblack@google.com * 1613521Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1713521Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1813521Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1913521Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2013521Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2113521Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2213521Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2313521Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2413521Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2513521Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2613521Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2713521Sgabeblack@google.com */ 2813521Sgabeblack@google.com 2913521Sgabeblack@google.com#ifndef __FAULTS_HH__ 3013521Sgabeblack@google.com#define __FAULTS_HH__ 3113521Sgabeblack@google.com 3213521Sgabeblack@google.comclass FaultBase; 3313521Sgabeblack@google.comtypedef FaultBase * Fault; 3413521Sgabeblack@google.com 3513521Sgabeblack@google.comclass FaultBase 3613521Sgabeblack@google.com{ 3713521Sgabeblack@google.compublic: 3813521Sgabeblack@google.com FaultBase(char * newName, int newId = 0) : name(newName), id(newId) {;} 3913521Sgabeblack@google.com const char * name; 4013521Sgabeblack@google.com int id; 4113521Sgabeblack@google.com}; 4213521Sgabeblack@google.com 4313521Sgabeblack@google.comextern class NoFaultType : public FaultBase 4413521Sgabeblack@google.com{ 4513521Sgabeblack@google.compublic: 4613521Sgabeblack@google.com NoFaultType(char * newName) : FaultBase(newName) {;} 4713521Sgabeblack@google.com} * const NoFault; 4813521Sgabeblack@google.com 4913521Sgabeblack@google.comextern class MachineCheckFaultType : public FaultBase 5013521Sgabeblack@google.com{ 5113521Sgabeblack@google.compublic: 5213521Sgabeblack@google.com MachineCheckFaultType(char * newName) : FaultBase(newName) {;} 5313521Sgabeblack@google.com} * const MachineCheckFault; 5413521Sgabeblack@google.com 5513521Sgabeblack@google.comextern class AlignmentFaultType : public FaultBase 5613521Sgabeblack@google.com{ 5713521Sgabeblack@google.compublic: 5813521Sgabeblack@google.com AlignmentFaultType(char * newName) : FaultBase(newName) {;} 5913521Sgabeblack@google.com} * const AlignmentFault; 6013521Sgabeblack@google.com 6113521Sgabeblack@google.com 6213521Sgabeblack@google.com#endif // __FAULTS_HH__ 6313521Sgabeblack@google.com