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

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

#include <Symbol.hpp>

Public Member Functions

virtual ~SymbolObserver ()=default
 
virtual ChangeStatus nameChange (Symbol *S, const std::string &OldName, const std::string &NewName)=0
 Notify parent when the Symbol's name changes. More...
 
virtual ChangeStatus referentChange (Symbol *S, std::variant< std::monostate, Addr, Node * > OldReferent, std::variant< std::monostate, Addr, Node * > NewReferent)=0
 Notify parent when the Symbol's referent (Node or Addr) changes. More...
 

Detailed Description

Interface for notifying observers when the Symbol is updated.

Constructor & Destructor Documentation

◆ ~SymbolObserver()

virtual gtirb::SymbolObserver::~SymbolObserver ( )
virtualdefault

Member Function Documentation

◆ nameChange()

virtual ChangeStatus gtirb::SymbolObserver::nameChange ( Symbol S,
const std::string &  OldName,
const std::string &  NewName 
)
pure virtual

Notify parent when the Symbol's name changes.

Called after the Symbol updates its internal state.

Parameters
Sthe Symbol whose name changed.
OldNamethe Symbol's previous name.
NewNamethe new name of the Symbol.
Returns
indication of whether the observer accepts the change.

◆ referentChange()

virtual ChangeStatus gtirb::SymbolObserver::referentChange ( Symbol S,
std::variant< std::monostate, Addr, Node * >  OldReferent,
std::variant< std::monostate, Addr, Node * >  NewReferent 
)
pure virtual

Notify parent when the Symbol's referent (Node or Addr) changes.

Called after the Symbol updates its internal state.

Parameters
Sthe Symbol whose referent changed.
OldReferentthe Symbol's previous referent.
NewReferentthe new value the Symbol refers to.
Returns
indication of whether the observer accepts the change.

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