Jlm
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
jlm::util::graph::ArgumentNode Class Reference

#include <GraphWriter.hpp>

Inheritance diagram for jlm::util::graph::ArgumentNode:
Inheritance graph
[legend]
Collaboration diagram for jlm::util::graph::ArgumentNode:
Collaboration graph
[legend]

Public Member Functions

 ~ArgumentNode () override=default
 
const char * GetIdPrefix () const override
 
bool CanBeEdgeHead () const override
 
void SetOutsideSource (const Port &outsideSource)
 
- Public Member Functions inherited from jlm::util::graph::Node
 ~Node () override=default
 
NodeGetNode () override
 
GraphGetGraph () override
 
virtual void SetShape (std::string shape)
 
void SetFillColor (std::string color) override
 
void OutputDotPortId (std::ostream &out) const override
 
void Output (std::ostream &out, OutputFormat format, size_t indent) const
 
virtual void OutputSubgraphs (std::ostream &out, OutputFormat format, size_t indent) const
 
- Public Member Functions inherited from jlm::util::graph::Port
 ~Port () override=default
 
virtual bool CanBeEdgeTail () const
 
const std::vector< Edge * > & GetConnections () const
 
bool HasOutgoingEdges () const
 
bool HasIncomingEdges () const
 
void OutputIncomingEdgesASCII (std::ostream &out) const
 
- Public Member Functions inherited from jlm::util::graph::GraphElement
virtual ~GraphElement ()=default
 
 GraphElement ()
 
 GraphElement (const GraphElement &other)=delete
 
 GraphElement (GraphElement &&other)=delete
 
GraphElementoperator= (const GraphElement &other)=delete
 
GraphElementoperator= (GraphElement &&other)=delete
 
std::string GetFullId () const
 
const GraphGetGraph () const
 
void SetLabel (std::string label)
 
void AppendToLabel (std::string_view text, std::string_view sep="\n")
 
bool HasLabel () const
 
const std::string & GetLabel () const
 
std::string_view GetLabelOr (std::string_view otherwise) const
 
size_t GetUniqueIdSuffix () const
 
template<typename T >
void SetProgramObject (const T &object)
 
void RemoveProgramObject ()
 
bool HasProgramObject () const noexcept
 
uintptr_t GetProgramObject () const noexcept
 
void SetAttribute (const std::string &attribute, std::string value)
 
void SetAttributeObject (const std::string &attribute, uintptr_t object)
 
template<typename T >
void SetAttributeObject (const std::string &attribute, const T &object)
 
void SetAttributeGraphElement (const std::string &attribute, const GraphElement &element)
 
bool HasAttribute (const std::string &attribute) const
 
std::optional< std::string_view > GetAttributeString (const std::string &attribute) const
 
std::optional< uintptr_t > GetAttributeObject (const std::string &attribute) const
 
const GraphElementGetAttributeGraphElement (const std::string &attribute) const
 
bool RemoveAttribute (const std::string &attribute)
 
virtual void Finalize ()
 
bool IsFinalized () const
 
void OutputAttributes (std::ostream &out, AttributeOutputFormat format) const
 

Protected Member Functions

void OutputASCII (std::ostream &out, size_t indent) const override
 
- Protected Member Functions inherited from jlm::util::graph::Node
 Node (Graph &graph)
 
virtual void OutputDot (std::ostream &out, size_t indent) const
 
- Protected Member Functions inherited from jlm::util::graph::Port
 Port ()
 

Private Member Functions

 ArgumentNode (Graph &graph)
 

Private Attributes

friend Graph
 
const PortOutsideSource_
 

Detailed Description

Node representing a port where values enter the graph. All argument nodes are rendered in order at the top of the graph.

Definition at line 610 of file GraphWriter.hpp.

Constructor & Destructor Documentation

◆ ArgumentNode()

jlm::util::graph::ArgumentNode::ArgumentNode ( Graph graph)
explicitprivate

Definition at line 912 of file GraphWriter.cpp.

◆ ~ArgumentNode()

jlm::util::graph::ArgumentNode::~ArgumentNode ( )
overridedefault

Member Function Documentation

◆ CanBeEdgeHead()

bool jlm::util::graph::ArgumentNode::CanBeEdgeHead ( ) const
overridevirtual
Returns
true if a directed edge may have its head at this port, false otherwise

Reimplemented from jlm::util::graph::Port.

Definition at line 924 of file GraphWriter.cpp.

◆ GetIdPrefix()

const char * jlm::util::graph::ArgumentNode::GetIdPrefix ( ) const
overridevirtual

Gets a short string that will serve as the base for a unique ID. This base should be a valid C-like identifier.

Returns
a string, such as "node", "i", "o", "graph"

Reimplemented from jlm::util::graph::Node.

Definition at line 918 of file GraphWriter.cpp.

◆ OutputASCII()

void jlm::util::graph::ArgumentNode::OutputASCII ( std::ostream &  out,
size_t  indent 
) const
overrideprotectedvirtual

Outputs the node in ASCII format to the ostream out, indented by indent levels. In this format, attributes are ignored, and edges are only included implicitly, by listing the origins of all edges pointing into this node.

Reimplemented from jlm::util::graph::Node.

Definition at line 937 of file GraphWriter.cpp.

◆ SetOutsideSource()

void jlm::util::graph::ArgumentNode::SetOutsideSource ( const Port outsideSource)

Indicate that the argument node represents a value coming in from a port in another graph

Parameters
outsideSourcethe Port in the other graph

Definition at line 930 of file GraphWriter.cpp.

Member Data Documentation

◆ Graph

friend jlm::util::graph::ArgumentNode::Graph
private

Definition at line 612 of file GraphWriter.hpp.

◆ OutsideSource_

const Port* jlm::util::graph::ArgumentNode::OutsideSource_
private

Definition at line 638 of file GraphWriter.hpp.


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