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,
68 const version_t &minos,
70 const tools_list_t &tools);
72 BuildVersion&
operator=(
const BuildVersion& copy) =
default;
75 std::unique_ptr<LoadCommand>
clone()
const override {
76 return std::unique_ptr<BuildVersion>(
new BuildVersion(*
this));
87 version_t
sdk()
const {
90 void sdk(version_t version) {
107 void accept(Visitor& visitor)
const override;
109 std::ostream&
print(std::ostream& os)
const override;
112 return cmd->
command() == LoadCommand::TYPE::BUILD_VERSION;
116 PLATFORMS platform_ = PLATFORMS::UNKNOWN;
Definition BuildVersion.hpp:34
void minos(version_t version)
Definition BuildVersion.hpp:83
const tools_list_t & tools() const
Definition BuildVersion.hpp:101
BuildVersion & operator=(const BuildVersion ©)=default
BuildVersion(const details::build_version_command &version_cmd)
PLATFORMS platform() const
Definition BuildVersion.hpp:94
std::ostream & print(std::ostream &os) const override
static bool classof(const LoadCommand *cmd)
Definition BuildVersion.hpp:111
void accept(Visitor &visitor) const override
~BuildVersion() override=default
version_t sdk() const
Definition BuildVersion.hpp:87
version_t minos() const
Definition BuildVersion.hpp:79
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:90
BuildVersion(const BuildVersion ©)=default
std::unique_ptr< LoadCommand > clone() const override
Definition BuildVersion.hpp:75
PLATFORMS
Definition BuildVersion.hpp:44
void platform(PLATFORMS plat)
Definition BuildVersion.hpp:97
Based class for the Mach-O load commands.
Definition LoadCommand.hpp:37
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:124
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