OpenSDN source code
db_graph_edge.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  * Copyright Contributors to the OpenSDN project
4  */
5 
6 #include "db/db_graph_edge.h"
7 
8 #include "db/db_graph.h"
9 
11 }
12 
14  assert(!IsDeleted());
15  edge_id_ = edge;
16 }
17 
19  Vertex s = boost::source(edge_id_, *graph->graph());
20  return graph->vertex_data(s);
21 }
22 
24  Vertex s = boost::source(edge_id_, *graph->graph());
25  return graph->vertex_data(s);
26 }
27 
29  Vertex t = boost::target(edge_id_, *graph->graph());
30  return graph->vertex_data(t);
31 }
32 
34  Vertex t = boost::target(edge_id_, *graph->graph());
35  return graph->vertex_data(t);
36 }
37 
bool IsDeleted() const
Definition: db_entry.h:49
void SetEdge(Edge edge)
DBGraphVertex * source(DBGraph *graph)
DBGraphBase::vertex_descriptor Vertex
Definition: db_graph_edge.h:19
DBGraphBase::edge_descriptor Edge
Definition: db_graph_edge.h:20
DBGraphVertex * target(DBGraph *graph)
DBGraphVertex * vertex_data(DBGraphBase::vertex_descriptor vertex) const
Definition: db_graph.h:94
const graph_t * graph() const
Definition: db_graph.h:92