16#ifndef LIEF_MACHO_BUILD_VERSION_COMMAND_H
17#define LIEF_MACHO_BUILD_VERSION_COMMAND_H
31struct build_version_command;
35 friend class BinaryParser;
37 public:
using version_t = std::array<uint32_t, 3>;
41 using tools_list_t = std::vector<BuildToolVersion>;
54 WATCHOS_SIMULATOR = 9,
57 VISIONOS_SIMULATOR = 12,
60 MACOS_EXCLAVE_CORE = 15,
61 MACOS_EXCLAVE_KIT = 16,
62 IOS_EXCLAVE_CORE = 17,
64 TVOS_EXCLAVE_CORE = 19,
65 TVOS_EXCLAVE_KIT = 20,
74 const version_t &minos,
76 const tools_list_t &tools);
78 BuildVersion&
operator=(
const BuildVersion& copy) =
default;
81 std::unique_ptr<LoadCommand>
clone()
const override {
82 return std::unique_ptr<BuildVersion>(
new BuildVersion(*
this));
93 version_t
sdk()
const {
96 void sdk(version_t version) {
113 void accept(Visitor& visitor)
const override;
115 std::ostream&
print(std::ostream& os)
const override;
118 return cmd->
command() == LoadCommand::TYPE::BUILD_VERSION;
122 PLATFORMS platform_ = PLATFORMS::UNKNOWN;
Definition BuildVersion.hpp:34
void minos(version_t version)
Definition BuildVersion.hpp:89
const tools_list_t & tools() const
Definition BuildVersion.hpp:107
BuildVersion & operator=(const BuildVersion ©)=default
BuildVersion(const details::build_version_command &version_cmd)
PLATFORMS platform() const
Definition BuildVersion.hpp:100
std::ostream & print(std::ostream &os) const override
static bool classof(const LoadCommand *cmd)
Definition BuildVersion.hpp:117
void accept(Visitor &visitor) const override
~BuildVersion() override=default
version_t sdk() const
Definition BuildVersion.hpp:93
version_t minos() const
Definition BuildVersion.hpp:85
BuildVersion(const PLATFORMS platform, const version_t &minos, const version_t &sdk, const tools_list_t &tools)
void sdk(version_t version)
Definition BuildVersion.hpp:96
BuildVersion(const BuildVersion ©)=default
std::unique_ptr< LoadCommand > clone() const override
Definition BuildVersion.hpp:81
PLATFORMS
Definition BuildVersion.hpp:44
void platform(PLATFORMS plat)
Definition BuildVersion.hpp:103
Based class for the Mach-O load commands.
Definition LoadCommand.hpp:37
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:125
Definition endianness_support.hpp:59
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
@ UNKNOWN
Definition MachO/enums.hpp:25
const char * to_string(BuildToolVersion::TOOLS tool)
LIEF namespace.
Definition Abstract/Binary.hpp:36
PLATFORMS
Definition platforms.hpp:26
#define LIEF_API
Definition visibility.h:41