Mychem  0.9.3
 All Classes Files Functions Variables Macros
molmatch.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2009-2011 by CNRS *
3  * jerome.pansanel@iphc.cnrs.fr -- Project founder and lead developer *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program 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 General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA. *
19  ***************************************************************************/
20 
29 #ifndef __MOLMATCH_H
30 #define __MOLMATCH_H
31 
32 #ifdef STANDARD
33 /* STANDARD is defined, don't use any mysql functions */
34 #include <stdlib.h>
35 #include <stdio.h>
36 #include <string.h>
37 #ifdef __WIN__
38 typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */
39 typedef __int64 longlong;
40 #else
41 typedef unsigned long long ulonglong;
42 typedef long long longlong;
43 #endif /*__WIN__*/
44 #else
45 #include <my_global.h>
46 #include <my_sys.h>
47 #endif /* STANDARD */
48 #include <mysql.h>
49 #include <m_ctype.h>
50 #include <m_string.h> /* To get strmov() */
51 
52 #ifdef HAVE_DLOPEN
53 
61 my_bool match_substruct_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
62 
67 void match_substruct_deinit(UDF_INIT *initid);
68 
79 longlong match_substruct(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error);
80 
88 my_bool substruct_atom_ids_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
89 
94 void substruct_atom_ids_deinit(UDF_INIT *initid);
95 
107 char *substruct_atom_ids(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
108 
116 my_bool tanimoto_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
117 
122 void tanimoto_deinit(UDF_INIT *initid);
123 
134 double tanimoto(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error);
135 
143 my_bool substruct_count_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
144 
149 void substruct_count_deinit(UDF_INIT *initid);
150 
161 longlong substruct_count(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error);
162 
170 my_bool bit_fp_and_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
171 
176 void bit_fp_and_deinit(UDF_INIT *initid);
177 
188 char *bit_fp_and(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
189 
197 my_bool bit_fp_or_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
198 
203 void bit_fp_or_deinit(UDF_INIT *initid);
204 
215 char *bit_fp_or(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char *error);
216 
224 my_bool bit_fp_count_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
225 
230 void bit_fp_count_deinit(UDF_INIT *initid);
231 
242 longlong bit_fp_count(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error);
243 
244 #endif /* HAVE_DLOPEN */
245 
246 #endif /* __MOLMATCH_H */
247