OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
db_graph_edge.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #include "db/db_graph_edge.h"
6 
7 #include "db/db_graph.h"
8 
10 }
11 
13  assert(!IsDeleted());
14  edge_id_ = edge;
15 }
16 
18  Vertex s = boost::source(edge_id_, *graph->graph());
19  return graph->vertex_data(s);
20 }
21 
23  Vertex s = boost::source(edge_id_, *graph->graph());
24  return graph->vertex_data(s);
25 }
26 
28  Vertex t = boost::target(edge_id_, *graph->graph());
29  return graph->vertex_data(t);
30 }
31 
33  Vertex t = boost::target(edge_id_, *graph->graph());
34  return graph->vertex_data(t);
35 }
36 
DBGraphBase::vertex_descriptor Vertex
Definition: db_graph_edge.h:18
const graph_t * graph() const
Definition: db_graph.h:91
bool IsDeleted() const
Definition: db_entry.h:49
DBGraphVertex * vertex_data(DBGraphBase::vertex_descriptor vertex) const
Definition: db_graph.h:93
void SetEdge(Edge edge)
DBGraphVertex * target(DBGraph *graph)
DBGraphVertex * source(DBGraph *graph)
DBGraphBase::edge_descriptor Edge
Definition: db_graph_edge.h:19