gem5 [DEVELOP-FOR-25.0]
Loading...
Searching...
No Matches
gem5::Extensible< Target > Class Template Reference

#include <extensible.hh>

Public Member Functions

 Extensible ()=default
 
 Extensible (const Extensible &other)
 
virtual ~Extensible ()=default
 
template<typename T>
void setExtension (std::shared_ptr< T > ext)
 Set a new extension to the packet and replace the old one, if there already exists the same type of extension in this packet.
 
template<typename T>
void removeExtension (void)
 Remove the extension based on its type.
 
template<typename T>
std::shared_ptr< T > getExtension ()
 Get the extension pointer by linear search with the extensionID.
 

Protected Member Functions

template<typename T>
std::list< std::shared_ptr< ExtensionBase > >::iterator findExtension ()
 Go through the extension list and return the iterator to the instance of the type of extension.
 

Protected Attributes

std::list< std::shared_ptr< ExtensionBase > > extensions
 

Detailed Description

template<typename Target>
class gem5::Extensible< Target >

Definition at line 120 of file extensible.hh.

Constructor & Destructor Documentation

◆ Extensible() [1/2]

template<typename Target>
gem5::Extensible< Target >::Extensible ( )
default

Referenced by Extensible().

◆ Extensible() [2/2]

template<typename Target>
gem5::Extensible< Target >::Extensible ( const Extensible< Target > & other)
inline

Definition at line 124 of file extensible.hh.

References gem5::ArmISA::ext, Extensible(), and extensions.

◆ ~Extensible()

template<typename Target>
virtual gem5::Extensible< Target >::~Extensible ( )
virtualdefault

Member Function Documentation

◆ findExtension()

template<typename Target>
template<typename T>
std::list< std::shared_ptr< ExtensionBase > >::iterator gem5::Extensible< Target >::findExtension ( )
inlineprotected

Go through the extension list and return the iterator to the instance of the type of extension.

If there is no such an extension, return the end iterator of the list.

Returns
The iterator to the extension type T if there exists.

Definition at line 203 of file extensible.hh.

References extensions.

Referenced by getExtension(), removeExtension(), and setExtension().

◆ getExtension()

template<typename Target>
template<typename T>
std::shared_ptr< T > gem5::Extensible< Target >::getExtension ( )
inline

Get the extension pointer by linear search with the extensionID.

Definition at line 182 of file extensible.hh.

References extensions, and findExtension().

Referenced by gem5::RequestPort::addTrace(), gem5::BaseXBar::findPort(), and gem5::RequestPort::removeTrace().

◆ removeExtension()

template<typename Target>
template<typename T>
void gem5::Extensible< Target >::removeExtension ( void )
inline

Remove the extension based on its type.

Parameters
extExtension to remove

Definition at line 167 of file extensible.hh.

References extensions, and findExtension().

◆ setExtension()

template<typename Target>
template<typename T>
void gem5::Extensible< Target >::setExtension ( std::shared_ptr< T > ext)
inline

Set a new extension to the packet and replace the old one, if there already exists the same type of extension in this packet.

This new extension will be deleted automatically with the shared_ptr<>.

Parameters
extExtension to set

Definition at line 142 of file extensible.hh.

References gem5::ArmISA::ext, extensions, and findExtension().

Referenced by gem5::RequestPort::addTrace().

Member Data Documentation

◆ extensions

template<typename Target>
std::list<std::shared_ptr<ExtensionBase> > gem5::Extensible< Target >::extensions
protected

Definition at line 215 of file extensible.hh.

Referenced by Extensible(), findExtension(), getExtension(), removeExtension(), and setExtension().


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

Generated on Mon May 26 2025 09:19:20 for gem5 by doxygen 1.13.2