ArmNN
 24.02
DotAttributeSet Class Reference

#include <DotSerializer.hpp>

Inheritance diagram for DotAttributeSet:
[legend]
Collaboration diagram for DotAttributeSet:
[legend]

Public Member Functions

 DotAttributeSet (std::ostream &stream)
 
 ~DotAttributeSet ()
 
DotAttributeSetAddAttribute (const std::string &name, const std::stringstream &value)
 
DotAttributeSetAddAttribute (const std::string &name, int value)
 
DotAttributeSetAddAttribute (const std::string &name, const std::string &value)
 
- Public Member Functions inherited from DotBase
 DotBase (std::ostream &stream)
 
std::ostream & GetStream ()
 

Detailed Description

Definition at line 64 of file DotSerializer.hpp.

Constructor & Destructor Documentation

◆ DotAttributeSet()

DotAttributeSet ( std::ostream &  stream)
explicit

Definition at line 72 of file DotSerializer.cpp.

73  : DotBase(stream)
74 {
75  GetStream() << "[";
76 }

References DotBase::GetStream().

◆ ~DotAttributeSet()

Definition at line 78 of file DotSerializer.cpp.

79 {
80  bool doSpace=false;
81  for (auto&& attrib : m_Attributes)
82  {
83  if (doSpace)
84  {
85  GetStream() << " ";
86  }
87 
88  GetStream() << attrib;
89  doSpace=true;
90  }
91 
92  GetStream() << "]";
93 }

References DotBase::GetStream().

Member Function Documentation

◆ AddAttribute() [1/3]

DotAttributeSet & AddAttribute ( const std::string &  name,
const std::string &  value 
)

Definition at line 111 of file DotSerializer.cpp.

112 {
113  std::stringstream ss;
114  ss << name <<"=\"" << value << "\"";
115  m_Attributes.push_back(ss.str());
116  return *this;
117 }

◆ AddAttribute() [2/3]

DotAttributeSet & AddAttribute ( const std::string &  name,
const std::stringstream &  value 
)

Definition at line 95 of file DotSerializer.cpp.

96 {
97  std::stringstream ss;
98  ss << name <<"=" << value.str();
99  m_Attributes.push_back(ss.str());
100  return *this;
101 }

Referenced by Graph::SerializeToDot().

◆ AddAttribute() [3/3]

DotAttributeSet & AddAttribute ( const std::string &  name,
int  value 
)

Definition at line 103 of file DotSerializer.cpp.

104 {
105  std::stringstream ss;
106  ss << name <<"=" << value;
107  m_Attributes.push_back(ss.str());
108  return *this;
109 }

The documentation for this class was generated from the following files:
armnn::DotBase::GetStream
std::ostream & GetStream()
Definition: DotSerializer.hpp:23
armnn::DotBase::DotBase
DotBase(std::ostream &stream)
Definition: DotSerializer.hpp:20