rc_object_handle Class Reference

#include <rc_object_handle.h>

List of all members.


Detailed Description

Class for a generalised handling of SystemC objects.

rc_object_handle is helpful when no template arguments are known, e.g., in base classes, and SystemC objects of different type have to be managed. If the object is a communication object (i.e. port/export or channel) generalised access to the respective interface is provided.

Note:
rc_object_handle objects are copyable.

Definition at line 60 of file rc_object_handle.h.


Public Member Functions

 rc_object_handle ()
 default constructor (creates an invalid handle)
 rc_object_handle (sc_object &obj_)
 constructor (creates handle for a pure object)
 rc_object_handle (const rc_port_handle &port_)
 constructor (creates handle from a port handle)
template<class IF, int N, sc_port_policy POL>
 rc_object_handle (sc_port< IF, N, POL > &port_)
 constructor (creates handle for a port)
 rc_object_handle (const rc_export_handle &export_)
 constructor (creates handle from an export handle)
template<class IF>
 rc_object_handle (sc_export< IF > &export_)
 constructor (creates handle for an export)
rc_object_handleoperator= (sc_object &obj_)
template<class IF, int N, sc_port_policy POL>
rc_object_handleoperator= (sc_port< IF, N, POL > &port_)
rc_object_handleoperator= (const rc_port_handle &port_)
template<class IF>
rc_object_handleoperator= (sc_export< IF > &export_)
rc_object_handleoperator= (const rc_export_handle &export_)
bool valid () const
 is this handle valid?
bool is_port () const
 does this handle reference a port?
bool is_export () const
 does this handle reference an export?
bool is_channel () const
 does this handle reference a channel?
bool is_comm_object () const
 does this handle reference a communcation object?
rc_port_handle get_port () const
 returns a port handle
rc_export_handle get_export () const
 returns an export handle
sc_interface * get_interface () const
 get the interface of a communication object
sc_object * get_object () const
 get the object of the referenced object
sc_object * operator-> () const
 direct access to the referenced object
sc_object * operator * () const
 direct access to the referenced object
 operator sc_object * () const
bool operator== (const rc_object_handle &other) const
 compare with other object handle
bool operator< (const rc_object_handle &other) const
 specifies the object handle's natural sort order

Private Attributes

sc_object * p_object
 the referenced object
sc_interface * p_channel_if
 the referenced channel
rc_port_handle p_port
 the referenced port
rc_export_handle p_export
 the referenced export

Constructor & Destructor Documentation

rc_object_handle (  ) 

default constructor (creates an invalid handle)

Definition at line 41 of file rc_object_handle.cpp.

rc_object_handle ( sc_object &  obj_  ) 

constructor (creates handle for a pure object)

Definition at line 45 of file rc_object_handle.cpp.

rc_object_handle ( const rc_port_handle port_  ) 

constructor (creates handle from a port handle)

Definition at line 51 of file rc_object_handle.cpp.

rc_object_handle ( sc_port< IF, N, POL > &  port_  )  [inline]

constructor (creates handle for a port)

Definition at line 169 of file rc_object_handle.h.

rc_object_handle ( const rc_export_handle export_  ) 

constructor (creates handle from an export handle)

Definition at line 55 of file rc_object_handle.cpp.

rc_object_handle ( sc_export< IF > &  export_  )  [inline]

constructor (creates handle for an export)

Definition at line 175 of file rc_object_handle.h.


Member Function Documentation

rc_object_handle & operator= ( sc_object &  obj_  ) 

Definition at line 59 of file rc_object_handle.cpp.

rc_object_handle & operator= ( sc_port< IF, N, POL > &  port_  )  [inline]

Definition at line 181 of file rc_object_handle.h.

rc_object_handle & operator= ( const rc_port_handle port_  ) 

Definition at line 69 of file rc_object_handle.cpp.

rc_object_handle & operator= ( sc_export< IF > &  export_  )  [inline]

Definition at line 191 of file rc_object_handle.h.

