ROSE 0.11.145.147
Public Types | Public Member Functions | Public Attributes | List of all members
Rose::BinaryAnalysis::Unparser::ArrowMargin Class Reference

Description

State associated with printing arrows in the margin.

Definition at line 48 of file Unparser/Base.h.

#include <Rose/BinaryAnalysis/Unparser/Base.h>

Collaboration diagram for Rose::BinaryAnalysis::Unparser::ArrowMargin:
Collaboration graph
[legend]

Public Types

enum  Flags {
  POINTABLE_ENTITY_START = 0x00000001 ,
  POINTABLE_ENTITY_END = 0x00000002 ,
  POINTABLE_ENTITY_INSIDE = 0x00000004 ,
  ALWAYS_RENDER = 0x00000008
}
 Flags controlling the finer aspects of margin arrows. More...
 

Public Member Functions

void reset ()
 Reset the marging arrow state.
 
std::string render (Sawyer::Optional< EdgeArrows::VertexId > currentEntity)
 Generate the string to print in the margin.
 

Public Attributes

EdgeArrows arrows
 The arrows to be displayed.
 
BitFlags< Flagsflags
 Flags that hold and/or control the output state.
 
Sawyer::Optional< EdgeArrows::VertexIdlatestEntity
 Latest pointable entity that was encountered in the output.
 

Member Enumeration Documentation

◆ Flags

Flags controlling the finer aspects of margin arrows.

Enumerator
POINTABLE_ENTITY_START 

Set this flag when you want the emitLinePrefix function to treat the next possible line as the start of a pointable entity.

The actual start is delayed until an appropriate state is reached. When the entity does finally start, the emitLinePrefix function will clear this flag and set the corresponding EMIT flag instead. The start of a pointable entity serves as the line to which arrows point.

POINTABLE_ENTITY_END 

Set this flag when you want the emitLinePrefix function to treat the next line as the end of a pointable entity.

The end of an entity is from whence arrows emanate. The emitLinePrefix will clear this flag at the next opportunity.

POINTABLE_ENTITY_INSIDE 

This flag is modified automatically by the emitLinePrefix function.

There is no need to adjust it.

ALWAYS_RENDER 

If set, then emit the prefix area even if we seem to be generating output that the unparser would otherwise consider to be before or after the set of arrows.

This flag is not adjusted by the renderer.

Definition at line 51 of file Unparser/Base.h.

Member Function Documentation

◆ reset()

void Rose::BinaryAnalysis::Unparser::ArrowMargin::reset ( )
inline

Reset the marging arrow state.

This should be called near the end of emitting a function, probably just before emitting the function epilogue.

Definition at line 78 of file Unparser/Base.h.

References arrows, flags, latestEntity, and Rose::BinaryAnalysis::Unparser::EdgeArrows::reset().

◆ render()

std::string Rose::BinaryAnalysis::Unparser::ArrowMargin::render ( Sawyer::Optional< EdgeArrows::VertexId currentEntity)

Generate the string to print in the margin.

The currentEntity values are the vertex IDs used to initialize the arrows method of this object. For control flow graphs, that's usually the entry address of a basic block. However, the unparser doesn't really care what kind of entities are being pointed at by the arrows.

Member Data Documentation

◆ arrows

EdgeArrows Rose::BinaryAnalysis::Unparser::ArrowMargin::arrows

The arrows to be displayed.

Definition at line 71 of file Unparser/Base.h.

Referenced by reset().

◆ flags

BitFlags<Flags> Rose::BinaryAnalysis::Unparser::ArrowMargin::flags

Flags that hold and/or control the output state.

Definition at line 72 of file Unparser/Base.h.

Referenced by reset().

◆ latestEntity

Sawyer::Optional<EdgeArrows::VertexId> Rose::BinaryAnalysis::Unparser::ArrowMargin::latestEntity

Latest pointable entity that was encountered in the output.

Definition at line 73 of file Unparser/Base.h.

Referenced by reset().


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