All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 // TerraLib
30 #include "../Config.h"
31 
32 #define TE_GRAPH_MODULE_NAME "te.graph"
33 
34 /** @name Graph Module Main Defines
35  * Defines for graph module
36  */
37 //@{
38 
39 /*!
40  \def TE_GRAPH_MODULE_IDENTIFIER
41 
42  \brief This definition is the graph module identifier.
43  */
44 #define TE_GRAPH_MODULE_IDENTIFIER "GRAPH"
45 
46 /*!
47  \def TE_DEFAULT_GRAPH_TYPE
48 
49  \brief This definition is used to set the default graph type.
50  */
51 #define TE_DEFAULT_GRAPH_TYPE TE_GRAPH_FACTORY_GRAPH_TYPE_GRAPH
52 
53 /*!
54  \def TE_DEFAULT_CACHE_POLICY_TYPE
55 
56  \brief This definition is used to set the default cache policy.
57  */
58 #define TE_DEFAULT_CACHE_POLICY_TYPE TE_GRAPH_FACTORY_CACHEPOLICY_TYPE_FIFO
59 
60 /*!
61  \def TE_DEFAULT_GRAPH_LOADER_STRATEGY_TYPE
62 
63  \brief This definition is used to set the default graph loader strategy.
64  */
65 #define TE_DEFAULT_GRAPH_LOADER_STRATEGY_TYPE TE_GRAPH_FACTORY_LOADERSTRATEGY_TYPE_BOX
66 
67 /*!
68  \def TE_GRAPH_DEFAULT_MAX_CACHE_SIZE
69 
70  \brief This definition is used to set the max graph cache size.
71  */
72 #define TE_GRAPH_DEFAULT_MAX_CACHE_SIZE 100000
73 
74 /*!
75  \def TE_GRAPH_DEFAULT_MAX_VEC_CACHE_SIZE
76 
77  \brief This definition is used to set the max graph cache vector size.
78  */
79 #define TE_GRAPH_DEFAULT_MAX_VEC_CACHE_SIZE 5
80 
81 /*!
82  \def TE_GRAPH_DEFAULT_BOX_STRATEGY_LOADER_SIZE
83 
84  \brief This definition is used to set the default box strategy loader box size.
85  */
86 #define TE_GRAPH_DEFAULT_BOX_STRATEGY_LOADER_SIZE 20
87 
88 /*!
89  \def TE_GRAPH_STORAGE_MODE_BY_VERTEX
90 
91  \brief This definition is used to set the vertex storage mode.
92  */
93 #define TE_GRAPH_STORAGE_MODE_BY_VERTEX "GRAPH_STORAGE_MODE_BY_VERTEX"
94 
95 /*!
96  \def TE_GRAPH_STORAGE_MODE_BY_EDGE
97 
98  \brief This definition is used to set the edge storage mode.
99  */
100 #define TE_GRAPH_STORAGE_MODE_BY_EDGE "GRAPH_STORAGE_MODE_BY_EDGE"
101 //@}
102 
103 /** @name Graph Module Factories Names
104  * Defines the all graph module factories names
105  */
106 //@{
107 
108 #define TE_GRAPH_FACTORY_GRAPH_TYPE_GRAPH "GRAPH"
109 #define TE_GRAPH_FACTORY_GRAPH_TYPE_BIDIRECTIONALGRAPH "BIDIRECTIONALGRAPH"
110 #define TE_GRAPH_FACTORY_GRAPH_TYPE_DIRECTEDGRAPH "DIRECTEDGRAPH"
111 #define TE_GRAPH_FACTORY_GRAPH_TYPE_UNDIRECTEDGRAPH "UNDIRECTEDGRAPH"
112 
113 #define TE_GRAPH_FACTORY_CACHEPOLICY_TYPE_FIFO "FIFO"
114 #define TE_GRAPH_FACTORY_CACHEPOLICY_TYPE_LFU "LFU"
115 
116 #define TE_GRAPH_FACTORY_LOADERSTRATEGY_TYPE_BOX "BOX_LOADER_STRATEGY"
117 #define TE_GRAPH_FACTORY_LOADERSTRATEGY_TYPE_SEQUENCE "SEQUENCE_LOADER_STRATEGY"
118 //@}
119 
120 
121 
122 /** @name Database Metadata Module
123  * Defines for graph database tables
124  */
125 //@{
126 #define TE_GRAPH_GRAPH_TABLE_NAME "te_graph"
127 #define TE_GRAPH_GRAPH_TABLE_ATTR_ID "id"
128 #define TE_GRAPH_GRAPH_TABLE_ATTR_NAME "name"
129 #define TE_GRAPH_GRAPH_TABLE_ATTR_TYPE "type"
130 #define TE_GRAPH_GRAPH_TABLE_ATTR_TABLE_NAME "table_name"
131 #define TE_GRAPH_GRAPH_TABLE_ATTR_DESCRIPTION "description"
132 
133 #define TE_GRAPH_GRAPH_ATTR_TABLE_NAME "te_graph_attr"
134 #define TE_GRAPH_GRAPH_ATTR_TABLE_ATTR_ID "id"
135 #define TE_GRAPH_GRAPH_ATTR_TABLE_ATTR_GRAPH_ID "graph_id"
136 #define TE_GRAPH_GRAPH_ATTR_TABLE_ATTR_TABLE "table_name"
137 #define TE_GRAPH_GRAPH_ATTR_TABLE_ATTR_COLUMN "column_name"
138 #define TE_GRAPH_GRAPH_ATTR_TABLE_ATTR_LINK "link_column"
139 #define TE_GRAPH_GRAPH_ATTR_TABLE_ATTR_TYPE "type"
140 
141 #define TE_GRAPH_GRAPH_TABLE_ATTR_EDGE_SUFIX "_attr_model_edge"
142 #define TE_GRAPH_GRAPH_TABLE_EDGE_SUFIX "_model_edge"
143 #define TE_GRAPH_GRAPH_EDGE_MODEL_ID "edge_id"
144 #define TE_GRAPH_GRAPH_EDGE_MODEL_VFROM "vertex_from"
145 #define TE_GRAPH_GRAPH_EDGE_MODEL_VTO "vertex_to"
146 
147 #define TE_GRAPH_GRAPH_TABLE_ATTR_VERTEX_SUFIX "_attr_model_vertex"
148 #define TE_GRAPH_GRAPH_TABLE_VERTEX_SUFIX "_model_vertex"
149 #define TE_GRAPH_GRAPH_VERTEX_MODEL_ID "vertex_id"
150 //@}
151 
152 /** @name DLL/LIB Module
153  * Flags for building TerraLib as a DLL or as a Static Library
154  */
155 //@{
156 
157 /*!
158  \def TEGRAPHEXPORT
159 
160  \brief You can use this macro in order to export/import classes and functions from this module.
161 
162  \note If you want to compile TerraLib as DLL in Windows, remember to insert TEGRAPHDLL into the project's list of defines.
163 
164  \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.
165  */
166 #ifdef WIN32
167 
168  #ifdef _MSC_VER
169  #pragma warning( disable : 4251 )
170  #pragma warning( disable : 4275 )
171  #endif
172 
173  #ifdef TEGRAPHSTATIC
174  #define TEGRAPHEXPORT // Don't need to export/import... it is a static library
175  #elif TEGRAPHDLL
176  #define TEGRAPHEXPORT __declspec(dllexport) // export DLL information
177  #else
178  #define TEGRAPHEXPORT __declspec(dllimport) // import DLL information
179  #endif
180 #else
181  #define TEGRAPHEXPORT
182 #endif
183 
184 //@}
185 
186 #endif // __TERRALIB_GRAPH_INTERNAL_CONFIG_H
187