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_port_constructor() 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_port_constructor(); |
262 sc_port_b<IF>::bind(const_cast<IF &>(interface)); 263 } 264 sc_port(const char *name, const IF &interface) : sc_port_b<IF>(name, N, P) 265 { |
266 this->warn_port_constructor(); |
267 sc_port_b<IF>::bind(const_cast<IF &>(interface)); 268 } 269 explicit sc_port(sc_port_b<IF> &parent) : sc_port_b<IF>(N, P) 270 { |
271 this->warn_port_constructor(); |
272 sc_port_b<IF>::bind(parent); 273 } 274 sc_port(const char *name, sc_port_b<IF> &parent) : 275 sc_port_b<IF>(name, N, P) 276 { |
277 this->warn_port_constructor(); |
278 sc_port_b<IF>::bind(parent); 279 } 280 explicit sc_port(sc_port<IF, N, P> &parent) : sc_port_b<IF>(N, P) 281 { |
282 this->warn_port_constructor(); |
283 sc_port_b<IF>::bind(parent); 284 } 285 sc_port(const char *name, sc_port<IF, N, P> &parent) : 286 sc_port_b<IF>(name, N, P) 287 { |
288 this->warn_port_constructor(); |
289 sc_port_b<IF>::bind(parent); 290 } 291 292 virtual const char *kind() const { return "sc_port"; } 293 294 private: 295 // Disabled 296 sc_port(const sc_port<IF, N, P> &) {} 297 sc_port<IF, N, P> &operator = (const sc_port<IF, N, P> &) { return *this; } 298 299 virtual sc_port_policy _portPolicy() const { return P; } 300}; 301 302} // namespace sc_core 303 304#endif //__SYSTEMC_EXT_CORE_SC_PORT_HH__ |