1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 43 unchanged lines hidden (view full) --- 52 {} 53 54 void warn_unimpl(const char *func) const; 55 56 protected: 57 // Implementation defined, but depended on by the tests. 58 void bind(sc_interface &); 59 void bind(sc_port_base &); |
60 61 // Implementation defined, but depended on by the tests. 62 virtual int vbind(sc_interface &) = 0; 63 virtual int vbind(sc_port_base &) = 0; |
64}; 65 66template <class IF> 67class sc_port_b : public sc_port_base 68{ 69 public: 70 void 71 operator () (IF &) --- 77 unchanged lines hidden (view full) --- 149 explicit sc_port_b(int n, sc_port_policy p) : 150 sc_port_base(sc_gen_unique_name("sc_port"), n, p) 151 {} 152 sc_port_b(const char *name, int n, sc_port_policy p) : 153 sc_port_base(name, n, p) 154 {} 155 virtual ~sc_port_b() {} 156 |
157 // Implementation defined, but depended on by the tests. 158 int 159 vbind(sc_interface &) 160 { 161 this->warn_unimpl(__PRETTY_FUNCTION__); 162 return 0; 163 } 164 int 165 vbind(sc_port_base &) 166 { 167 this->warn_unimpl(__PRETTY_FUNCTION__); 168 return 0; 169 } 170 |
171 private: 172 // Disabled 173 sc_port_b() {} 174 sc_port_b(const sc_port_b<IF> &) {} 175 sc_port_b<IF> &operator = (const sc_port_b<IF> &) { return *this; } 176}; 177 178template <class IF, int N=1, sc_port_policy P=SC_ONE_OR_MORE_BOUND> --- 58 unchanged lines hidden --- |