Loading...
Searching...
No Matches
Config.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3 This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5 TerraLib is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 TerraLib is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TerraLib. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@terralib.org>.
18 */
19
20/*!
21 \file Config.h
22
23 \brief Configuration flags for the Graph module of TerraLib.
24 */
25
26#ifndef __TERRALIB_GRAPH_INTERNAL_CONFIG_H
27#define __TERRALIB_GRAPH_INTERNAL_CONFIG_H
28
29#define TE_GRAPH_MODULE_NAME "te.graph"
30
31/** @name Graph Module Main Defines
32 * Defines for graph module
33 */
34//@{
35
36/*!
37 \def TE_GRAPH_MODULE_IDENTIFIER
38
39 \brief This definition is the graph module identifier.
40 */
41#define TE_GRAPH_MODULE_IDENTIFIER "GRAPH"
42
43/*!
44 \def TE_DEFAULT_GRAPH_TYPE
45
46 \brief This definition is used to set the default graph type.
47 */
48#define TE_DEFAULT_GRAPH_TYPE TE_GRAPH_FACTORY_GRAPH_TYPE_GRAPH
49
50/*!
51 \def TE_DEFAULT_CACHE_POLICY_TYPE
52
53 \brief This definition is used to set the default cache policy.
54 */
55#define TE_DEFAULT_CACHE_POLICY_TYPE TE_GRAPH_FACTORY_CACHEPOLICY_TYPE_FIFO
56
57/*!
58 \def TE_DEFAULT_GRAPH_LOADER_STRATEGY_TYPE
59
60 \brief This definition is used to set the default graph loader strategy.
61 */
62#define TE_DEFAULT_GRAPH_LOADER_STRATEGY_TYPE TE_GRAPH_FACTORY_LOADERSTRATEGY_TYPE_BOX
63
64/*!
65 \def TE_GRAPH_DEFAULT_MAX_CACHE_SIZE
66
67 \brief This definition is used to set the max graph cache size.
68 */
69#define TE_GRAPH_DEFAULT_MAX_CACHE_SIZE 100000
70
71/*!
72 \def TE_GRAPH_DEFAULT_MAX_VEC_CACHE_SIZE
73
74 \brief This definition is used to set the max graph cache vector size.
75 */
76#define TE_GRAPH_DEFAULT_MAX_VEC_CACHE_SIZE 5
77
78/*!
79 \def TE_GRAPH_DEFAULT_BOX_STRATEGY_LOADER_SIZE
80
81 \brief This definition is used to set the default box strategy loader box size.
82 */
83#define TE_GRAPH_DEFAULT_BOX_STRATEGY_LOADER_SIZE 20
84
85/*!
86 \def TE_GRAPH_STORAGE_MODE_BY_VERTEX
87
88 \brief This definition is used to set the vertex storage mode.
89 */
90#define TE_GRAPH_STORAGE_MODE_BY_VERTEX "GRAPH_STORAGE_MODE_BY_VERTEX"
91
92/*!
93 \def TE_GRAPH_STORAGE_MODE_BY_EDGE
94
95 \brief This definition is used to set the edge storage mode.
96 */
97#define TE_GRAPH_STORAGE_MODE_BY_EDGE "GRAPH_STORAGE_MODE_BY_EDGE"
98//@}
99
100/** @name Graph Module Factories Names
101 * Defines the all graph module factories names
102 */
103//@{
104
105#define TE_GRAPH_FACTORY_GRAPH_TYPE_GRAPH "GRAPH"
106#define TE_GRAPH_FACTORY_GRAPH_TYPE_BIDIRECTIONALGRAPH "BIDIRECTIONALGRAPH"
107#define TE_GRAPH_FACTORY_GRAPH_TYPE_DIRECTEDGRAPH "DIRECTEDGRAPH"
108#define TE_GRAPH_FACTORY_GRAPH_TYPE_UNDIRECTEDGRAPH "UNDIRECTEDGRAPH"
109
110#define TE_GRAPH_FACTORY_CACHEPOLICY_TYPE_FIFO "FIFO"
111#define TE_GRAPH_FACTORY_CACHEPOLICY_TYPE_LFU "LFU"
112
113#define TE_GRAPH_FACTORY_LOADERSTRATEGY_TYPE_BOX "BOX_LOADER_STRATEGY"
114#define TE_GRAPH_FACTORY_LOADERSTRATEGY_TYPE_SEQUENCE "SEQUENCE_LOADER_STRATEGY"
115//@}
116
117
118
119/** @name Database Metadata Module
120 * Defines for graph database tables
121 */
122//@{
123#define TE_GRAPH_GRAPH_TABLE_NAME "te_graph"
124#define TE_GRAPH_GRAPH_TABLE_ATTR_ID "id"
125#define TE_GRAPH_GRAPH_TABLE_ATTR_NAME "name"
126#define TE_GRAPH_GRAPH_TABLE_ATTR_TYPE "type"
127#define TE_GRAPH_GRAPH_TABLE_ATTR_TABLE_NAME "table_name"
128#define TE_GRAPH_GRAPH_TABLE_ATTR_DESCRIPTION "description"
129
130#define TE_GRAPH_GRAPH_ATTR_TABLE_NAME "te_graph_attr"
131#define TE_GRAPH_GRAPH_ATTR_TABLE_ATTR_ID "id"
132#define TE_GRAPH_GRAPH_ATTR_TABLE_ATTR_GRAPH_ID "graph_id"
133#define TE_GRAPH_GRAPH_ATTR_TABLE_ATTR_TABLE "table_name"
134#define TE_GRAPH_GRAPH_ATTR_TABLE_ATTR_COLUMN "column_name"
135#define TE_GRAPH_GRAPH_ATTR_TABLE_ATTR_LINK "link_column"
136#define TE_GRAPH_GRAPH_ATTR_TABLE_ATTR_TYPE "type"
137
138#define TE_GRAPH_GRAPH_TABLE_ATTR_EDGE_SUFIX "_attr_model_edge"
139#define TE_GRAPH_GRAPH_TABLE_EDGE_SUFIX "_model_edge"
140#define TE_GRAPH_GRAPH_EDGE_MODEL_ID "edge_id"
141#define TE_GRAPH_GRAPH_EDGE_MODEL_VFROM "vertex_from"
142#define TE_GRAPH_GRAPH_EDGE_MODEL_VTO "vertex_to"
143
144#define TE_GRAPH_GRAPH_TABLE_ATTR_VERTEX_SUFIX "_attr_model_vertex"
145#define TE_GRAPH_GRAPH_TABLE_VERTEX_SUFIX "_model_vertex"
146#define TE_GRAPH_GRAPH_VERTEX_MODEL_ID "vertex_id"
147//@}
148
149/** @name DLL/LIB Module
150 * Flags for building TerraLib as a DLL or as a Static Library
151 */
152//@{
153
154/*!
155 \def TEGRAPHEXPORT
156
157 \brief You can use this macro in order to export/import classes and functions from this module.
158
159 \note If you want to compile TerraLib as DLL in Windows, remember to insert TEGRAPHDLL into the project's list of defines.
160
161 \note If you want to compile TerraLib as an Static Library under Windows, remember to insert the TEGRAPHSTATIC flag into the project list of defines.
162 */
163#ifdef WIN32
164
165 #ifdef _MSC_VER
166 #pragma warning( disable : 4251 )
167 #pragma warning( disable : 4275 )
168 #endif
169
170 #ifdef TEGRAPHSTATIC
171 #define TEGRAPHEXPORT // Don't need to export/import... it is a static library
172 #elif TEGRAPHDLL
173 #define TEGRAPHEXPORT __declspec(dllexport) // export DLL information
174 #else
175 #define TEGRAPHEXPORT __declspec(dllimport) // import DLL information
176 #endif
177#else
178 #define TEGRAPHEXPORT
179#endif
180
181//@}
182
183#endif // __TERRALIB_GRAPH_INTERNAL_CONFIG_H
184