Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
hit_mbtile.h
Go to the documentation of this file.
1 
11 /*
12  * <license>
13  *
14  * Hitmap v1.2
15  *
16  * This software is provided to enhance knowledge and encourage progress in the scientific
17  * community. It should be used only for research and educational purposes. Any reproduction
18  * or use for commercial purpose, public redistribution, in source or binary forms, with or
19  * without modifications, is NOT ALLOWED without the previous authorization of the copyright
20  * holder. The origin of this software must not be misrepresented; you must not claim that you
21  * wrote the original software. If you use this software for any purpose (e.g. publication),
22  * a reference to the software package and the authors must be included.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY
25  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
27  * THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  *
34  * Copyright (c) 2007-2015, Trasgo Group, Universidad de Valladolid.
35  * All rights reserved.
36  *
37  * More information on http://trasgo.infor.uva.es/
38  *
39  * </license>
40 */
41 
42 #ifndef _HitMBTile_
43 #define _HitMBTile_
44 
45 
46 #include "hit_tile.h"
47 
48 
49 /* 1. DECLARATION AND INITIALIZATION OF THE VARIABLES */
58 #define hit_mbTileDomainShape(newVarP, baseType, shape) \
59  hit_mbTileDomainShapeInternal(newVarP, sizeof(baseType), shape)
60 
69 void hit_mbTileDomainShapeInternal(void * newVarP, size_t baseExtent, HitShape shape);
70 
71 
77 #define hit_mbTileAlloc(var) hit_mbTileAllocInternal(var, #var, __FILE__, __LINE__)
78 
79 
88 void hit_mbTileAllocInternal(void *newVarP, const char *name, const char *file, int numLine);
89 
101 #define hit_mbTileDomainShapeAlloc(var, baseType, shape) \
102  hit_mbTileDomainShapeInternal(var, sizeof(baseType), shape); \
103  hit_mbTileAllocInternal(var, #var, __FILE__, __LINE__);
104 
105 
106 
107 
108 /* 2. INDEX ACCESS FUNCTIONS */
117 int hit_mbTileElemAtIndex(void * varP, int local1, int local2);
118 
127 int hit_mbTileGraphElemAtIndex(void * varP, int pos1, int pos2);
128 
129 
130 
131 /* 3. ELEMENT ACCESS FUNCTIONS */
140 #define hit_mbTileElemAt(var, pos1, pos2) ((var).data[hit_bTileElemAtIndex(&(var),(pos1),(pos2))])
141 
150 #define hit_mbTileGraphElemAt(var, pos1, pos2) ((var).data[hit_mbTileGraphElemAtIndex(&(var),(pos1),(pos2))])
151 
152 
159 #define hit_mbTileElemIteratorAt(var, iterX, iterY) \
160  ((var).data[(iterX)*(hit_bShapeCard(hit_tileShape(var),1))+(iterY)])
161 
162 
163 
164 // 4. OTHER FUNCTIONS
169 void hit_mbTileClear(void * tileP);
170 
171 
172 
173 /* END OF HEADER FILE _HitMBTile_ */
174 #endif
int hit_mbTileElemAtIndex(void *varP, int local1, int local2)
void hit_mbTileDomainShapeInternal(void *newVarP, size_t baseExtent, HitShape shape)
Definition: hit_mbtile.c:38
void hit_mbTileAllocInternal(void *newVarP, const char *name, const char *file, int numLine)
Definition: hit_mbtile.c:61
HitShape shape
void hit_mbTileClear(void *tileP)
Definition: hit_mbtile.c:117
int hit_mbTileGraphElemAtIndex(void *varP, int pos1, int pos2)