scc 2025.09
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
 sc_ref_variable (const std::string &name, const T &value, bool active_notification=false)
std::string to_string () const override
 create a textual representation of the wrapped value
void trace (sc_core::sc_trace_file *tf) const override
 register the value with the SystemC trace implementation
void trace (observer *obs) const override
void notify () const
Public Member Functions inherited from scc::sc_variable_b
 sc_variable_b (const char *name)
 sc_variable_b (sc_variable_b const &)=delete
 sc_variable_b (sc_variable_b &&)=delete
sc_variable_b & operator= (const sc_variable_b &other)=delete
sc_variable_b & operator= (sc_variable_b &&other)=delete
const char * kind () const
 get the kind of this sc_object

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 444 of file sc_variable.h.

Constructor & Destructor Documentation

◆ sc_ref_variable()

template<typename T>
scc::sc_ref_variable< T >::sc_ref_variable ( const std::string & name,
const T & value,
bool active_notification = false )
inline

Definition at line 461 of file sc_variable.h.

Member Function Documentation

◆ notify()

template<typename T>
void scc::sc_ref_variable< T >::notify ( ) const
inline

Definition at line 495 of file sc_variable.h.

◆ operator*()

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

get a reference to the wrapped value

Returns

Definition at line 453 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 473 of file sc_variable.h.

◆ trace() [1/2]

template<typename T>
void scc::sc_ref_variable< T >::trace ( observer * obs) const
inlineoverridevirtual

Implements scc::sc_variable_b.

Definition at line 493 of file sc_variable.h.

◆ trace() [2/2]

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 484 of file sc_variable.h.

Member Data Documentation

◆ value

template<typename T>
const T& scc::sc_ref_variable< T >::value

the wrapped value

Definition at line 446 of file sc_variable.h.


The documentation for this struct was generated from the following file:
  • /home/eyck/Projects/MINRES/SystemC-Components/src/sysc/scc/sc_variable.h