PGROUTING  2.6-dev
point_on_edge_t.h
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 File: point_on_edge_t.h
3 
4 Copyright (c) 2017 Celia Virginia Vergara Castillo
5 Mail: vicky_vergara@hotmail.com
6 
7 ------
8 
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 
23 ********************************************************************PGR-GNU*/
26 #ifndef INCLUDE_C_TYPES_POINT_ON_EDGE_T_H_
27 #define INCLUDE_C_TYPES_POINT_ON_EDGE_T_H_
28 #pragma once
29 
30 #ifdef __cplusplus
31 
32 #include <cstddef>
33 
34 #else // __cplusplus
35 
36 // for bool
37 #ifdef __GNUC__
38 #pragma GCC diagnostic ignored "-pedantic"
39 #endif
40 
41 #include <postgres.h>
42 
43 #ifdef __GNUC__
44 #pragma GCC diagnostic pop
45 #endif
46 
47 // For NULL & size_t
48 #include <stdlib.h>
49 
50 
51 #endif // __cplusplus
52 
53 // For int64_t etc
54 #include <stdint.h>
55 
56 typedef struct {
57  int64_t pid;
58  int64_t edge_id;
59  char side; // 'r', 'l', 'b' (default is both)
60  double fraction;
61  int64_t vertex_id; // number is negative and is used for processing
63 
64 #endif // INCLUDE_C_TYPES_POINT_ON_EDGE_T_H_