PGROUTING  2.6-dev
pgrouting::XY_vertex Class Reference

#include "xy_vertex.h"

Public Member Functions

 XY_vertex ()=default
 
 XY_vertex (const XY_vertex &)=default
 
 XY_vertex (const int64_t _id, double _x, double _y)
 
 XY_vertex (const Pgr_edge_xy_t &other, bool is_source)
 
void cp_members (const XY_vertex &other)
 
bool operator== (const XY_vertex &rhs) const
 
double x () const
 
double y () const
 

Public Attributes

int64_t id
 
Point point
 

Friends

std::ostream & operator<< (std::ostream &log, const XY_vertex &v)
 

Detailed Description

Definition at line 51 of file xy_vertex.h.

Constructor & Destructor Documentation

pgrouting::XY_vertex::XY_vertex ( )
default

Referenced by pgrouting::extract_vertices().

Here is the caller graph for this function:

pgrouting::XY_vertex::XY_vertex ( const XY_vertex )
default
pgrouting::XY_vertex::XY_vertex ( const int64_t  _id,
double  _x,
double  _y 
)
inline

Definition at line 55 of file xy_vertex.h.

55  :
56  id(_id), point(_x, _y) {
57  }
pgrouting::XY_vertex::XY_vertex ( const Pgr_edge_xy_t other,
bool  is_source 
)
inline

Definition at line 59 of file xy_vertex.h.

59  :
60  id(is_source? other.source : other.target),
61  point(is_source? Point(other.x1, other.y1) : Point(other.x2, other.y2))
62  {}
int64_t target
Definition: pgr_edge_xy_t.h:60
K::Point_2 Point
int64_t source
Definition: pgr_edge_xy_t.h:59
Simple_cartasian::Point_2 Point
Definition: xy_vertex.h:48

Member Function Documentation

void pgrouting::XY_vertex::cp_members ( const XY_vertex other)
inline

Definition at line 68 of file xy_vertex.h.

References id, operator<<, operator==(), and point.

68  {
69  this->id = other.id;
70  this->point = other.point;
71  }

Here is the call graph for this function:

bool pgrouting::XY_vertex::operator== ( const XY_vertex rhs) const

Definition at line 42 of file xy_vertex.cpp.

References id, and point.

Referenced by cp_members().

42  {
43  if (&rhs == this) return true;
44  return this->id == rhs.id && point == rhs.point;
45 }

Here is the caller graph for this function:

double pgrouting::XY_vertex::x ( ) const
inline

Definition at line 65 of file xy_vertex.h.

References point.

65 {return point.x();}
double pgrouting::XY_vertex::y ( ) const
inline

Definition at line 66 of file xy_vertex.h.

References point.

66 {return point.y();}

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  log,
const XY_vertex v 
)
friend

Definition at line 36 of file xy_vertex.cpp.

Referenced by cp_members().

36  {
37  log << v.id << "(" << v.point.x() << "," << v.point.y() << ")";
38  return log;
39 }

Member Data Documentation

int64_t pgrouting::XY_vertex::id
Point pgrouting::XY_vertex::point

Definition at line 78 of file xy_vertex.h.

Referenced by cp_members(), pgrouting::operator<<(), operator==(), x(), and y().


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