00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef __TBB_runtime_loader_H
00030 #define __TBB_runtime_loader_H
00031
00032 #if ! TBB_PREVIEW_RUNTIME_LOADER
00033 #error Set TBB_PREVIEW_RUNTIME_LOADER to include runtime_loader.h
00034 #endif
00035
00036 #include "tbb/tbb_stddef.h"
00037 #include <climits>
00038
00039 #if _MSC_VER
00040 #if ! __TBB_NO_IMPLICIT_LINKAGE
00041 #ifdef _DEBUG
00042 #pragma comment( linker, "/nodefaultlib:tbb_debug.lib" )
00043 #pragma comment( linker, "/defaultlib:tbbproxy_debug.lib" )
00044 #else
00045 #pragma comment( linker, "/nodefaultlib:tbb.lib" )
00046 #pragma comment( linker, "/defaultlib:tbbproxy.lib" )
00047 #endif
00048 #endif
00049 #endif
00050
00051 namespace tbb {
00052
00053 namespace interface6 {
00054
00056
00093 class runtime_loader : tbb::internal::no_copy {
00094
00095 public:
00096
00098 enum error_mode {
00099 em_status,
00100 em_throw,
00101 em_abort
00102 };
00103
00105 enum error_code {
00106 ec_ok,
00107 ec_bad_call,
00108 ec_bad_arg,
00109 ec_bad_lib,
00110 ec_bad_ver,
00111 ec_no_lib
00112 };
00113
00115 runtime_loader( error_mode mode = em_abort );
00116
00118
00123 runtime_loader(
00124 char const * path[],
00125 int min_ver = TBB_INTERFACE_VERSION,
00126 int max_ver = INT_MAX,
00127 error_mode mode = em_abort
00128 );
00129
00131 ~runtime_loader();
00132
00134
00158 error_code
00159 load(
00160 char const * path[],
00161 int min_ver = TBB_INTERFACE_VERSION,
00162 int max_ver = INT_MAX
00163
00164 );
00165
00166
00168
00171 error_code status();
00172
00173 private:
00174
00175 error_mode const my_mode;
00176 error_code my_status;
00177 bool my_loaded;
00178
00179 };
00180
00181 }
00182
00183 using interface6::runtime_loader;
00184
00185 }
00186
00187 #endif
00188