gem5 v24.0.0.0
|
#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 |
Definition at line 120 of file extensible.hh.
|
default |
|
inline |
Definition at line 124 of file extensible.hh.
References gem5::ArmISA::ext, and gem5::Extensible< Target >::extensions.
|
virtualdefault |
|
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.
Definition at line 203 of file extensible.hh.
References gem5::Extensible< Target >::extensions.
Referenced by gem5::Extensible< Target >::getExtension(), gem5::Extensible< Target >::removeExtension(), and gem5::Extensible< Target >::setExtension().
|
inline |
Get the extension pointer by linear search with the extensionID.
Definition at line 182 of file extensible.hh.
References gem5::Extensible< Target >::extensions, and gem5::Extensible< Target >::findExtension().
Referenced by gem5::RequestPort::addTrace(), gem5::BaseXBar::findPort(), and gem5::RequestPort::removeTrace().
|
inline |
Remove the extension based on its type.
ext | Extension to remove |
Definition at line 167 of file extensible.hh.
References gem5::Extensible< Target >::extensions, and gem5::Extensible< Target >::findExtension().
|
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<>.
ext | Extension to set |
Definition at line 142 of file extensible.hh.
References gem5::ArmISA::ext, gem5::Extensible< Target >::extensions, and gem5::Extensible< Target >::findExtension().
Referenced by gem5::RequestPort::addTrace().
|
protected |
Definition at line 215 of file extensible.hh.
Referenced by gem5::Extensible< Target >::Extensible(), gem5::Extensible< Target >::findExtension(), gem5::Extensible< Target >::getExtension(), gem5::Extensible< Target >::removeExtension(), and gem5::Extensible< Target >::setExtension().