SHOGUN v0.9.0
|
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2009 Soeren Sonnenburg 00008 * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society 00009 */ 00010 00011 #ifndef __SG_INIT_H__ 00012 #define __SG_INIT_H__ 00013 00014 #include <stdio.h> 00015 00016 namespace shogun 00017 { 00018 class IO; 00019 class CMath; 00020 class Version; 00021 class Parallel; 00022 00036 void init_shogun(void (*print_message)(FILE* target, const char* str) = NULL, 00037 void (*print_warning)(FILE* target, const char* str) = NULL, 00038 void (*print_error)(FILE* target, const char* str) = NULL, 00039 void (*cancel_computations)(bool &delayed, bool &immediately)=NULL); 00040 00043 void exit_shogun(); 00044 00049 void set_global_io(IO* io); 00050 00055 IO* get_global_io(); 00056 00061 void set_global_parallel(Parallel* parallel); 00062 00067 Parallel* get_global_parallel(); 00068 00073 void set_global_version(Version* version); 00074 00079 Version* get_global_version(); 00080 00085 void set_global_math(CMath* math); 00086 00091 CMath* get_global_math(); 00092 00094 extern void (*sg_print_message)(FILE* target, const char* str); 00095 00097 extern void (*sg_print_warning)(FILE* target, const char* str); 00098 00100 extern void (*sg_print_error)(FILE* target, const char* str); 00101 00103 extern void (*sg_cancel_computations)(bool &delayed, bool &immediately); 00104 } 00105 #endif //__SG_INIT__