00001 // -*- C++ -*- <this line is for emacs to recognize it as C++ code> 00002 /***************************************************************************** 00003 00004 The following code is derived, directly or indirectly, from the SystemC 00005 source code Copyright (c) 1996-2002 by all Contributors. 00006 All Rights reserved. 00007 00008 The contents of this file are subject to the restrictions and limitations 00009 set forth in the SystemC Open Source License Version 2.3 (the "License"); 00010 You may not use this file except in compliance with such restrictions and 00011 limitations. You may obtain instructions on how to receive a copy of the 00012 License at http://www.systemc.org/. Software distributed by Contributors 00013 under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 00014 ANY KIND, either express or implied. See the License for the specific 00015 language governing rights and limitations under the License. 00016 00017 *****************************************************************************/ 00018 00019 /***************************************************************************** 00020 00021 scv_object_if.h -- 00022 Common base class for SCV objects. All SCV API classes 00023 should inherit from this class, directly or indirectly. 00024 00025 Until set_level() is called, get_level() should return -1. 00026 00027 Original Authors (Cadence Design Systems, Inc): 00028 Norris Ip, Dean Shea, John Rose, Jasvinder Singh, William Paulsen, 00029 John Pierce, Rachida Kebichi, Ted Elkind, David Bailey 00030 2002-09-23 00031 00032 *****************************************************************************/ 00033 00034 /***************************************************************************** 00035 00036 MODIFICATION LOG - modifiers, enter your name, affiliation, date and 00037 changes you are making here. 00038 00039 Name, Affiliation, Date: 00040 Description of Modification: 00041 00042 *****************************************************************************/ 00043 00044 #ifndef SCV_OBJECT_IF_H 00045 #define SCV_OBJECT_IF_H 00046 00047 #ifdef SCV_USE_IOSTREAM_H 00048 # include <iostream.h> 00049 #else 00050 # include <iostream> 00051 #endif 00052 00053 class scv_object_if { 00054 public: 00055 00056 // return the instance name of the data structure 00057 virtual const char *get_name() const = 0; 00058 00059 // return a string unique to each class 00060 virtual const char *kind() const = 0; 00061 00062 // print current values on output stream 00063 virtual void print(ostream& o=scv_out, int details=0, int indent=0) const = 0; 00064 00065 // print current values on output stream 00066 virtual void show(int details=0, int indent=0) const { print(scv_out,-1,0); } 00067 00068 // control debug messages by facility (do not override) 00069 static void set_debug_level(const char * facility, int level = -1); 00070 00071 // are debug messages on for this class (write for each class)? 00072 // static int get_debug() { ... } 00073 00074 // control debug messages by class (write for each class) 00075 // static void set_debug(int) { ... } 00076 00077 }; 00078 00079 #endif
1.2.18