rc_export_handle Class Reference

#include <rc_export_handle.h>

List of all members.


Detailed Description

Class for the generalised handling of SystemC exports.

rc_export_handle is helpful when no template arguments are known, e.g., in base classes, and exports of different type have to be managed.

Note:
rc_export_handle is copyable.

Definition at line 99 of file rc_export_handle.h.


Public Member Functions

 rc_export_handle ()
 Default constructor.
template<class IF>
 rc_export_handle (sc_export< IF > &export_)
 Constructor to create a handle from an export.
bool valid () const
 Is valid handle?
void reset ()
 sets export pointer to NULL and invalidates the handle
sc_interface * get_interface () const
 returns the interface that is bound to the referenced export
sc_object * get_object () const
 returns the object of the referenced export
sc_export_base * operator-> () const
 direct access to the base class of the referenced export
sc_export_base * operator * () const
 operator sc_export_base * () const
 operator sc_object * () const
bool operator== (const rc_export_handle &other) const
 compare with other port handle
bool operator< (const rc_export_handle &other) const
 specifies the export handle's natural sort order

Private Types

typedef
internals::export_handle::export_ref 
export_ref
typedef rc_hash_map
< sc_export_base *,
export_ref * > 
exportmap

Private Attributes

sc_export_base * p_export_base
 the export base class that is referenced by this handle
export_refp_export_ref
 points to the element that stores the export.

Static Private Attributes

static exportmap p_exportmap
 the static map that stores the export objects

Member Typedef Documentation

typedef internals::export_handle::export_ref export_ref [private]

The data type of an element containing a export of type sc_export<IF>.

Definition at line 104 of file rc_export_handle.h.

typedef rc_hash_map<sc_export_base*, export_ref*> exportmap [private]

The type of the map in which the exports are stored is a hash map for fast lookup.

Definition at line 108 of file rc_export_handle.h.


Constructor & Destructor Documentation

rc_export_handle (  )  [inline]

Default constructor.

Definition at line 112 of file rc_export_handle.h.

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

Constructor to create a handle from an export.

Definition at line 193 of file rc_export_handle.h.


Member Function Documentation

bool valid (  )  const [inline]

Is valid handle?

Returns:
true if valid, false otherwise
Remarks:
If this handle points to an export it is said to be "valid"

Definition at line 124 of file rc_export_handle.h.

Referenced by rc_exportal_base::bind_dynamic(), rc_object_handle::get_interface(), and rc_object_handle::is_export().

void reset (  )  [inline]

sets export pointer to NULL and invalidates the handle

Definition at line 129 of file rc_export_handle.h.

Referenced by rc_object_handle::operator=().

sc_interface* get_interface (  )  const [inline]

returns the interface that is bound to the referenced export

Returns:
interface if exists, NULL otherwise

Definition at line 135 of file rc_export_handle.h.

Referenced by rc_exportal_base::bind_dynamic(), and rc_object_handle::get_interface().

sc_object* get_object (  )  const [inline]

returns the object of the referenced export

Returns:
object if handle is valid, NULL otherwise

Definition at line 141 of file rc_export_handle.h.

Referenced by rc_object_handle::operator=().

sc_export_base* operator-> (  )  const [inline]

direct access to the base class of the referenced export

Returns:
the export's base class if handle is valid, NULL otherwise

Definition at line 147 of file rc_export_handle.h.

sc_export_base* operator * (  )  const [inline]

Definition at line 150 of file rc_export_handle.h.

operator sc_export_base * (  )  const [inline]

Definition at line 153 of file rc_export_handle.h.

operator sc_object * (  )  const [inline]

Definition at line 156 of file rc_export_handle.h.

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

compare with other port handle

Returns:
true if equal, false otherwise

Definition at line 162 of file rc_export_handle.h.

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

specifies the export handle's natural sort order

Note:
export's object pointer values are compared.

Definition at line 169 of file rc_export_handle.h.


Member Data Documentation

sc_export_base* p_export_base [private]

the export base class that is referenced by this handle

p_export_base is NULL if the handle is invalid.

Definition at line 177 of file rc_export_handle.h.

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

export_ref* p_export_ref [private]

points to the element that stores the export.

p_export_ref is NULL if the handle is invalid.

Definition at line 182 of file rc_export_handle.h.

Referenced by rc_export_handle::get_interface(), rc_export_handle::rc_export_handle(), and rc_export_handle::reset().

rc_export_handle::exportmap p_exportmap [static, private]

the static map that stores the export objects

Definition at line 187 of file rc_export_handle.h.

Referenced by rc_export_handle::rc_export_handle().


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