16#ifndef LIEF_MACHO_BUILD_VERSION_COMMAND_H
17#define LIEF_MACHO_BUILD_VERSION_COMMAND_H
22#include "LIEF/visibility.h"
24#include "LIEF/MachO/LoadCommand.hpp"
25#include "LIEF/MachO/BuildToolVersion.hpp"
31struct build_version_command;
41 using tools_list_t = std::vector<BuildToolVersion>;
44 enum class PLATFORMS {
54 BuildVersion(
const details::build_version_command& version_cmd);
56 const version_t &minos,
58 const tools_list_t &tools);
63 std::unique_ptr<LoadCommand> clone()
const override {
64 return std::unique_ptr<BuildVersion>(
new BuildVersion(*
this));
67 version_t minos()
const {
71 void minos(version_t version) {
75 version_t sdk()
const {
78 void sdk(version_t version) {
82 PLATFORMS platform()
const {
85 void platform(PLATFORMS plat) {
89 const tools_list_t& tools()
const {
93 ~BuildVersion()
override =
default;
95 void accept(Visitor& visitor)
const override;
97 std::ostream& print(std::ostream& os)
const override;
99 static bool classof(
const LoadCommand* cmd) {
100 return cmd->command() == LoadCommand::TYPE::BUILD_VERSION;
104 PLATFORMS platform_ = PLATFORMS::UNKNOWN;
110LIEF_API
const char* to_string(BuildVersion::PLATFORMS e);
Class used to parse a single binary (i.e. non-FAT)
Definition BinaryParser.hpp:73
Definition BuildVersion.hpp:34
std::array< uint32_t, 3 > version_t
Version is an array of 3 integers.
Definition BuildVersion.hpp:39
Based class for the Mach-O load commands.
Definition LoadCommand.hpp:36
art_version_t version(const std::string &file)
Return the ART version of the given file.
LIEF namespace.
Definition Abstract/Binary.hpp:32