OpenASIP  2.0
Public Types | Public Member Functions | Private Attributes | List of all members
TTAMachine::Machine::ComponentContainer< ComponentType > Class Template Reference

#include <Machine.hh>

Inheritance diagram for TTAMachine::Machine::ComponentContainer< ComponentType >:
Inheritance graph
Collaboration diagram for TTAMachine::Machine::ComponentContainer< ComponentType >:
Collaboration graph

Public Types

typedef std::vector< ComponentType * > ComponentTable
 Table of ComponentType pointers. More...
 
typedef ComponentTable::const_iterator const_iterator
 

Public Member Functions

 ComponentContainer ()
 
 ~ComponentContainer ()
 
void addComponent (ComponentType *component)
 
void removeComponent (ComponentType *component)
 
void deleteAll ()
 
ComponentType * item (int index) const
 
ComponentType * item (const std::string &name) const
 
int count () const
 
void moveToPosition (const ComponentType *component, int position)
 
const_iterator begin () const noexcept
 
const_iterator end () const noexcept
 

Private Attributes

ComponentTable components_
 Contains all the components of the container. More...
 

Detailed Description

template<typename ComponentType>
class TTAMachine::Machine::ComponentContainer< ComponentType >

A template class which contains machine components.

Definition at line 153 of file Machine.hh.

Member Typedef Documentation

◆ ComponentTable

template<typename ComponentType >
typedef std::vector<ComponentType*> TTAMachine::Machine::ComponentContainer< ComponentType >::ComponentTable

Table of ComponentType pointers.

Definition at line 167 of file Machine.hh.

◆ const_iterator

template<typename ComponentType >
typedef ComponentTable::const_iterator TTAMachine::Machine::ComponentContainer< ComponentType >::const_iterator

Definition at line 169 of file Machine.hh.

Constructor & Destructor Documentation

◆ ComponentContainer()

template<typename ComponentType >
TTAMachine::Machine::ComponentContainer< ComponentType >::ComponentContainer ( )

◆ ~ComponentContainer()

template<typename ComponentType >
TTAMachine::Machine::ComponentContainer< ComponentType >::~ComponentContainer ( )

Member Function Documentation

◆ addComponent()

template<typename ComponentType >
void TTAMachine::Machine::ComponentContainer< ComponentType >::addComponent ( ComponentType *  component)

◆ begin()

template<typename ComponentType >
const_iterator TTAMachine::Machine::ComponentContainer< ComponentType >::begin ( ) const
noexcept

◆ count()

template<typename ComponentType >
int TTAMachine::Machine::ComponentContainer< ComponentType >::count ( ) const

◆ deleteAll()

template<typename ComponentType >
void TTAMachine::Machine::ComponentContainer< ComponentType >::deleteAll ( )

◆ end()

template<typename ComponentType >
const_iterator TTAMachine::Machine::ComponentContainer< ComponentType >::end ( ) const
noexcept

◆ item() [1/2]

template<typename ComponentType >
ComponentType* TTAMachine::Machine::ComponentContainer< ComponentType >::item ( const std::string &  name) const

◆ item() [2/2]

template<typename ComponentType >
ComponentType* TTAMachine::Machine::ComponentContainer< ComponentType >::item ( int  index) const

◆ moveToPosition()

template<typename ComponentType >
void TTAMachine::Machine::ComponentContainer< ComponentType >::moveToPosition ( const ComponentType *  component,
int  position 
)

◆ removeComponent()

template<typename ComponentType >
void TTAMachine::Machine::ComponentContainer< ComponentType >::removeComponent ( ComponentType *  component)

Member Data Documentation

◆ components_

template<typename ComponentType >
ComponentTable TTAMachine::Machine::ComponentContainer< ComponentType >::components_
private

Contains all the components of the container.

Definition at line 176 of file Machine.hh.


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