Jlm
Public Member Functions | Private Member Functions | Private Attributes | List of all members
jlm::util::graph::InputPort Class Referencefinal

#include <GraphWriter.hpp>

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

Public Member Functions

 ~InputPort () override=default
 
const char * GetIdPrefix () const override
 
NodeGetNode () override
 
bool CanBeEdgeTail () const override
 
void SetFillColor (std::string color) override
 
void OutputDotPortId (std::ostream &out) const override
 
void outputJson (std::ostream &out, size_t indent) const
 
- Public Member Functions inherited from jlm::util::graph::Port
 ~Port () override=default
 
GraphGetGraph () override
 
virtual bool CanBeEdgeHead () 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
 
void PrintFullId (std::ostream &out) const
 
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
 
void outputJsonObjectOpening (std::ostream &out, size_t indent, bool &firstField) const
 

Private Member Functions

 InputPort (InOutNode &node)
 

Private Attributes

friend InOutNode
 
InOutNodeNode_
 

Additional Inherited Members

- Protected Member Functions inherited from jlm::util::graph::Port
 Port ()
 

Detailed Description

The input port of an InOutNode

Definition at line 488 of file GraphWriter.hpp.

Constructor & Destructor Documentation

◆ InputPort()

jlm::util::graph::InputPort::InputPort ( InOutNode node)
explicitprivate

Definition at line 753 of file GraphWriter.cpp.

◆ ~InputPort()

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

Member Function Documentation

◆ CanBeEdgeTail()

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

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

Definition at line 770 of file GraphWriter.cpp.

◆ GetIdPrefix()

const char * jlm::util::graph::InputPort::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"

Implements jlm::util::graph::GraphElement.

Definition at line 758 of file GraphWriter.cpp.

◆ GetNode()

Node & jlm::util::graph::InputPort::GetNode ( )
overridevirtual

Implements jlm::util::graph::Port.

Definition at line 764 of file GraphWriter.cpp.

◆ OutputDotPortId()

void jlm::util::graph::InputPort::OutputDotPortId ( std::ostream &  out) const
overridevirtual

Outputs the fully qualified port name, such as node8:i6:n Used by the Dot and Json outputs when defining edges.

Implements jlm::util::graph::Port.

Definition at line 783 of file GraphWriter.cpp.

◆ outputJson()

void jlm::util::graph::InputPort::outputJson ( std::ostream &  out,
size_t  indent 
) const

Definition at line 789 of file GraphWriter.cpp.

◆ SetFillColor()

void jlm::util::graph::InputPort::SetFillColor ( std::string  color)
overridevirtual

Helper function for setting the background color of the Port using the correct dot attributes.

Parameters
coloran X11 color name or an RGB value in hex, prefixed by '#'
See also
jlm::util::Colors namespace for a list of common colors.

Implements jlm::util::graph::Port.

Definition at line 776 of file GraphWriter.cpp.

Member Data Documentation

◆ InOutNode

friend jlm::util::graph::InputPort::InOutNode
private

Definition at line 490 of file GraphWriter.hpp.

◆ Node_

InOutNode& jlm::util::graph::InputPort::Node_
private

Definition at line 516 of file GraphWriter.hpp.


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