GTIRB  v2.2.0
GrammaTech Intermediate Representation for Binaries: C++ API
Public Member Functions | List of all members
gtirb::CodeBlockObserver Class Referenceabstract

Interface for notifying observers when a CodeBlock is modified. More...

#include <ByteInterval.hpp>

Public Member Functions

virtual ~CodeBlockObserver ()=default
 
virtual ChangeStatus decodeModeChange (CodeBlock *B, DecodeMode OldMode, DecodeMode NewMode)=0
 Notify the parent when the CodeBlock's decode mode changes. More...
 
virtual ChangeStatus sizeChange (CodeBlock *B, uint64_t OldSize, uint64_t NewSize)=0
 Notify the parent when the CodeBlock changes size. More...
 

Detailed Description

Interface for notifying observers when a CodeBlock is modified.

Constructor & Destructor Documentation

◆ ~CodeBlockObserver()

virtual gtirb::CodeBlockObserver::~CodeBlockObserver ( )
virtualdefault

Member Function Documentation

◆ decodeModeChange()

virtual ChangeStatus gtirb::CodeBlockObserver::decodeModeChange ( CodeBlock B,
DecodeMode  OldMode,
DecodeMode  NewMode 
)
pure virtual

Notify the parent when the CodeBlock's decode mode changes.

Called after the CodeBlock updates its internal state.

◆ sizeChange()

virtual ChangeStatus gtirb::CodeBlockObserver::sizeChange ( CodeBlock B,
uint64_t  OldSize,
uint64_t  NewSize 
)
pure virtual

Notify the parent when the CodeBlock changes size.

Called after the CodeBlock updates its internal state.

Parameters
Bthe CodeBlock that changed.
OldSizethe previous size of the CodeBlock.
NewSizethe new size of the CodeBlock.
Returns
indication of whether the observer accepts the change.

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