BearParser
Portable Executable parsing library (from PE-bear)
Loading...
Searching...
No Matches
FileView Class Reference

#include <FileBuffer.h>

Collaboration diagram for FileView:

Public Member Functions

 FileView (QString &fileName, bufsize_t maxSize=FILE_MAXSIZE)
 
virtual ~FileView ()
 
virtual bufsize_t getContentSize ()
 
virtual BYTE * getContent ()
 
bufsize_t getMappableSize ()
 
virtual bool isTruncated ()
 
- Public Member Functions inherited from AbstractByteBuffer
 AbstractByteBuffer ()
 
virtual ~AbstractByteBuffer ()
 
virtual bool isResized ()
 
BYTE operator[] (size_t idx)
 
virtual offset_t getOffset (void *ptr, bool allowExceptions=false)
 
virtual BYTE * getContentAt (offset_t offset, bufsize_t size, bool allowExceptions=false)
 
virtual BYTE * getContentAtPtr (BYTE *ptr, bufsize_t size, bool allowExceptions=false)
 
virtual bool setBufferedValue (BYTE *dstPtr, BYTE *srcPtr, bufsize_t srcSize, bufsize_t paddingSize, bool allowExceptions=false)
 
bool setStringValue (offset_t rawOffset, QString newText)
 
QString getStringValue (offset_t rawOffset, bufsize_t len=BUFSIZE_MAX, bool acceptNonTerminated=false)
 
QString getWStringValue (offset_t rawOffset, bufsize_t len)
 
QString getWAsciiStringValue (offset_t rawOffset, bufsize_t len, bool acceptNonTerminated=false)
 
bufsize_t getMaxSizeFromOffset (offset_t startOffset)
 
bufsize_t getMaxSizeFromPtr (BYTE *ptr)
 
bool isAreaEmpty (offset_t rawOffset, bufsize_t size)
 
bool fillContent (BYTE filling)
 
bool pasteBuffer (offset_t rawOffset, AbstractByteBuffer *buf, bool allowTrunc)
 
bool containsBlock (offset_t rawOffset, bufsize_t size)
 
bool intersectsBlock (offset_t rawOffset, bufsize_t size)
 
uint64_t getNumValue (offset_t offset, bufsize_t size, bool *isOk)
 
bool setNumValue (offset_t offset, bufsize_t size, uint64_t newVal)
 
bool setTextValue (char *textPtr, std::string newText, size_t fieldLimitLen=0)
 
virtual bool resize (bufsize_t newSize)
 
offset_t substFragmentByFile (offset_t offset, bufsize_t contentSize, QFile &fIn)
 
- Public Member Functions inherited from AbstractFileBuffer
QString getFileName ()
 

Static Public Member Functions

static bufsize_t getMappableSize (QFile &fIn)
 
- Static Public Member Functions inherited from AbstractByteBuffer
static bool isValid (AbstractByteBuffer *buf)
 
- Static Public Member Functions inherited from AbstractFileBuffer
static ByteBufferread (QString &file, bufsize_t minBufSize, const bool allowTruncate)
 
static bufsize_t getReadableSize (QFile &fIn)
 
static bufsize_t getReadableSize (const QString &path)
 
static bufsize_t dump (const QString &fileName, AbstractByteBuffer &buf, bool allowExceptions=false)
 

Protected Attributes

BYTE * mappedContent
 
bufsize_t mappedSize
 
QFile fIn
 
- Protected Attributes inherited from AbstractFileBuffer
QString fileName
 
qint64 fileSize
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractFileBuffer
 AbstractFileBuffer (QString v_fileName)
 
- Static Protected Member Functions inherited from AbstractFileBuffer
static ByteBufferread (QFile &fIn, bufsize_t minBufSize, const bool allowTruncate)
 

Detailed Description

Definition at line 35 of file FileBuffer.h.

Constructor & Destructor Documentation

◆ FileView()

FileView::FileView ( QString & fileName,
bufsize_t maxSize = FILE_MAXSIZE )

Definition at line 4 of file FileBuffer.cpp.

Here is the call graph for this function:

◆ ~FileView()

FileView::~FileView ( )
virtual

Definition at line 25 of file FileBuffer.cpp.

Member Function Documentation

◆ getContent()

virtual BYTE * FileView::getContent ( )
inlinevirtual

Implements AbstractByteBuffer.

Definition at line 44 of file FileBuffer.h.

◆ getContentSize()

virtual bufsize_t FileView::getContentSize ( )
inlinevirtual

Implements AbstractByteBuffer.

Definition at line 43 of file FileBuffer.h.

◆ getMappableSize() [1/2]

bufsize_t FileView::getMappableSize ( )
inline

Definition at line 45 of file FileBuffer.h.

Here is the call graph for this function:

◆ getMappableSize() [2/2]

bufsize_t FileView::getMappableSize ( QFile & fIn)
static

Definition at line 31 of file FileBuffer.cpp.

Here is the call graph for this function:

◆ isTruncated()

virtual bool FileView::isTruncated ( )
inlinevirtual

Reimplemented from AbstractByteBuffer.

Definition at line 46 of file FileBuffer.h.

Member Data Documentation

◆ fIn

QFile FileView::fIn
protected

Definition at line 51 of file FileBuffer.h.

◆ mappedContent

BYTE* FileView::mappedContent
protected

Definition at line 49 of file FileBuffer.h.

◆ mappedSize

bufsize_t FileView::mappedSize
protected

Definition at line 50 of file FileBuffer.h.


The documentation for this class was generated from the following files: