Retro68/Elf2Mac/SegmentMap.h

37 lines
676 B
C
Raw Normal View History

2017-09-26 22:30:06 +00:00
#ifndef SEGMENTMAP_H
#define SEGMENTMAP_H
#include <vector>
#include <string>
class SegmentInfo
{
public:
int id;
2017-09-27 04:44:00 +00:00
std::string name;
2017-09-26 22:30:06 +00:00
std::vector<std::string> filters;
SegmentInfo();
template<typename... Args>
SegmentInfo(int id, std::string name, Args... args)
2017-09-27 04:44:00 +00:00
: id(id), name(name), filters { args... }
2017-09-26 22:30:06 +00:00
{
}
void WriteFilters(std::ostream& out, std::string section);
void WriteFiltersKeep(std::ostream& out, std::string section);
void CreateLdScript(std::ostream& out);
};
class SegmentMap
{
std::vector<SegmentInfo> segments;
public:
SegmentMap();
void CreateLdScript(std::ostream& out);
2017-09-27 04:44:00 +00:00
std::string GetSegmentName(int id);
2017-09-26 22:30:06 +00:00
};
#endif // SEGMENTMAP_H