~reducedmodelling/fluidity/ROM_Non-intrusive-ann

« back to all changes in this revision

Viewing changes to include/spatialindex/capi/sidx_config.h

  • Committer: fangf at ac
  • Date: 2012-11-06 12:21:31 UTC
  • mto: This revision was merged to the branch mainline in revision 3989.
  • Revision ID: fangf@imperial.ac.uk-20121106122131-u2zvt7fxc1r3zeou
updated

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************************************
 
2
 * $Id: sidx_config.h 1359 2009-07-31 04:44:50Z hobu $
 
3
 *
 
4
 * Project:  libsidx - A C API wrapper around libspatialindex
 
5
 * Purpose:  C API configuration
 
6
 * Author:   Howard Butler, hobu.inc@gmail.com
 
7
 *
 
8
 ******************************************************************************
 
9
 * Copyright (c) 2009, Howard Butler
 
10
 *
 
11
 * All rights reserved.
 
12
 * 
 
13
 * This library is free software; you can redistribute it and/or modify it under
 
14
 * the terms of the GNU Lesser General Public License as published by the Free
 
15
 * Software Foundation; either version 2.1 of the License, or (at your option)
 
16
 * any later version.
 
17
 
 
18
 * This library is distributed in the hope that it will be useful, but WITHOUT
 
19
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
20
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
 
21
 * details.
 
22
 * 
 
23
 * You should have received a copy of the GNU Lesser General Public License 
 
24
 * along with this library; if not, write to the Free Software Foundation, Inc.,
 
25
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
26
 ****************************************************************************/
 
27
 
 
28
#ifndef SIDX_CONFIG_H_INCLUDED
 
29
#define SIDX_CONFIG_H_INCLUDED
 
30
 
 
31
 
 
32
#ifdef _MSC_VER
 
33
   typedef __int8 int8_t;
 
34
   typedef __int16 int16_t;
 
35
   typedef __int32 int32_t;
 
36
   typedef __int64 int64_t;
 
37
   typedef unsigned __int8 uint8_t;
 
38
   typedef unsigned __int16 uint16_t;
 
39
   typedef unsigned __int32 uint32_t;
 
40
   typedef unsigned __int64 uint64_t;
 
41
 
 
42
   #include <windows.h>
 
43
   #define STRDUP _strdup
 
44
   #include "SpatialIndex.h"
 
45
   #include <windows.h>
 
46
 
 
47
#else
 
48
 
 
49
   #include <stdint.h>
 
50
   #define SIDX_THREAD  __thread
 
51
   #include <SpatialIndex.h>
 
52
   #define STRDUP strdup
 
53
#endif
 
54
 
 
55
#include <sys/stat.h>
 
56
 
 
57
 
 
58
 
 
59
class Item;
 
60
class Index;
 
61
 
 
62
typedef enum
 
63
{
 
64
   RT_None = 0,
 
65
   RT_Debug = 1,
 
66
   RT_Warning = 2,
 
67
   RT_Failure = 3,
 
68
   RT_Fatal = 4
 
69
} RTError;
 
70
 
 
71
typedef enum
 
72
{
 
73
   RT_RTree = 0,
 
74
   RT_MVRTree = 1,
 
75
   RT_TPRTree = 2,
 
76
   RT_InvalidIndexType = -99
 
77
} RTIndexType;
 
78
 
 
79
typedef enum
 
80
{
 
81
   RT_Memory = 0,
 
82
   RT_Disk = 1,
 
83
   RT_InvalidStorageType = -99
 
84
} RTStorageType;
 
85
 
 
86
typedef enum
 
87
{
 
88
   RT_Linear = 0,
 
89
   RT_Quadratic = 1,
 
90
   RT_Star = 2,
 
91
   RT_InvalidIndexVariant = -99
 
92
} RTIndexVariant;
 
93
 
 
94
 
 
95
#ifdef __cplusplus
 
96
#  define IDX_C_START           extern "C" {
 
97
#  define IDX_C_END             }
 
98
#else
 
99
#  define IDX_C_START
 
100
#  define IDX_C_END
 
101
#endif
 
102
 
 
103
typedef Index *IndexH;
 
104
typedef SpatialIndex::IData *IndexItemH;
 
105
typedef Tools::PropertySet *IndexPropertyH;
 
106
 
 
107
#ifndef SIDX_C_DLL
 
108
#if defined(_MSC_VER)
 
109
#  define SIDX_C_DLL     __declspec(dllexport)
 
110
#else
 
111
#  if defined(USE_GCC_VISIBILITY_FLAG)
 
112
#    define SIDX_C_DLL     __attribute__ ((visibility("default")))
 
113
#  else
 
114
#    define SIDX_C_DLL
 
115
#  endif
 
116
#endif
 
117
#endif
 
118
 
 
119
 
 
120
#endif