|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <llosymbol/llosymbol_base.hpp>
|
|
|
|
#include <lloutils.hpp>
|
|
|
|
|
|
|
|
namespace llo
|
|
|
|
{
|
|
|
|
class lloiff_t
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit lloiff_t( std::string &&file_name ) : file_name( file_name )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
lloiff_t( std::string &file_name ) : file_name( file_name )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class section_t
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
llo::utils::hash_t< std::string > section_name;
|
|
|
|
std::vector< llo::symbol::symbol_base_t > symbols;
|
|
|
|
std::vector< std::uint8_t > section_raw;
|
|
|
|
};
|
|
|
|
|
|
|
|
llo::utils::hash_t< std::string > get_name() const
|
|
|
|
{
|
|
|
|
return file_name;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::vector< section_t > get_sections() const
|
|
|
|
{
|
|
|
|
return sections;
|
|
|
|
}
|
|
|
|
|
|
|
|
void add_section( section_t &§ion )
|
|
|
|
{
|
|
|
|
sections.push_back( section );
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
llo::utils::hash_t< std::string > file_name;
|
|
|
|
std::vector< section_t > sections;
|
|
|
|
};
|
|
|
|
} // namespace llo
|