SystemC  2.3.2
Accellera SystemC proof-of-concept library
sc_core::sc_vector< T > Class Template Reference

#include <sysc/utils/sc_vector.h>

Inheritance diagram for sc_core::sc_vector< T >:
Collaboration diagram for sc_core::sc_vector< T >:

Public Types

typedef T element_type
 
typedef sc_vector_iter< element_typeiterator
 
typedef sc_vector_iter< const element_typeconst_iterator
 
typedef sc_vector_element * handle_type
 
typedef std::vector< handle_typestorage_type
 
typedef storage_type::size_type size_type
 
typedef storage_type::difference_type difference_type
 
typedef unsigned phase_cb_mask
 

Public Member Functions

 sc_vector ()
 
 sc_vector (const char *prefix)
 
 sc_vector (const char *prefix, size_type n)
 
template<typename Creator >
 sc_vector (const char *prefix, size_type n, Creator creator)
 
virtual ~sc_vector ()
 
element_typeoperator[] (size_type i)
 
element_typeat (size_type i)
 
const element_typeoperator[] (size_type i) const
 
const element_typeat (size_type i) const
 
void init (size_type n)
 
template<typename Creator >
void init (size_type n, Creator c)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
template<typename ContainerType , typename ArgumentType >
iterator bind (sc_vector_assembly< ContainerType, ArgumentType > c)
 
template<typename BindableContainer >
iterator bind (BindableContainer &c)
 
template<typename BindableIterator >
iterator bind (BindableIterator first, BindableIterator last)
 
template<typename BindableIterator >
iterator bind (BindableIterator first, BindableIterator last, iterator from)
 
template<typename ContainerType , typename ArgumentType >
iterator operator() (sc_vector_assembly< ContainerType, ArgumentType > c)
 
template<typename ArgumentContainer >
iterator operator() (ArgumentContainer &c)
 
template<typename ArgumentIterator >
iterator operator() (ArgumentIterator first, ArgumentIterator last)
 
template<typename ArgumentIterator >
iterator operator() (ArgumentIterator first, ArgumentIterator last, iterator from)
 
template<typename MT >
sc_vector_assembly< T, MT > assemble (MT(T::*member_ptr))
 
const char * kind () const
 
std::vector< sc_object * > const & get_elements () const
 
size_type size () const
 
void report_empty_bind (const char *kind_, bool dst_range_) const
 
const char * name () const
 
const char * basename () const
 
virtual void print (::std::ostream &os=::std::cout) const
 
virtual void dump (::std::ostream &os=::std::cout) const
 
virtual void trace (sc_trace_file *tf) const
 
sc_simcontextsimcontext () const
 
bool add_attribute (sc_attr_base &)
 
sc_attr_baseget_attribute (const std::string &name_)
 
const sc_attr_baseget_attribute (const std::string &name_) const
 
sc_attr_baseremove_attribute (const std::string &name_)
 
void remove_all_attributes ()
 
int num_attributes () const
 
sc_attr_cltnattr_cltn ()
 
const sc_attr_cltnattr_cltn () const
 
virtual const std::vector< sc_event * > & get_child_events () const
 
virtual const std::vector< sc_object * > & get_child_objects () const
 
sc_objectget_parent () const
 
sc_objectget_parent_object () const
 

Static Public Member Functions

static element_typecreate_element (const char *prefix, size_type index)
 

Protected Member Functions

void clear ()
 
virtual sc_objectobject_cast (void *p) const
 
void reserve (size_type n)
 
void push_back (void *item)
 
void check_index (size_type i) const
 
bool check_init (size_type n) const
 
sc_objectimplicit_cast (sc_object *p) const
 
sc_objectimplicit_cast (...) const
 
virtual void add_child_event (sc_event *event_p)
 
virtual void add_child_object (sc_object *object_p)
 
virtual bool remove_child_event (sc_event *event_p)
 
virtual bool remove_child_object (sc_object *object_p)
 
phase_cb_mask register_simulation_phase_callback (phase_cb_mask)
 
phase_cb_mask unregister_simulation_phase_callback (phase_cb_mask)
 

Static Protected Member Functions

static std::string make_name (const char *prefix, size_type index)
 

