scc 2025.09
SystemC components library
scc::sc_variable_vector< T > Struct Template Reference

#include <sc_variable.h>

Public Member Functions

 sc_variable_vector (std::string const &name, size_t size)
 sc_variable_vector (std::string const &name, size_t size, T const &def_val)
 sc_variable_vector (std::string const &name, size_t size, std::function< sc_variable< T > *(char const *, size_t)> creator)
size_t size ()
void resize (size_t sz)
void resize (size_t sz, T def_val)
bool is_valid (size_t idx) const
sc_variable< T > & operator[] (size_t idx)
sc_variable< T > const & operator[] (size_t idx) const

Detailed Description

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

a vector holding sc_variable. It can be used as a sparse array by providing a creator function or as a normal vector when providing a default value upon creating or resizing

Note
after end of elaboration the size of the vector cannot be change. It is also not possible to add elements e.g. when using as a sparse array.
Template Parameters
T

Definition at line 369 of file sc_variable.h.

Constructor & Destructor Documentation

◆ sc_variable_vector() [1/3]

template<typename T>
scc::sc_variable_vector< T >::sc_variable_vector ( std::string const & name,
size_t size )
inline

Definition at line 371 of file sc_variable.h.

◆ sc_variable_vector() [2/3]

template<typename T>
scc::sc_variable_vector< T >::sc_variable_vector ( std::string const & name,
size_t size,
T const & def_val )
inline

Definition at line 376 of file sc_variable.h.

◆ sc_variable_vector() [3/3]

template<typename T>
scc::sc_variable_vector< T >::sc_variable_vector ( std::string const & name,
size_t size,
std::function< sc_variable< T > *(char const *, size_t)> creator )
inline

Definition at line 382 of file sc_variable.h.

◆ ~sc_variable_vector()

template<typename T>
scc::sc_variable_vector< T >::~sc_variable_vector ( )
inline

Definition at line 426 of file sc_variable.h.

Member Function Documentation

◆ is_valid()

template<typename T>
bool scc::sc_variable_vector< T >::is_valid ( size_t idx) const
inline

Definition at line 405 of file sc_variable.h.

◆ operator[]() [1/2]

template<typename T>
sc_variable< T > & scc::sc_variable_vector< T >::operator[] ( size_t idx)
inline

Definition at line 407 of file sc_variable.h.

◆ operator[]() [2/2]

template<typename T>
sc_variable< T > const & scc::sc_variable_vector< T >::operator[] ( size_t idx) const
inline

Definition at line 422 of file sc_variable.h.

◆ resize() [1/2]

template<typename T>
void scc::sc_variable_vector< T >::resize ( size_t sz)
inline

Definition at line 389 of file sc_variable.h.

◆ resize() [2/2]

template<typename T>
void scc::sc_variable_vector< T >::resize ( size_t sz,
T def_val )
inline

Definition at line 394 of file sc_variable.h.

◆ size()

template<typename T>
size_t scc::sc_variable_vector< T >::size ( )
inline

Definition at line 387 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