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