scc  2022.4.0
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 344 of file sc_variable.h.


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