1 /***************************************
2 $Header: /home/amb/routino/src/RCS/relationsx.h,v 1.2 2010/09/25 18:47:32 amb Exp $
4 A header file for the extended Relations structure.
6 Part of the Routino routing software.
7 ******************/ /******************
8 This file Copyright 2010 Andrew M. Bishop
10 This program is free software: you can redistribute it and/or modify
11 it under the terms of the GNU Affero General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Affero General Public License for more details.
20 You should have received a copy of the GNU Affero General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 ***************************************/
26 #define RELATIONSX_H /*+ To stop multiple inclusions. +*/
38 /*+ An extended structure containing a single route relation. +*/
41 relation_t id; /*+ The relation identifier. +*/
43 allow_t routes; /*+ The types of route that this relation belongs to. +*/
47 /*+ A structure containing a set of relations. +*/
52 char *rfilename; /*+ The name of the temporary file (for the RouteRelX). +*/
53 int rfd; /*+ The file descriptor of the temporary file (for the RouteRelX). +*/
55 index_t rxnumber; /*+ The number of unsorted extended route relations. +*/
62 RelationsX *NewRelationList(int append);
63 void FreeRelationList(RelationsX *relationsx,int keep);
65 void AppendRouteRelation(RelationsX* relationsx,relation_t id,allow_t routes,
66 way_t *ways,int nways,
67 relation_t *relations,int nrelations);
69 void SortRelationList(RelationsX *relationsx);
71 void ProcessRouteRelations(RelationsX *relationsx,WaysX *waysx);
74 #endif /* RELATIONSX_H */