mirror of
https://github.com/QuasarApp/macdependency.git
synced 2025-04-28 21:34:31 +00:00
- Applied all recommended XCode (8) settings. - Removed boost and replaced that code by standard functions. - Implemented name mangling via abi::__cxa_demangle instead of running an external process to use c++filt. - Enabled C++11. Min deployment target is now OSX 10.7. - Some code clean up (e.g. formatting, std namespace).
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#ifndef DYLIBCOMMAND_H
|
|
#define DYLIBCOMMAND_H
|
|
|
|
#include "macho_global.h"
|
|
#include "loadcommand.h"
|
|
class EXPORT DylibCommand : public LoadCommand
|
|
{
|
|
public:
|
|
enum DependencyType {
|
|
DependencyWeak, // dependency is allowed to be missing
|
|
DependencyDelayed, // dependency is loaded when it is needed (not at start)
|
|
DependencyNormal,
|
|
DependencyId
|
|
};
|
|
|
|
DylibCommand(MachOHeader* header, DependencyType type);
|
|
virtual ~DylibCommand();
|
|
virtual unsigned int getSize() const;
|
|
virtual unsigned int getStructureSize() const { return sizeof(command); }
|
|
bool isId() const { return type==DependencyId; }
|
|
bool isNecessary() const { return type!=DependencyWeak; }
|
|
DependencyType getType() const { return type; }
|
|
std::string getName() const;
|
|
unsigned int getCurrentVersion() const;
|
|
unsigned int getCompatibleVersion() const;
|
|
time_t getTimeStamp() const;
|
|
static std::string getVersionString(unsigned int version);
|
|
|
|
private:
|
|
dylib_command command;
|
|
DependencyType type;
|
|
|
|
};
|
|
|
|
#endif // DYLIBCOMMAND_H
|