Detailed Description

template<typename T>
class sc_core::sc_vector< T >

Definition at line 114 of file sc_vector.h.

Member Typedef Documentation

◆ const_iterator

template<typename T>
typedef sc_vector_iter< const element_type > sc_core::sc_vector< T >::const_iterator

Definition at line 417 of file sc_vector.h.

◆ difference_type

typedef storage_type::difference_type sc_core::sc_vector_base::difference_type
inherited

Definition at line 148 of file sc_vector.h.

◆ element_type

template<typename T>
typedef T sc_core::sc_vector< T >::element_type

Definition at line 415 of file sc_vector.h.

◆ handle_type

typedef sc_vector_element* sc_core::sc_vector_base::handle_type
inherited

Definition at line 145 of file sc_vector.h.

◆ iterator

template<typename T>
typedef sc_vector_iter< element_type > sc_core::sc_vector< T >::iterator

Definition at line 416 of file sc_vector.h.

◆ phase_cb_mask

typedef unsigned sc_core::sc_object::phase_cb_mask
inherited

Definition at line 75 of file sc_object.h.

◆ size_type

typedef storage_type::size_type sc_core::sc_vector_base::size_type
inherited

Definition at line 147 of file sc_vector.h.

◆ storage_type

typedef std::vector< handle_type > sc_core::sc_vector_base::storage_type
inherited

Definition at line 146 of file sc_vector.h.

Constructor & Destructor Documentation

◆ sc_vector() [1/4]

template<typename T>
sc_core::sc_vector< T >::sc_vector ( )
inline

Definition at line 419 of file sc_vector.h.

◆ sc_vector() [2/4]

template<typename T>
sc_core::sc_vector< T >::sc_vector ( const char *  prefix)
inlineexplicit

Definition at line 421 of file sc_vector.h.

◆ sc_vector() [3/4]

template<typename T>
sc_core::sc_vector< T >::sc_vector ( const char *  prefix,
size_type  n 
)
inlineexplicit

Definition at line 425 of file sc_vector.h.

◆ sc_vector() [4/4]

template<typename T>
template<typename Creator >
sc_core::sc_vector< T >::sc_vector ( const char *  prefix,
size_type  n,
Creator  creator 
)
inline

Definition at line 430 of file sc_vector.h.

◆ ~sc_vector()

template<typename T >
sc_core::sc_vector< T >::~sc_vector ( )
virtual

Definition at line 751 of file sc_vector.h.

Member Function Documentation

◆ add_attribute()

bool sc_core::sc_object::add_attribute ( sc_attr_base )
inherited

◆ add_child_event()

virtual void sc_core::sc_object::add_child_event ( sc_event event_p)
protectedvirtualinherited

◆ add_child_object()

virtual void sc_core::sc_object::add_child_object ( sc_object object_p)
protectedvirtualinherited

Reimplemented in sc_core::sc_process_b.

◆ assemble()

template<typename T>
template<typename MT >
sc_vector_assembly<T,MT> sc_core::sc_vector< T >::assemble ( MT T::*  member_ptr)
inline

Definition at line 504 of file sc_vector.h.

◆ at() [1/2]

template<typename T>
element_type& sc_core::sc_vector< T >::at ( size_type  i)
inline

Definition at line 441 of file sc_vector.h.

◆ at() [2/2]

template<typename T>
const element_type& sc_core::sc_vector< T >::at ( size_type  i) const
inline

Definition at line 447 of file sc_vector.h.

◆ attr_cltn() [1/2]

sc_attr_cltn& sc_core::sc_object::attr_cltn ( )
inherited

◆ attr_cltn() [2/2]

const sc_attr_cltn& sc_core::sc_object::attr_cltn ( ) const
inherited

◆ basename()

const char* sc_core::sc_object::basename ( ) const
inherited

◆ begin() [1/2]

template<typename T>
iterator sc_core::sc_vector< T >::begin ( )
inline

Definition at line 458 of file sc_vector.h.

◆ begin() [2/2]

template<typename T>
const_iterator sc_core::sc_vector< T >::begin ( ) const
inline

Definition at line 461 of file sc_vector.h.