rc_object_handle & operator= ( const rc_export_handle export_  ) 

Definition at line 79 of file rc_object_handle.cpp.

bool valid (  )  const [inline]

is this handle valid?

Definition at line 97 of file rc_object_handle.h.

bool is_port (  )  const [inline]

does this handle reference a port?

Definition at line 101 of file rc_object_handle.h.

Referenced by rc_abstract_portal::bind_dynamic_object(), rc_abstract_portal::bind_static_object(), rc_abstract_exportal::bind_static_object(), and rc_object_handle::is_comm_object().

bool is_export (  )  const [inline]

does this handle reference an export?

Definition at line 105 of file rc_object_handle.h.

Referenced by rc_abstract_exportal::bind_dynamic_object(), rc_abstract_exportal::bind_static_object(), and rc_object_handle::is_comm_object().

bool is_channel (  )  const [inline]

does this handle reference a channel?

Definition at line 109 of file rc_object_handle.h.

Referenced by rc_abstract_exportal::bind_dynamic_object(), rc_abstract_portal::bind_static_object(), and rc_object_handle::is_comm_object().

bool is_comm_object (  )  const [inline]

does this handle reference a communcation object?

Definition at line 113 of file rc_object_handle.h.

rc_port_handle get_port (  )  const [inline]

returns a port handle

Definition at line 117 of file rc_object_handle.h.

rc_export_handle get_export (  )  const [inline]

returns an export handle

Definition at line 121 of file rc_object_handle.h.

sc_interface * get_interface (  )  const

get the interface of a communication object

Definition at line 89 of file rc_object_handle.cpp.

Referenced by rc_portmap_base::get_interface(), rc_reconfigurable::move(), and rc_reconfigurable::rc_register_switch().

sc_object* get_object (  )  const [inline]

get the object of the referenced object

Definition at line 128 of file rc_object_handle.h.

Referenced by rc_portmap_base::get_object().

sc_object* operator-> (  )  const [inline]

direct access to the referenced object

Definition at line 132 of file rc_object_handle.h.

sc_object* operator * (  )  const [inline]

direct access to the referenced object

Definition at line 136 of file rc_object_handle.h.

operator sc_object * (  )  const [inline]

Definition at line 139 of file rc_object_handle.h.

bool operator== ( const rc_object_handle other  )  const [inline]

compare with other object handle

Returns:
true if equal, false otherwise

Definition at line 145 of file rc_object_handle.h.

bool operator< ( const rc_object_handle other  )  const [inline]

specifies the object handle's natural sort order

Note:
object pointer values are compared.

Definition at line 152 of file rc_object_handle.h.


Member Data Documentation

sc_object* p_object [private]

the referenced object

Definition at line 157 of file rc_object_handle.h.

Referenced by rc_object_handle::get_object(), rc_object_handle::operator *(), rc_object_handle::operator sc_object *(), rc_object_handle::operator->(), rc_object_handle::operator<(), rc_object_handle::operator=(), rc_object_handle::operator==(), and rc_object_handle::valid().

sc_interface* p_channel_if [private]

the referenced channel

Definition at line 159 of file rc_object_handle.h.

Referenced by rc_object_handle::get_interface(), rc_object_handle::is_channel(), rc_object_handle::operator=(), and rc_object_handle::rc_object_handle().

rc_port_handle p_port [private]

the referenced port

Definition at line 161 of file rc_object_handle.h.

Referenced by rc_object_handle::get_interface(), rc_object_handle::get_port(), rc_object_handle::is_port(), and rc_object_handle::operator=().

rc_export_handle p_export [private]

the referenced export

Definition at line 163 of file rc_object_handle.h.

Referenced by rc_object_handle::get_export(), rc_object_handle::get_interface(), rc_object_handle::is_export(), and rc_object_handle::operator=().


The documentation for this class was generated from the following files:
Generated on Tue Jan 1 23:14:15 2008 for ReChannel by  doxygen 1.5.3