I am not familiar with the double arrow operator in the following code:
Start with a struct:
Then sc_get_curr_simcontext() is defined as
followed by another related function
Finally, the question snippet on this double arrow operators
What do the two arrow operators do here? This is from SystemC's source code.
Thanks.
Start with a struct:
Code:
struct sc_curr_proc_info
{
sc_process_b* process_handle;
sc_curr_proc_info(); // remove initialize parameters
}
Then sc_get_curr_simcontext() is defined as
Code:
inline sc_simcontext*
sc_get_curr_simcontext()
{
if( sc_curr_simcontext == 0 ) {
sc_default_global_context = new sc_simcontext;
sc_curr_simcontext = sc_default_global_context;
}
return sc_curr_simcontext;
}
followed by another related function
Code:
inline
sc_curr_proc_handle
sc_simcontext::get_curr_proc_info()
{
return &m_curr_proc_info;
}
Finally, the question snippet on this double arrow operators
Code:
inline
sc_process_b*
sc_get_current_process_b()
{
return sc_get_curr_simcontext()->get_curr_proc_info()->process_handle;
}
What do the two arrow operators do here? This is from SystemC's source code.
Thanks.