Deleted Added
sdiff udiff text old ( 13324:c8b709468e61 ) new ( 13332:03eec201e55a )
full compact
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

--- 65 unchanged lines hidden (view full) ---

74};
75
76class sc_port_base : public sc_object
77{
78 public:
79 sc_port_base(const char *name, int n, sc_port_policy p);
80 virtual ~sc_port_base();
81
82 void warn_unimpl(const char *func) const;
83
84 int maxSize() const;
85 int size() const;
86
87 const char *kind() const { return "sc_port_base"; }
88
89 protected:
90 // Implementation defined, but depended on by the tests.

--- 162 unchanged lines hidden (view full) ---

253 public:
254 sc_port() : sc_port_b<IF>(N, P) {}
255 explicit sc_port(const char *name) : sc_port_b<IF>(name, N, P) {}
256 virtual ~sc_port() {}
257
258 // Deprecated binding constructors.
259 explicit sc_port(const IF &interface) : sc_port_b<IF>(N, P)
260 {
261 this->warn_unimpl(__PRETTY_FUNCTION__);
262 // Should warn that these are deprecated. See Accellera sc_port.h.
263 sc_port_b<IF>::bind(const_cast<IF &>(interface));
264 }
265 sc_port(const char *name, const IF &interface) : sc_port_b<IF>(name, N, P)
266 {
267 this->warn_unimpl(__PRETTY_FUNCTION__);
268 // Should warn that these are deprecated. See Accellera sc_port.h.
269 sc_port_b<IF>::bind(const_cast<IF &>(interface));
270 }
271 explicit sc_port(sc_port_b<IF> &parent) : sc_port_b<IF>(N, P)
272 {
273 this->warn_unimpl(__PRETTY_FUNCTION__);
274 // Should warn that these are deprecated. See Accellera sc_port.h.
275 sc_port_b<IF>::bind(parent);
276 }
277 sc_port(const char *name, sc_port_b<IF> &parent) :
278 sc_port_b<IF>(name, N, P)
279 {
280 this->warn_unimpl(__PRETTY_FUNCTION__);
281 // Should warn that these are deprecated. See Accellera sc_port.h.
282 sc_port_b<IF>::bind(parent);
283 }
284 explicit sc_port(sc_port<IF, N, P> &parent) : sc_port_b<IF>(N, P)
285 {
286 this->warn_unimpl(__PRETTY_FUNCTION__);
287 // Should warn that these are deprecated. See Accellera sc_port.h.
288 sc_port_b<IF>::bind(parent);
289 }
290 sc_port(const char *name, sc_port<IF, N, P> &parent) :
291 sc_port_b<IF>(name, N, P)
292 {
293 this->warn_unimpl(__PRETTY_FUNCTION__);
294 // Should warn that these are deprecated. See Accellera sc_port.h.
295 sc_port_b<IF>::bind(parent);
296 }
297
298 virtual const char *kind() const { return "sc_port"; }
299
300 private:
301 // Disabled
302 sc_port(const sc_port<IF, N, P> &) {}
303 sc_port<IF, N, P> &operator = (const sc_port<IF, N, P> &) { return *this; }
304
305 virtual sc_port_policy _portPolicy() const { return P; }
306};
307
308} // namespace sc_core
309
310#endif //__SYSTEMC_EXT_CORE_SC_PORT_HH__