Loading...
Searching...
No Matches
BinaryNinja::CoreRenderLayer Class Reference

Public Member Functions

 CoreRenderLayer (BNRenderLayer *layer)
 
virtual ~CoreRenderLayer ()=default
 
virtual void ApplyToFlowGraph (Ref< FlowGraph > graph) override
 Apply this Render Layer to a Flow Graph, potentially modifying its nodes, their edges, their lines, and their lines' content.
 
virtual void ApplyToLinearViewObject (Ref< LinearViewObject > obj, Ref< LinearViewObject > prev, Ref< LinearViewObject > next, std::vector< LinearDisassemblyLine > &lines) override
 Apply this Render Layer to the lines produced by a LinearViewObject for rendering in Linear View, potentially modifying the lines and their contents.
 
- Public Member Functions inherited from BinaryNinja::RenderLayer
std::string GetName () const
 Get the name of a Render Layer.
 
BNRenderLayerDefaultEnableState GetDefaultEnableState () const
 Get whether the Render Layer is enabled by default.
 
virtual void ApplyToDisassemblyBlock (Ref< BasicBlock > block, std::vector< DisassemblyTextLine > &lines)
 Apply this Render Layer to a single Basic Block of Disassembly lines.
 
virtual void ApplyToLowLevelILBlock (Ref< BasicBlock > block, std::vector< DisassemblyTextLine > &lines)
 Apply this Render Layer to a single Basic Block of Low Level IL lines.
 
virtual void ApplyToMediumLevelILBlock (Ref< BasicBlock > block, std::vector< DisassemblyTextLine > &lines)
 Apply this Render Layer to a single Basic Block of Medium Level IL lines.
 
virtual void ApplyToHighLevelILBlock (Ref< BasicBlock > block, std::vector< DisassemblyTextLine > &lines)
 Apply this Render Layer to a single Basic Block of High Level IL lines.
 
virtual void ApplyToHighLevelILBody (Ref< Function > function, std::vector< LinearDisassemblyLine > &lines)
 Apply this Render Layer to the entire body of a High Level IL function.
 
virtual void ApplyToMiscLinearLines (Ref< LinearViewObject > obj, Ref< LinearViewObject > prev, Ref< LinearViewObject > next, std::vector< LinearDisassemblyLine > &lines)
 Apply to lines generated by Linear View that are not part of a function.
 
virtual void ApplyToBlock (Ref< BasicBlock > block, std::vector< DisassemblyTextLine > &lines)
 Apply to lines generated by a Basic Block, of any type.
 
- Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNRenderLayer >
 StaticCoreRefCountObject ()
 
virtual ~StaticCoreRefCountObject ()
 
BNRenderLayerGetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void AddRefForCallback ()
 
void ReleaseForCallback ()
 

Additional Inherited Members

- Static Public Member Functions inherited from BinaryNinja::RenderLayer
static void Register (RenderLayer *layer, BNRenderLayerDefaultEnableState enableState=DisabledByDefaultRenderLayerDefaultEnableState)
 Register a custom Render Layer.
 
static std::vector< Ref< RenderLayer > > GetList ()
 Get the list of all currently registered Render Layers.
 
static Ref< RenderLayerGetByName (const std::string &name)
 Look up a Render Layer by its name.
 
- Static Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNRenderLayer >
static BNRenderLayerGetObject (StaticCoreRefCountObject *obj)
 
- Public Attributes inherited from BinaryNinja::StaticCoreRefCountObject< BNRenderLayer >
std::atomic< int > m_refs
 
BNRenderLayerm_object
 
- Protected Member Functions inherited from BinaryNinja::RenderLayer
 RenderLayer (const std::string &name)
 
 RenderLayer (BNRenderLayer *layer)
 
virtual ~RenderLayer ()=default
 
- Static Protected Member Functions inherited from BinaryNinja::RenderLayer
static void ApplyToFlowGraphCallback (void *ctxt, BNFlowGraph *graph)
 
static void ApplyToLinearViewObjectCallback (void *ctxt, BNLinearViewObject *obj, BNLinearViewObject *prev, BNLinearViewObject *next, BNLinearDisassemblyLine *inLines, size_t inLineCount, BNLinearDisassemblyLine **outLines, size_t *outLineCount)
 
static void FreeLinesCallback (void *ctxt, BNLinearDisassemblyLine *lines, size_t count)
 

Constructor & Destructor Documentation

◆ CoreRenderLayer()

CoreRenderLayer::CoreRenderLayer ( BNRenderLayer * layer)

◆ ~CoreRenderLayer()

virtual BinaryNinja::CoreRenderLayer::~CoreRenderLayer ( )
virtualdefault

Member Function Documentation

◆ ApplyToFlowGraph()

void CoreRenderLayer::ApplyToFlowGraph ( Ref< FlowGraph > graph)
overridevirtual

Apply this Render Layer to a Flow Graph, potentially modifying its nodes, their edges, their lines, and their lines' content.

Note
If you override this function, you will need to call the parent implementation if you want to use the higher level ApplyToXLevelILBlock functionality.
Parameters
graphGraph to modify

Reimplemented from BinaryNinja::RenderLayer.

◆ ApplyToLinearViewObject()

void CoreRenderLayer::ApplyToLinearViewObject ( Ref< LinearViewObject > obj,
Ref< LinearViewObject > prev,
Ref< LinearViewObject > next,
std::vector< LinearDisassemblyLine > & lines )
overridevirtual

Apply this Render Layer to the lines produced by a LinearViewObject for rendering in Linear View, potentially modifying the lines and their contents.

Note
If you override this function, you will need to call the parent implementation if you want to use the higher level ApplyToXLevelILBlock functionality.
Parameters
objLinear View Object being rendered
prevLinear View Object located directly above this one
nextLinear View Object located directly below this one
linesLines originally rendered by the Linear View Object
Returns
Updated set of lines to display in Linear View

Reimplemented from BinaryNinja::RenderLayer.