◆ bind() [1/4]

template<typename T>
template<typename ContainerType , typename ArgumentType >
iterator sc_core::sc_vector< T >::bind ( sc_vector_assembly< ContainerType, ArgumentType >  c)
inline

Definition at line 468 of file sc_vector.h.

◆ bind() [2/4]

template<typename T>
template<typename BindableContainer >
iterator sc_core::sc_vector< T >::bind ( BindableContainer &  c)
inline

Definition at line 472 of file sc_vector.h.

◆ bind() [3/4]

template<typename T>
template<typename BindableIterator >
iterator sc_core::sc_vector< T >::bind ( BindableIterator  first,
BindableIterator  last 
)
inline

Definition at line 476 of file sc_vector.h.

◆ bind() [4/4]

template<typename T>
template<typename BindableIterator >
iterator sc_core::sc_vector< T >::bind ( BindableIterator  first,
BindableIterator  last,
iterator  from 
)
inline

Definition at line 480 of file sc_vector.h.

◆ cbegin()

template<typename T>
const_iterator sc_core::sc_vector< T >::cbegin ( ) const
inline

Definition at line 464 of file sc_vector.h.

◆ cend()

template<typename T>
const_iterator sc_core::sc_vector< T >::cend ( ) const
inline

Definition at line 465 of file sc_vector.h.

◆ check_index()

void sc_core::sc_vector_base::check_index ( size_type  i) const
protectedinherited

◆ check_init()

bool sc_core::sc_vector_base::check_init ( size_type  n) const
protectedinherited

◆ clear()

template<typename T >
void sc_core::sc_vector< T >::clear ( )
protected

Definition at line 706 of file sc_vector.h.

◆ create_element()

template<typename T >
sc_vector< T >::element_type * sc_core::sc_vector< T >::create_element ( const char *  prefix,
size_type  index 
)
static

Definition at line 668 of file sc_vector.h.

◆ dump()

virtual void sc_core::sc_object::dump ( ::std::ostream &  os = ::std::cout) const
virtualinherited

◆ end() [1/2]

template<typename T>
iterator sc_core::sc_vector< T >::end ( )
inline

Definition at line 459 of file sc_vector.h.

◆ end() [2/2]

template<typename T>
const_iterator sc_core::sc_vector< T >::end ( ) const
inline

Definition at line 462 of file sc_vector.h.

◆ get_attribute() [1/2]

sc_attr_base* sc_core::sc_object::get_attribute ( const std::string &  name_)
inherited

◆ get_attribute() [2/2]

const sc_attr_base* sc_core::sc_object::get_attribute ( const std::string &  name_) const
inherited

◆ get_child_events()

virtual const std::vector<sc_event*>& sc_core::sc_object::get_child_events ( ) const
inlinevirtualinherited

Definition at line 114 of file sc_object.h.

◆ get_child_objects()

virtual const std::vector<sc_object*>& sc_core::sc_object::get_child_objects ( ) const
inlinevirtualinherited

Reimplemented in sc_core::sc_process_b, and sc_core::sc_module.

Definition at line 117 of file sc_object.h.

◆ get_elements()

std::vector<sc_object*> const& sc_core::sc_vector_base::get_elements ( ) const
inherited

◆ get_parent()

sc_object* sc_core::sc_object::get_parent ( ) const
inherited

◆ get_parent_object()

sc_object* sc_core::sc_object::get_parent_object ( ) const
inlineinherited

Definition at line 121 of file sc_object.h.

◆ implicit_cast() [1/2]

sc_object* sc_core::sc_vector_base::implicit_cast ( sc_object p) const
inlineprotectedinherited

Definition at line 203 of file sc_vector.h.

◆ implicit_cast() [2/2]

sc_object* sc_core::sc_vector_base::implicit_cast (   ...) const
protectedinherited

◆ init() [1/2]

template<typename T>
void sc_core::sc_vector< T >::init ( size_type  n)
inline

Definition at line 450 of file sc_vector.h.

◆ init() [2/2]

template<typename T >
template<typename Creator >
void sc_core::sc_vector< T >::init ( size_type  n,
Creator  c 
)

Definition at line 676 of file sc_vector.h.

