1/***************************************************************************** 2 3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4 more contributor license agreements. See the NOTICE file distributed 5 with this work for additional information regarding copyright ownership. 6 Accellera licenses this file to you under the Apache License, Version 2.0 7 (the "License"); you may not use this file except in compliance with the 8 License. You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, software 13 distributed under the License is distributed on an "AS IS" BASIS, 14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 15 implied. See the License for the specific language governing 16 permissions and limitations under the License. 17 18 *****************************************************************************/ 19 20/***************************************************************************** 21 22 sc_interface.cpp -- Abstract base class of all interface classes. 23 24 Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21 25 26 CHANGE LOG IS AT THE END OF THE FILE 27 *****************************************************************************/ 28 29#include "sysc/communication/sc_interface.h" 30#include "sysc/communication/sc_communication_ids.h" 31#include "sysc/kernel/sc_event.h" 32 33 34namespace sc_core { 35 36// ---------------------------------------------------------------------------- 37// CLASS : sc_interface 38// 39// Abstract base class of all interface classes. 40// BEWARE: Direct inheritance from this class must be done virtual. 41// ---------------------------------------------------------------------------- 42 43// register a port with this interface (does nothing by default) 44 45void 46sc_interface::register_port( sc_port_base&, const char* ) 47{} 48 49 50// get the default event 51 52const sc_event& 53sc_interface::default_event() const 54{ 55 SC_REPORT_WARNING( SC_ID_NO_DEFAULT_EVENT_, 0 ); 56 return m_never_notified; 57} 58 59 60// destructor (does nothing) 61 62sc_interface::~sc_interface() 63{} 64 65 66// constructor (does nothing) 67 68sc_interface::sc_interface() 69{} 70 71 72// special event for never notified cases, note the special name to keep 73// it out of the named event structures. 74 75sc_event sc_interface::m_never_notified(SC_KERNEL_EVENT_PREFIX); 76 77} // namespace sc_core 78 79// $Log: sc_interface.cpp,v $ 80// Revision 1.5 2011/08/26 20:45:40 acg 81// Andy Goodrich: moved the modification log to the end of the file to 82// eliminate source line number skew when check-ins are done. 83// 84// Revision 1.4 2011/03/12 21:07:42 acg 85// Andy Goodrich: changes to kernel generated event support. 86// 87// Revision 1.3 2011/03/06 15:55:08 acg 88// Andy Goodrich: Changes for named events. 89// 90// Revision 1.2 2011/02/18 20:23:45 acg 91// Andy Goodrich: Copyright update. 92// 93// Revision 1.1.1.1 2006/12/15 20:20:04 acg 94// SystemC 2.3 95// 96// Revision 1.3 2006/01/13 18:47:42 acg 97// Added $Log command so that CVS comments are reproduced in the source. 98// 99 100// Taf! 101