2022-03-16 16:53:43 -04:00
|
|
|
#include "ElfViewEx.h"
|
|
|
|
#include "StdStreamUtils.h"
|
|
|
|
#include "ElfFile.h"
|
|
|
|
|
2022-07-22 17:01:59 -04:00
|
|
|
template <typename ElfType>
|
|
|
|
CElfViewEx<ElfType>::CElfViewEx(QMdiArea* mdiArea, const fs::path& elfPath)
|
2022-07-25 11:19:56 -04:00
|
|
|
: CELFView<ElfType>(mdiArea)
|
2022-03-16 16:53:43 -04:00
|
|
|
{
|
2022-07-25 11:19:56 -04:00
|
|
|
CELFView<ElfType>::setWindowTitle(QString::fromStdString(elfPath.filename().string()));
|
2022-03-16 16:53:43 -04:00
|
|
|
auto stream = Framework::CreateInputStdStream(elfPath.native());
|
2022-07-22 17:01:59 -04:00
|
|
|
m_elf = std::make_unique<CElfFile<ElfType>>(stream);
|
2022-07-25 11:19:56 -04:00
|
|
|
CELFView<ElfType>::SetELF(m_elf.get());
|
2022-03-16 16:53:43 -04:00
|
|
|
}
|
|
|
|
|
2022-07-22 17:01:59 -04:00
|
|
|
template class CElfViewEx<CELF32>;
|
|
|
|
template class CElfViewEx<CELF64>;
|