Initial
This commit is contained in:
118
image/IFLAGS.HPP
Normal file
118
image/IFLAGS.HPP
Normal file
@@ -0,0 +1,118 @@
|
||||
#ifndef _IMAGE_IMAGEFLAGS_HPP_
|
||||
#define _IMAGE_IMAGEFLAGS_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
|
||||
class ImageFlags
|
||||
{
|
||||
public:
|
||||
ImageFlags(const ImageFlags &someImageFlags);
|
||||
ImageFlags(WORD imageFlags=0);
|
||||
~ImageFlags();
|
||||
ImageFlags &operator=(const ImageFlags &someImageFlags);
|
||||
WORD operator==(const ImageFlags &someImageFlags);
|
||||
WORD hasRelocations(void)const;
|
||||
WORD hasLineNumbers(void)const;
|
||||
WORD hasLocalSymbols(void)const;
|
||||
WORD hasBytesReversedLo(void)const;
|
||||
WORD hasBytesReversedHi(void)const;
|
||||
WORD hasDebugInfo(void)const;
|
||||
WORD is32BitMachine(void)const;
|
||||
WORD isExeFile(void)const;
|
||||
WORD isDllFile(void)const;
|
||||
WORD isSystemFile(void)const;
|
||||
private:
|
||||
WORD mImageFlags;
|
||||
};
|
||||
|
||||
inline
|
||||
ImageFlags::ImageFlags(WORD imageFlags)
|
||||
: mImageFlags(imageFlags)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
ImageFlags::ImageFlags(const ImageFlags &someImageFlags)
|
||||
{
|
||||
*this=someImageFlags;
|
||||
}
|
||||
|
||||
inline
|
||||
ImageFlags::~ImageFlags()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
ImageFlags &ImageFlags::operator=(const ImageFlags &someImageFlags)
|
||||
{
|
||||
mImageFlags=someImageFlags.mImageFlags;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD ImageFlags::operator==(const ImageFlags &someImageFlags)
|
||||
{
|
||||
return mImageFlags==someImageFlags.mImageFlags;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD ImageFlags::hasRelocations(void)const
|
||||
{
|
||||
return (!(IMAGE_FILE_RELOCS_STRIPPED==(mImageFlags&IMAGE_FILE_RELOCS_STRIPPED)));
|
||||
}
|
||||
|
||||
inline
|
||||
WORD ImageFlags::hasLineNumbers(void)const
|
||||
{
|
||||
return (!(IMAGE_FILE_LINE_NUMS_STRIPPED==(mImageFlags&IMAGE_FILE_LINE_NUMS_STRIPPED)));
|
||||
}
|
||||
|
||||
inline
|
||||
WORD ImageFlags::hasLocalSymbols(void)const
|
||||
{
|
||||
return (!(IMAGE_FILE_LOCAL_SYMS_STRIPPED==(mImageFlags&IMAGE_FILE_LOCAL_SYMS_STRIPPED)));
|
||||
}
|
||||
|
||||
inline
|
||||
WORD ImageFlags::hasBytesReversedLo(void)const
|
||||
{
|
||||
return (IMAGE_FILE_BYTES_REVERSED_LO==(mImageFlags&IMAGE_FILE_BYTES_REVERSED_LO));
|
||||
}
|
||||
|
||||
inline
|
||||
WORD ImageFlags::hasBytesReversedHi(void)const
|
||||
{
|
||||
return (IMAGE_FILE_BYTES_REVERSED_HI==(mImageFlags&IMAGE_FILE_BYTES_REVERSED_HI));
|
||||
}
|
||||
|
||||
inline
|
||||
WORD ImageFlags::hasDebugInfo(void)const
|
||||
{
|
||||
return (!(IMAGE_FILE_DEBUG_STRIPPED==(mImageFlags&IMAGE_FILE_DEBUG_STRIPPED)));
|
||||
}
|
||||
|
||||
inline
|
||||
WORD ImageFlags::is32BitMachine(void)const
|
||||
{
|
||||
return (IMAGE_FILE_32BIT_MACHINE==(mImageFlags&IMAGE_FILE_32BIT_MACHINE));
|
||||
}
|
||||
|
||||
inline
|
||||
WORD ImageFlags::isExeFile(void)const
|
||||
{
|
||||
return (IMAGE_FILE_EXECUTABLE_IMAGE==(mImageFlags&IMAGE_FILE_EXECUTABLE_IMAGE));
|
||||
}
|
||||
|
||||
inline
|
||||
WORD ImageFlags::isDllFile(void)const
|
||||
{
|
||||
return (IMAGE_FILE_DLL==(mImageFlags&IMAGE_FILE_DLL));
|
||||
}
|
||||
|
||||
inline
|
||||
WORD ImageFlags::isSystemFile(void)const
|
||||
{
|
||||
return (IMAGE_FILE_SYSTEM==(mImageFlags&IMAGE_FILE_SYSTEM));
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user