1 #ifndef DYNAMITEgwquickdbHEADERFILE
2 #define DYNAMITEgwquickdbHEADERFILE
3 #ifdef _cplusplus
4 extern "C" {
5 #endif
6 #include "genewisemodeldb.h"
7 
8 
9 /* Object GeneWiseQuickDB
10  *
11  * Descrip: This is a database stream of
12  *        GeneWiseScoreFlat objects, layered
13  *        ontop of a vanilla genewisedb.
14  *
15  *        The GeneWiseScoreFlat objects give
16  *        around a 10% speed up due to them
17  *        being allocated as a single block
18  *        of memory that then gets accessed
19  *
20  *        This object is a very thin layer over
21  *        the genewisedb object, which itself handles
22  *        the actual HMM stuff via threestatedb object.
23  *        So if you want to discover how HMMs are
24  *        actually being streamed into the database,
25  *        look in there.
26  *
27  *
28  */
29 struct Wise2_GeneWiseQuickDB {
30     int dynamite_hard_link;
31 #ifdef PTHREAD
32     pthread_mutex_t dynamite_mutex;
33 #endif
34     GeneWiseDB * gwdb;
35     } ;
36 /* GeneWiseQuickDB defined */
37 #ifndef DYNAMITE_DEFINED_GeneWiseQuickDB
38 typedef struct Wise2_GeneWiseQuickDB Wise2_GeneWiseQuickDB;
39 #define GeneWiseQuickDB Wise2_GeneWiseQuickDB
40 #define DYNAMITE_DEFINED_GeneWiseQuickDB
41 #endif
42 
43 
44 
45 
46     /***************************************************/
47     /* Callable functions                              */
48     /* These are the functions you are expected to use */
49     /***************************************************/
50 
51 
52 
53 /* Function:  init_GeneWiseQuickDB(gdb,return_status)
54  *
55  * Descrip:    inits a genewisequick database.
56  *
57  *
58  * Arg:                  gdb [UNKN ] Undocumented argument [GeneWiseQuickDB *]
59  * Arg:        return_status [UNKN ] Undocumented argument [int *]
60  *
61  * Return [UNKN ]  Undocumented return value [GeneWiseScoreFlat *]
62  *
63  */
64 GeneWiseScoreFlat * Wise2_init_GeneWiseQuickDB(GeneWiseQuickDB * gdb,int * return_status);
65 #define init_GeneWiseQuickDB Wise2_init_GeneWiseQuickDB
66 
67 
68 /* Function:  reload_GeneWiseQuickDB(prev,gdb,return_status)
69  *
70  * Descrip:    Reloads a genewisequick database
71  *
72  *
73  *
74  * Arg:                 prev [UNKN ] Undocumented argument [GeneWiseScoreFlat *]
75  * Arg:                  gdb [UNKN ] Undocumented argument [GeneWiseQuickDB *]
76  * Arg:        return_status [UNKN ] Undocumented argument [int *]
77  *
78  * Return [UNKN ]  Undocumented return value [GeneWiseScoreFlat *]
79  *
80  */
81 GeneWiseScoreFlat * Wise2_reload_GeneWiseQuickDB(GeneWiseScoreFlat * prev,GeneWiseQuickDB * gdb,int * return_status);
82 #define reload_GeneWiseQuickDB Wise2_reload_GeneWiseQuickDB
83 
84 
85 /* Function:  close_GeneWiseQuickDB(gws,gdb)
86  *
87  * Descrip:    closes a GeneWiseDB
88  *
89  *
90  * Arg:        gws [UNKN ] Undocumented argument [GeneWiseScoreFlat *]
91  * Arg:        gdb [UNKN ] Undocumented argument [GeneWiseQuickDB *]
92  *
93  * Return [UNKN ]  Undocumented return value [boolean]
94  *
95  */
96 boolean Wise2_close_GeneWiseQuickDB(GeneWiseScoreFlat * gws,GeneWiseQuickDB * gdb);
97 #define close_GeneWiseQuickDB Wise2_close_GeneWiseQuickDB
98 
99 
100 /* Function:  dataentry_add_GeneWiseQuickDB(de,gws,gdb)
101  *
102  * Descrip:    adds dataentry stuff to a query.
103  *
104  *
105  * Arg:         de [UNKN ] Undocumented argument [DataEntry *]
106  * Arg:        gws [UNKN ] Undocumented argument [GeneWiseScoreFlat *]
107  * Arg:        gdb [UNKN ] Undocumented argument [GeneWiseQuickDB *]
108  *
109  * Return [UNKN ]  Undocumented return value [boolean]
110  *
111  */
112 boolean Wise2_dataentry_add_GeneWiseQuickDB(DataEntry * de,GeneWiseScoreFlat * gws,GeneWiseQuickDB * gdb);
113 #define dataentry_add_GeneWiseQuickDB Wise2_dataentry_add_GeneWiseQuickDB
114 
115 
116 /* Function:  GeneWiseQuickDB_from_GeneWiseDB(gwdb)
117  *
118  * Descrip:    Makes a new genewisequickdb from a genewisemodeldb
119  *
120  *
121  * Arg:        gwdb [READ ] genewisedb - hard links as it enters [GeneWiseDB *]
122  *
123  * Return [UNKN ]  Undocumented return value [GeneWiseQuickDB *]
124  *
125  */
126 GeneWiseQuickDB * Wise2_GeneWiseQuickDB_from_GeneWiseDB(GeneWiseDB * gwdb);
127 #define GeneWiseQuickDB_from_GeneWiseDB Wise2_GeneWiseQuickDB_from_GeneWiseDB
128 
129 
130 /* Function:  hard_link_GeneWiseQuickDB(obj)
131  *
132  * Descrip:    Bumps up the reference count of the object
133  *             Meaning that multiple pointers can 'own' it
134  *
135  *
136  * Arg:        obj [UNKN ] Object to be hard linked [GeneWiseQuickDB *]
137  *
138  * Return [UNKN ]  Undocumented return value [GeneWiseQuickDB *]
139  *
140  */
141 GeneWiseQuickDB * Wise2_hard_link_GeneWiseQuickDB(GeneWiseQuickDB * obj);
142 #define hard_link_GeneWiseQuickDB Wise2_hard_link_GeneWiseQuickDB
143 
144 
145 /* Function:  GeneWiseQuickDB_alloc(void)
146  *
147  * Descrip:    Allocates structure: assigns defaults if given
148  *
149  *
150  *
151  * Return [UNKN ]  Undocumented return value [GeneWiseQuickDB *]
152  *
153  */
154 GeneWiseQuickDB * Wise2_GeneWiseQuickDB_alloc(void);
155 #define GeneWiseQuickDB_alloc Wise2_GeneWiseQuickDB_alloc
156 
157 
158 /* Function:  free_GeneWiseQuickDB(obj)
159  *
160  * Descrip:    Free Function: removes the memory held by obj
161  *             Will chain up to owned members and clear all lists
162  *
163  *
164  * Arg:        obj [UNKN ] Object that is free'd [GeneWiseQuickDB *]
165  *
166  * Return [UNKN ]  Undocumented return value [GeneWiseQuickDB *]
167  *
168  */
169 GeneWiseQuickDB * Wise2_free_GeneWiseQuickDB(GeneWiseQuickDB * obj);
170 #define free_GeneWiseQuickDB Wise2_free_GeneWiseQuickDB
171 
172 
173   /* Unplaced functions */
174   /* There has been no indication of the use of these functions */
175 
176 
177     /***************************************************/
178     /* Internal functions                              */
179     /* you are not expected to have to call these      */
180     /***************************************************/
181 
182 #ifdef _cplusplus
183 }
184 #endif
185 
186 #endif
187