- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# runtime_loader.h

    00001 /*
    00002     Copyright 2005-2012 Intel Corporation.  All Rights Reserved.
    00003
    00004     This file is part of Threading Building Blocks.
    00005
    00006     Threading Building Blocks is free software; you can redistribute it
    00007     and/or modify it under the terms of the GNU General Public License
    00008     version 2 as published by the Free Software Foundation.
    00009
    00010     Threading Building Blocks is distributed in the hope that it will be
    00011     useful, but WITHOUT ANY WARRANTY; without even the implied warranty
    00012     of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00013     GNU General Public License for more details.
    00014
    00015     You should have received a copy of the GNU General Public License
    00016     along with Threading Building Blocks; if not, write to the Free Software
    00017     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    00018
    00019     As a special exception, you may use this file as part of a free software
    00020     library without restriction.  Specifically, if other files instantiate
    00021     templates or use macros or inline functions from this file, or you compile
    00022     this file and link it with other files to produce an executable, this
    00023     file does not by itself cause the resulting executable to be covered by
    00024     the GNU General Public License.  This exception does not however
    00025     invalidate any other reasons why the executable file might be covered by
    00026     the GNU General Public License.
    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         }; // error_mode
    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         }; // error_code
    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 }; // class runtime_loader
    00180
    00181 } // namespace interface6
    00182
    00183 using interface6::runtime_loader;
    00184
    00185 } // namespace tbb
    00186
    00187 #endif /* __TBB_runtime_loader_H */
    00188

Copyright © 2005-2012 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.