◆ kind()

const char* sc_core::sc_vector_base::kind ( ) const
inlinevirtualinherited

Reimplemented from sc_core::sc_object.

Definition at line 150 of file sc_vector.h.

◆ make_name()

static std::string sc_core::sc_vector_base::make_name ( const char *  prefix,
size_type  index 
)
staticprotectedinherited

◆ name()

const char* sc_core::sc_object::name ( ) const
inlineinherited

Definition at line 77 of file sc_object.h.

◆ num_attributes()

int sc_core::sc_object::num_attributes ( ) const
inherited

◆ object_cast()

template<typename T>
virtual sc_object* sc_core::sc_vector< T >::object_cast ( void *  p) const
inlineprotectedvirtual

Implements sc_core::sc_vector_base.

Definition at line 511 of file sc_vector.h.

◆ operator()() [1/4]

template<typename T>
template<typename ContainerType , typename ArgumentType >
iterator sc_core::sc_vector< T >::operator() ( sc_vector_assembly< ContainerType, ArgumentType >  c)
inline

Definition at line 485 of file sc_vector.h.

◆ operator()() [2/4]

template<typename T>
template<typename ArgumentContainer >
iterator sc_core::sc_vector< T >::operator() ( ArgumentContainer &  c)
inline

Definition at line 489 of file sc_vector.h.

◆ operator()() [3/4]

template<typename T>
template<typename ArgumentIterator >
iterator sc_core::sc_vector< T >::operator() ( ArgumentIterator  first,
ArgumentIterator  last 
)
inline

Definition at line 493 of file sc_vector.h.

◆ operator()() [4/4]

template<typename T>
template<typename ArgumentIterator >
iterator sc_core::sc_vector< T >::operator() ( ArgumentIterator  first,
ArgumentIterator  last,
iterator  from 
)
inline

Definition at line 497 of file sc_vector.h.

◆ operator[]() [1/2]

template<typename T>
element_type& sc_core::sc_vector< T >::operator[] ( size_type  i)
inline

Definition at line 438 of file sc_vector.h.

◆ operator[]() [2/2]

template<typename T>
const element_type& sc_core::sc_vector< T >::operator[] ( size_type  i) const
inline

Definition at line 444 of file sc_vector.h.

◆ print()

virtual void sc_core::sc_object::print ( ::std::ostream &  os = ::std::cout) const
virtualinherited

◆ push_back()

void sc_core::sc_vector_base::push_back ( void *  item)
inlineprotectedinherited

Definition at line 187 of file sc_vector.h.

◆ register_simulation_phase_callback()

phase_cb_mask sc_core::sc_object::register_simulation_phase_callback ( phase_cb_mask  )
protectedinherited

◆ remove_all_attributes()

void sc_core::sc_object::remove_all_attributes ( )
inherited

◆ remove_attribute()

sc_attr_base* sc_core::sc_object::remove_attribute ( const std::string &  name_)
inherited

◆ remove_child_event()

virtual bool sc_core::sc_object::remove_child_event ( sc_event event_p)
protectedvirtualinherited

◆ remove_child_object()

virtual bool sc_core::sc_object::remove_child_object ( sc_object object_p)
protectedvirtualinherited

Reimplemented in sc_core::sc_process_b.

◆ report_empty_bind()

void sc_core::sc_vector_base::report_empty_bind ( const char *  kind_,
bool  dst_range_ 
) const
inherited

◆ reserve()

void sc_core::sc_vector_base::reserve ( size_type  n)
inlineprotectedinherited

Definition at line 181 of file sc_vector.h.

◆ simcontext()

sc_simcontext* sc_core::sc_object::simcontext ( ) const
inlineinherited

Definition at line 91 of file sc_object.h.

◆ size()

size_type sc_core::sc_vector_base::size ( ) const
inlineinherited

Definition at line 154 of file sc_vector.h.

◆ trace()

virtual void sc_core::sc_object::trace ( sc_trace_file tf) const
virtualinherited

◆ unregister_simulation_phase_callback()

phase_cb_mask sc_core::sc_object::unregister_simulation_phase_callback ( phase_cb_mask  )
protectedinherited

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