ArmNN
 20.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 71 of file DotSerializer.cpp.

References DotBase::GetStream().

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

◆ ~DotAttributeSet()

Definition at line 77 of file DotSerializer.cpp.

References DotBase::GetStream().

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

Member Function Documentation

◆ AddAttribute() [1/3]

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

Definition at line 94 of file DotSerializer.cpp.

Referenced by Graph::SerializeToDot().

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

◆ AddAttribute() [2/3]

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

Definition at line 102 of file DotSerializer.cpp.

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

◆ AddAttribute() [3/3]

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

Definition at line 110 of file DotSerializer.cpp.

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

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