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

Interface for notifying observers when the Module is updated. More...

#include <Module.hpp>

Public Member Functions

virtual ~ModuleObserver ()=default
 
virtual ChangeStatus addCodeBlocks (Module *M, Module::code_block_range Blocks)=0
 Notify the parent when CodeBlocks are added to the Module. More...
 
virtual ChangeStatus addProxyBlocks (Module *M, Module::proxy_block_range Blocks)=0
 Notify the parent when new ProxyBlocks are added to the Module. More...
 
virtual ChangeStatus nameChange (Module *M, const std::string &OldName, const std::string &NewName)=0
 Notify the parent when this Module's name changes. More...
 
virtual ChangeStatus removeCodeBlocks (Module *M, Module::code_block_range Blocks)=0
 Notify the parent when CodeBlocks are removed from the Module. More...
 
virtual ChangeStatus removeProxyBlocks (Module *M, Module::proxy_block_range Blocks)=0
 Notify the parent when ProxyBlocks are removed from the Module. More...
 

Detailed Description

Interface for notifying observers when the Module is updated.

Constructor & Destructor Documentation

◆ ~ModuleObserver()

virtual gtirb::ModuleObserver::~ModuleObserver ( )
virtualdefault

Member Function Documentation

◆ addCodeBlocks()

virtual ChangeStatus gtirb::ModuleObserver::addCodeBlocks ( Module M,
Module::code_block_range  Blocks 
)
pure virtual

Notify the parent when CodeBlocks are added to the Module.

Called after the Module updates its internal state.

Parameters
Mthe Module to which CodeBlocks were added.
Blocksa range containing the new CodeBlocks.

◆ addProxyBlocks()

virtual ChangeStatus gtirb::ModuleObserver::addProxyBlocks ( Module M,
Module::proxy_block_range  Blocks 
)
pure virtual

Notify the parent when new ProxyBlocks are added to the Module.

Called after the Module updates its internal state.

Parameters
Mthe Module to which the ProxyBlocks were added.
Blocksa range containing the new ProxyBlocks.

◆ nameChange()

virtual ChangeStatus gtirb::ModuleObserver::nameChange ( Module M,
const std::string &  OldName,
const std::string &  NewName 
)
pure virtual

Notify the parent when this Module's name changes.

Called after the Module updates its internal state.

Parameters
Mthe Module whose name changed.
OldNamethe Module's previous name.
NewNamethe new name of this Module.

◆ removeCodeBlocks()

virtual ChangeStatus gtirb::ModuleObserver::removeCodeBlocks ( Module M,
Module::code_block_range  Blocks 
)
pure virtual

Notify the parent when CodeBlocks are removed from the Module.

Called before the Module updates its internal state.

Parameters
Mthe Module from which CodeBlocks will be removed.
Blocksa range containing the CodeBlocks to remove.

◆ removeProxyBlocks()

virtual ChangeStatus gtirb::ModuleObserver::removeProxyBlocks ( Module M,
Module::proxy_block_range  Blocks 
)
pure virtual

Notify the parent when ProxyBlocks are removed from the Module.

Called before the Module updates its internal state.

Parameters
Mthe Module from which ProxyBlocks will be removed.
Blocksa range containing ProxyBlocks to remove.

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