scc  2022.4.0
SystemC components library
scc::sc_ref_variable< T > Struct Template Reference

the sc_ref_variable for a particular plain data type. This marks an existing C++ variable as discoverable via the sc_object tree. Whenever possible sc_variable should be used as this does not support value change callback. More...

#include <sc_variable.h>

Inheritance diagram for scc::sc_ref_variable< T >:
Collaboration diagram for scc::sc_ref_variable< T >:

Public Member Functions

const T & operator* ()
 get a reference to the wrapped value More...
 
 sc_ref_variable (const std::string &name, const T &value)
 
std::string to_string () const override
 create a textual representation of the wrapped value More...
 
void trace (sc_core::sc_trace_file *tf) const override
 register the value with the SystemC trace implementation More...
 
void trace (observer *obs) const override
 
- Public Member Functions inherited from scc::sc_variable_b
 sc_variable_b (const char *name)
 
const char * kind () const
 get the kind of this sc_object More...
 

Public Attributes

const T & value
 the wrapped value
 

Detailed Description

template<typename T>
struct scc::sc_ref_variable< T >

the sc_ref_variable for a particular plain data type. This marks an existing C++ variable as discoverable via the sc_object tree. Whenever possible sc_variable should be used as this does not support value change callback.

Template Parameters
Tthe data type of the wrapped value

Definition at line 419 of file sc_variable.h.

Member Function Documentation

◆ operator*()

template<typename T >
const T & scc::sc_ref_variable< T >::operator* ( )
inline

get a reference to the wrapped value

Returns

Definition at line 428 of file sc_variable.h.

◆ to_string()

template<typename T >
std::string scc::sc_ref_variable< T >::to_string ( ) const
inlineoverridevirtual

create a textual representation of the wrapped value

Returns
the string representing the value

Reimplemented from scc::sc_variable_b.

Definition at line 446 of file sc_variable.h.

◆ trace()

template<typename T >
void scc::sc_ref_variable< T >::trace ( sc_core::sc_trace_file *  tf) const
inlineoverride

register the value with the SystemC trace implementation

Parameters
tf

Definition at line 457 of file sc_variable.h.


The documentation for this struct was generated from the following file: