Apollo 10.0
自动驾驶开放平台
apollo::cyber::service_discovery::Edge类 参考

#include <graph.h>

apollo::cyber::service_discovery::Edge 的协作图:

Public 成员函数

 Edge ()
 
 Edge (const Edge &other)
 
 Edge (const Vertice &src, const Vertice &dst, const std::string &val)
 
virtual ~Edge ()
 
Edgeoperator= (const Edge &rhs)
 
bool operator== (const Edge &rhs) const
 
bool IsValid () const
 
std::string GetKey () const
 
const Verticesrc () const
 
void set_src (const Vertice &v)
 
const Verticedst () const
 
void set_dst (const Vertice &v)
 
const std::string & value () const
 
void set_value (const std::string &val)
 

详细描述

在文件 graph.h65 行定义.

构造及析构函数说明

◆ Edge() [1/3]

apollo::cyber::service_discovery::Edge::Edge ( )

在文件 graph.cc54 行定义.

54{}

◆ Edge() [2/3]

apollo::cyber::service_discovery::Edge::Edge ( const Edge other)

在文件 graph.cc56 行定义.

56 {
57 this->src_ = other.src_;
58 this->dst_ = other.dst_;
59 this->value_ = other.value_;
60}

◆ Edge() [3/3]

apollo::cyber::service_discovery::Edge::Edge ( const Vertice src,
const Vertice dst,
const std::string &  val 
)

在文件 graph.cc62 行定义.

63 : src_(src), dst_(dst), value_(val) {}
const Vertice & src() const
Definition graph.h:78
const Vertice & dst() const
Definition graph.h:81

◆ ~Edge()

apollo::cyber::service_discovery::Edge::~Edge ( )
virtual

在文件 graph.cc65 行定义.

65{}

成员函数说明

◆ dst()

const Vertice & apollo::cyber::service_discovery::Edge::dst ( ) const
inline

在文件 graph.h81 行定义.

81{ return dst_; }

◆ GetKey()

std::string apollo::cyber::service_discovery::Edge::GetKey ( ) const

在文件 graph.cc91 行定义.

91{ return value_ + "_" + dst_.GetKey(); }
const std::string & GetKey() const
Definition graph.cc:52

◆ IsValid()

bool apollo::cyber::service_discovery::Edge::IsValid ( ) const

在文件 graph.cc81 行定义.

81 {
82 if (value_.empty()) {
83 return false;
84 }
85 if (src_.IsDummy() && dst_.IsDummy()) {
86 return false;
87 }
88 return true;
89}

◆ operator=()

Edge & apollo::cyber::service_discovery::Edge::operator= ( const Edge rhs)

在文件 graph.cc67 行定义.

67 {
68 if (this != &rhs) {
69 this->src_ = rhs.src_;
70 this->dst_ = rhs.dst_;
71 this->value_ = rhs.value_;
72 }
73 return *this;
74}

◆ operator==()

bool apollo::cyber::service_discovery::Edge::operator== ( const Edge rhs) const

在文件 graph.cc76 行定义.

76 {
77 return this->src_ == rhs.src_ && this->dst_ == rhs.dst_ &&
78 this->value_ == rhs.value_;
79}

◆ set_dst()

void apollo::cyber::service_discovery::Edge::set_dst ( const Vertice v)
inline

在文件 graph.h82 行定义.

82{ dst_ = v; }

◆ set_src()

void apollo::cyber::service_discovery::Edge::set_src ( const Vertice v)
inline

在文件 graph.h79 行定义.

79{ src_ = v; }

◆ set_value()

void apollo::cyber::service_discovery::Edge::set_value ( const std::string &  val)
inline

在文件 graph.h85 行定义.

85{ value_ = val; }

◆ src()

const Vertice & apollo::cyber::service_discovery::Edge::src ( ) const
inline

在文件 graph.h78 行定义.

78{ return src_; }

◆ value()

const std::string & apollo::cyber::service_discovery::Edge::value ( ) const
inline

在文件 graph.h84 行定义.

84{ return value_; }

该类的文档由以下文件生成: