#include <rc_port_handle.h>
rc_port_handle is helpful when no template arguments are known, e.g., in base classes, and ports of different type have to be managed.
Definition at line 99 of file rc_port_handle.h.
Public Member Functions | |
rc_port_handle () | |
Default constructor. | |
template<class IF, int N, sc_port_policy POL> | |
rc_port_handle (sc_port< IF, N, POL > &port_) | |
Constructor to create a handle from a port. | |
bool | valid () const |
Is valid handle? | |
void | reset () |
sets port pointer to NULL and invalidates the handle | |
sc_interface * | get_interface () const |
returns the interface that is bound to the referenced port | |
sc_object * | get_object () const |
returns the object of the referenced port | |
sc_port_base * | operator-> () const |
direct access to the base class of the referenced port | |
sc_port_base * | operator * () const |
direct access to the base class of the referenced port | |
operator sc_port_base * () const | |
operator sc_object * () const | |
bool | operator== (const rc_port_handle &other) const |
compare with other port handle | |
bool | operator< (const rc_port_handle &other) const |
specifies the port handle's natural sort order | |
Private Types | |
typedef internals::port_handle::port_ref | port_ref |
typedef rc_hash_map < sc_port_base *, port_ref * > | portmap |
Private Attributes | |
sc_port_base * | p_port_base |
the port base class that is referenced by this handle | |
port_ref * | p_port_ref |
points to the element that stores the port. | |
Static Private Attributes | |
static portmap | p_portmap |
the static map that stores the port objects |
typedef internals::port_handle::port_ref port_ref [private] |
The data type of an element containing a port of type PORT.
Definition at line 104 of file rc_port_handle.h.
typedef rc_hash_map<sc_port_base*, port_ref*> portmap [private] |
The type of the map in which the ports are stored is a hash map for fast lookup.
Definition at line 108 of file rc_port_handle.h.
rc_port_handle | ( | ) | [inline] |
rc_port_handle | ( | sc_port< IF, N, POL > & | port_ | ) | [inline] |
bool valid | ( | ) | const [inline] |
Is valid handle?
Definition at line 125 of file rc_port_handle.h.
Referenced by rc_portal_b::_rc_init(), rc_portal_b::add_event_forwarder(), rc_object_handle::get_interface(), rc_portal_b::get_static_interface(), rc_object_handle::is_port(), and rc_portal_base::register_port().
void reset | ( | ) | [inline] |
sets port pointer to NULL and invalidates the handle
Definition at line 130 of file rc_port_handle.h.
Referenced by rc_object_handle::operator=().
sc_interface* get_interface | ( | ) | const [inline] |
returns the interface that is bound to the referenced port
Definition at line 136 of file rc_port_handle.h.
Referenced by rc_portal_b::add_event_forwarder(), rc_object_handle::get_interface(), rc_portal_b::get_static_interface(), and rc_portal_base::register_port().
sc_object* get_object | ( | ) | const [inline] |
returns the object of the referenced port
Definition at line 142 of file rc_port_handle.h.
Referenced by rc_object_handle::operator=().
sc_port_base* operator-> | ( | ) | const [inline] |
direct access to the base class of the referenced port
Definition at line 148 of file rc_port_handle.h.
sc_port_base* operator * | ( | ) | const [inline] |
direct access to the base class of the referenced port
Definition at line 154 of file rc_port_handle.h.
operator sc_port_base * | ( | ) | const [inline] |
Definition at line 157 of file rc_port_handle.h.
operator sc_object * | ( | ) | const [inline] |
Definition at line 160 of file rc_port_handle.h.
bool operator== | ( | const rc_port_handle & | other | ) | const [inline] |
compare with other port handle
Definition at line 166 of file rc_port_handle.h.
bool operator< | ( | const rc_port_handle & | other | ) | const [inline] |
specifies the port handle's natural sort order
Definition at line 173 of file rc_port_handle.h.
sc_port_base* p_port_base [private] |
the port base class that is referenced by this handle
p_port_base is NULL if the handle is invalid.
Definition at line 181 of file rc_port_handle.h.
Referenced by rc_port_handle::get_object(), rc_port_handle::operator *(), rc_port_handle::operator sc_object *(), rc_port_handle::operator sc_port_base *(), rc_port_handle::operator->(), rc_port_handle::operator<(), rc_port_handle::operator==(), rc_port_handle::reset(), and rc_port_handle::valid().
port_ref* p_port_ref [private] |
points to the element that stores the port.
p_port_ref is NULL if the handle is invalid.
Definition at line 186 of file rc_port_handle.h.
Referenced by rc_port_handle::get_interface(), rc_port_handle::rc_port_handle(), and rc_port_handle::reset().
rc_port_handle::portmap p_portmap [static, private] |
the static map that stores the port objects
Definition at line 191 of file rc_port_handle.h.
Referenced by rc_port_handle::rc_port_handle().