Go to the documentation of this file.
16#ifndef LIEF_MACHO_SOURCE_VERSION_COMMAND_H
17#define LIEF_MACHO_SOURCE_VERSION_COMMAND_H
29struct source_version_command;
37 public:
using version_t = std::array<uint32_t, 5>;
44 SourceVersion&
operator=(
const SourceVersion& copy) =
default;
47 std::unique_ptr<LoadCommand>
clone()
const override {
48 return std::unique_ptr<SourceVersion>(
new SourceVersion(*
this));
52 const version_t&
version()
const {
61 void accept(Visitor& visitor)
const override;
63 std::ostream&
print(std::ostream& os)
const override;
65 static bool classof(
const LoadCommand* cmd) {
66 return cmd->
command() == LoadCommand::TYPE::SOURCE_VERSION;
70 version_t version_ = {0};
Based class for the Mach-O load commands.
Definition LoadCommand.hpp:37
LoadCommand::TYPE command() const
Command type.
Definition LoadCommand.hpp:125
Class that represents the MachO LoadCommand::TYPE::SOURCE_VERSION This command is used to provide the...
Definition SourceVersion.hpp:35
SourceVersion & operator=(const SourceVersion ©)=default
void accept(Visitor &visitor) const override
std::ostream & print(std::ostream &os) const override
void version(const version_t &version)
Definition SourceVersion.hpp:57
SourceVersion(const details::source_version_command &version_cmd)
SourceVersion(const SourceVersion ©)=default
static bool classof(const LoadCommand *cmd)
Definition SourceVersion.hpp:65
std::unique_ptr< LoadCommand > clone() const override
Definition SourceVersion.hpp:47
const version_t & version() const
Return the version as an array.
Definition SourceVersion.hpp:54
~SourceVersion() override=default
Definition endianness_support.hpp:59
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41