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

#include <AbstractByteBuffer.h>

Collaboration diagram for BufferView:

Public Member Functions

 BufferView (AbstractByteBuffer *parent, offset_t offset, bufsize_t size)
 
virtual ~BufferView ()
 
virtual bufsize_t getContentSize ()
 
virtual BYTE * getContent ()
 
bufsize_t getRequestedSize () const
 
- Public Member Functions inherited from AbstractByteBuffer
 AbstractByteBuffer ()
 
virtual ~AbstractByteBuffer ()
 
virtual bool isTruncated ()
 
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)
 

Protected Attributes

AbstractByteBufferparent
 
offset_t offset
 
bufsize_t size
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractByteBuffer
static bool isValid (AbstractByteBuffer *buf)
 

Detailed Description

Definition at line 78 of file AbstractByteBuffer.h.

Constructor & Destructor Documentation

◆ BufferView()

BufferView::BufferView ( AbstractByteBuffer * parent,
offset_t offset,
bufsize_t size )

Definition at line 417 of file AbstractByteBuffer.cpp.

◆ ~BufferView()

virtual BufferView::~BufferView ( )
inlinevirtual

Definition at line 82 of file AbstractByteBuffer.h.

Member Function Documentation

◆ getContent()

BYTE * BufferView::getContent ( )
virtual

Implements AbstractByteBuffer.

Definition at line 436 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ getContentSize()

bufsize_t BufferView::getContentSize ( )
virtual

Implements AbstractByteBuffer.

Definition at line 423 of file AbstractByteBuffer.cpp.

Here is the call graph for this function:

◆ getRequestedSize()

bufsize_t BufferView::getRequestedSize ( ) const
inline

Definition at line 87 of file AbstractByteBuffer.h.

Member Data Documentation

◆ offset

offset_t BufferView::offset
protected

Definition at line 91 of file AbstractByteBuffer.h.

◆ parent

AbstractByteBuffer* BufferView::parent
protected

Definition at line 90 of file AbstractByteBuffer.h.

◆ size

bufsize_t BufferView::size
protected

Definition at line 92 of file AbstractByteBuffer.h.


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