GCC Middle and Back End API Reference
diagnostics::digraphs::node Class Reference

#include <digraphs.h>

Inheritance diagram for diagnostics::digraphs::node:
Collaboration diagram for diagnostics::digraphs::node:

Public Member Functions

virtual ~node ()
 node (digraph &g, std::string id)
 node (const node &)=delete
std::string get_id () const
const char * get_label () const
void set_label (const char *label)
void set_label (std::string label)
size_t get_num_children () const
nodeget_child (size_t idx) const
void add_child (std::unique_ptr< node > child)
location_t get_physical_loc () const
void set_physical_loc (location_t physical_loc)
logical_locations::key get_logical_loc () const
void set_logical_loc (logical_locations::key logical_loc)
void print (graphviz_out &gv) const
void dump () const
std::unique_ptr< json::objectto_json_sarif_node () const
std::unique_ptr< nodeclone (digraph &new_graph, std::map< node *, node * > &node_mapping) const
const char * get_attr (const char *key_prefix, const char *key) const
void set_attr (const char *key_prefix, const char *key, const char *value)
void set_json_attr (const char *key_prefix, const char *key, std::unique_ptr< json::value > value)
json::objectget_property_bag () const
void set_property_bag (std::unique_ptr< json::object > property_bag)

Private Attributes

std::string m_id
std::unique_ptr< std::string > m_label
std::vector< std::unique_ptr< node > > m_children
location_t m_physical_loc
logical_locations::key m_logical_loc
std::unique_ptr< json::objectm_property_bag

Constructor & Destructor Documentation

◆ ~node()

virtual diagnostics::digraphs::node::~node ( )
inlinevirtual

◆ node() [1/2]

diagnostics::digraphs::node::node ( digraph & g,
std::string id )
inline

◆ node() [2/2]

diagnostics::digraphs::node::node ( const node & )
delete

References node().

Member Function Documentation

◆ add_child()

void diagnostics::digraphs::node::add_child ( std::unique_ptr< node > child)
inline

◆ clone()

std::unique_ptr< diagnostics::digraphs::node > diagnostics::digraphs::node::clone ( digraph & new_graph,
std::map< node *, node * > & node_mapping ) const

◆ dump()

DEBUG_FUNCTION void diagnostics::digraphs::node::dump ( ) const

References to_json_sarif_node().

◆ get_attr()

const char * diagnostics::digraphs::object::get_attr ( const char * key_prefix,
const char * key ) const
inherited

◆ get_child()

node & diagnostics::digraphs::node::get_child ( size_t idx) const
inline

◆ get_id()

std::string diagnostics::digraphs::node::get_id ( ) const
inline

References m_id.

Referenced by clone(), and state_diagram::make_id().

◆ get_label()

const char * diagnostics::digraphs::node::get_label ( ) const
inline

References m_label.

◆ get_logical_loc()

logical_locations::key diagnostics::digraphs::node::get_logical_loc ( ) const
inline

References m_logical_loc.

◆ get_num_children()

size_t diagnostics::digraphs::node::get_num_children ( ) const
inline

◆ get_physical_loc()

location_t diagnostics::digraphs::node::get_physical_loc ( ) const
inline

References m_physical_loc.

◆ get_property_bag()

json::object * diagnostics::digraphs::object::get_property_bag ( ) const
inlineinherited

◆ print()

void diagnostics::digraphs::node::print ( graphviz_out & gv) const

References new_graph().

◆ set_attr()

void diagnostics::digraphs::object::set_attr ( const char * key_prefix,
const char * key,
const char * value )
inherited

References set_json_attr().

◆ set_json_attr()

void diagnostics::digraphs::object::set_json_attr ( const char * key_prefix,
const char * key,
std::unique_ptr< json::value > value )
inherited

References m_property_bag.

Referenced by set_attr().

◆ set_label() [1/2]

void diagnostics::digraphs::node::set_label ( const char * label)
inline

◆ set_label() [2/2]

void diagnostics::digraphs::node::set_label ( std::string label)
inline

References m_label.

◆ set_logical_loc()

void diagnostics::digraphs::node::set_logical_loc ( logical_locations::key logical_loc)
inline

◆ set_physical_loc()

void diagnostics::digraphs::node::set_physical_loc ( location_t physical_loc)
inline

References m_physical_loc.

Referenced by diagnostic_node_set_location().

◆ set_property_bag()

void diagnostics::digraphs::object::set_property_bag ( std::unique_ptr< json::object > property_bag)
inlineinherited

◆ to_json_sarif_node()

std::unique_ptr< json::object > diagnostics::digraphs::node::to_json_sarif_node ( ) const

References diagnostics::make_sarif_node().

Referenced by dump().

Field Documentation

◆ m_children

std::vector<std::unique_ptr<node> > diagnostics::digraphs::node::m_children
private

◆ m_id

std::string diagnostics::digraphs::node::m_id
private

Referenced by get_id(), and node().

◆ m_label

std::unique_ptr<std::string> diagnostics::digraphs::node::m_label
private

Referenced by get_label(), set_label(), and set_label().

◆ m_logical_loc

logical_locations::key diagnostics::digraphs::node::m_logical_loc
private

◆ m_physical_loc

location_t diagnostics::digraphs::node::m_physical_loc
private

◆ m_property_bag

std::unique_ptr<json::object> diagnostics::digraphs::object::m_property_bag
privateinherited

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