ArmNN
 22.05
DotAttributeSet Class Reference

#include <DotSerializer.hpp>

Inheritance diagram for DotAttributeSet:
DotBase

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.

References DotBase::GetStream().

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

◆ ~DotAttributeSet()

Definition at line 78 of file DotSerializer.cpp.

References DotBase::GetStream().

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 }
std::ostream & GetStream()

Member Function Documentation

◆ AddAttribute() [1/3]

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

Definition at line 95 of file DotSerializer.cpp.

Referenced by Graph::SerializeToDot().

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

◆ AddAttribute() [2/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 }

◆ AddAttribute() [3/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 }

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