Class for run time control over the loading of an Intel® Threading Building Blocks dynamic library.
class runtime_loader;
namespace tbb {
class runtime_loader {
// Error codes.
enum error_code {
ec_ok, // No errors.
ec_bad_call, // Invalid function call.
ec_bad_arg, // Invalid argument passed.
ec_bad_lib, // Invalid library found.
ec_bad_ver, // The library found is not suitable.
ec_no_lib // No library found.
};
// Error mode constants.
enum error_mode {
em_status, // Save status of operation and continue.
em_throw, // Throw an exception of error_code type.
em_abort // Print message to stderr, and abort().
};
runtime_loader( error_mode mode = em_abort );
runtime_loader(
char const *path[],
// List of directories to search in.
int min_ver = TBB_INTERFACE_VERSION,
// Minimal suitable version
int max_ver = INT_MAX,
// Maximal suitable version
error_mode mode = em_abort
// Error mode for this instance.
);
~runtime_loader();
error_code load(
char const * path[],
int min_ver = TBB_INTERFACE_VERSION,
int max_ver = INT_MAX
);
error_code status();
};
}
| Member | Description |
|---|---|
| runtime_loader( error_mode mode = em_abort ) |
Initialize runtime_loader but do not load a library. |
| runtime_loader(char const * path[], int min_ver = TBB_INTERFACE_VERSION, int max_ver = INT_MAX, error_mode mode = em_abort ) |
Requirements: The last element of path[] must be NULL. Effects: Initialize runtime_loader and load Intel® Threading Building Blocks (Intel® TBB) (see load() for details). If error mode equals to em_status, the method status() can be used to check whether the library was loaded or not. If error mode equals to em_throw, in case of a failure an exception of type error_code will be thrown. If error mode equals to em_abort, in case of a failure a message will be printed to stderr, and execution aborted. |
| error_code load(char const * path[],int min_ver = TBB_INTERFACE_VERSION, int max_ver = INT_MAX) | More Info |
| error_code status() |
Returns: If error mode is em_status, the function returns status of the last operation. |