00001 /***************************************************************************** 00002 00003 The following code is derived, directly or indirectly, from the SystemC 00004 source code Copyright (c) 1996-2014 by all Contributors. 00005 All Rights reserved. 00006 00007 The contents of this file are subject to the restrictions and limitations 00008 set forth in the SystemC Open Source License (the "License"); 00009 You may not use this file except in compliance with such restrictions and 00010 limitations. You may obtain instructions on how to receive a copy of the 00011 License at http://www.accellera.org/. Software distributed by Contributors 00012 under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 00013 ANY KIND, either express or implied. See the License for the specific 00014 language governing rights and limitations under the License. 00015 00016 *****************************************************************************/ 00017 00018 /***************************************************************************** 00019 00020 sc_interface.h -- Abstract base class of all interface classes. 00021 00022 Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21 00023 00024 CHANGE LOG IS AT THE END OF THE FILE 00025 *****************************************************************************/ 00026 00027 #ifndef SC_INTERFACE_H 00028 #define SC_INTERFACE_H 00029 00030 namespace sc_core { 00031 00032 class sc_event; 00033 class sc_port_base; 00034 00035 00036 /**************************************************************************/ 00044 class sc_interface 00045 { 00046 public: 00047 00048 // register a port with this interface (does nothing by default) 00049 virtual void register_port( sc_port_base& port_, 00050 const char* if_typename_ ); 00051 00052 // get the default event 00053 virtual const sc_event& default_event() const; 00054 00055 // destructor (does nothing) 00056 virtual ~sc_interface(); 00057 00058 protected: 00059 00060 // constructor (does nothing) 00061 sc_interface(); 00062 00063 private: 00064 00065 // disabled 00066 sc_interface( const sc_interface& ); 00067 sc_interface& operator = ( const sc_interface& ); 00068 00069 private: 00070 00071 static sc_event m_never_notified; 00072 00073 #if defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x520) 00074 // Workaround for a bug in the Sun WorkShop 6 update 2 compiler. 00075 // An empty virtual base class can cause the optimizer to 00076 // generate wrong code. 00077 char dummy; 00078 #endif 00079 }; 00080 00081 } // namespace sc_core 00082 00083 //$Log: sc_interface.h,v $ 00084 //Revision 1.3 2011/08/26 20:45:40 acg 00085 // Andy Goodrich: moved the modification log to the end of the file to 00086 // eliminate source line number skew when check-ins are done. 00087 // 00088 //Revision 1.2 2011/02/18 20:23:45 acg 00089 // Andy Goodrich: Copyright update. 00090 // 00091 //Revision 1.1.1.1 2006/12/15 20:20:04 acg 00092 //SystemC 2.3 00093 // 00094 //Revision 1.2 2006/01/03 23:18:26 acg 00095 //Changed copyright to include 2006. 00096 // 00097 //Revision 1.1.1.1 2005/12/19 23:16:43 acg 00098 //First check in of SystemC 2.1 into its own archive. 00099 // 00100 //Revision 1.7 2005/06/10 22:43:55 acg 00101 //Added CVS change log annotation. 00102 // 00103 00104 #endif 00105 00106 // Taf!