7#ifndef _NIM_SDK_CPP_NIM_SDK_UTIL_H_
8#define _NIM_SDK_CPP_NIM_SDK_UTIL_H_
44 bool LoadSdkDll(
const char* cur_module_dir,
const char* sdk_dll_file_name);
54 void* function_ptr =
nullptr;
57 function_ptr = it->second;
79 printf(
"function [ %s ] not found \n", name);
86#define NIM_SDK_GET_FUNC_FROM_INSTANCE(instance, function_ptr) \
87 (instance != nullptr && (((function_ptr)instance->GetFunction(#function_ptr)) != nullptr) \
88 ? ((function_ptr)instance->GetFunction(#function_ptr)) \
89 : (nim::nim_print_unfound_func_name(#function_ptr), (function_ptr)nim::unfound_function_holder))
SDK库辅助类,提供加载/卸载SDK库以及获取接口的方法
Definition: nim_sdk_util.h:38
void * GetFunction(const std::string &function_name)
Definition: nim_sdk_util.h:53
std::map< std::string, void * > function_map
Definition: nim_sdk_util.h:74
SDKInstance()
Definition: nim_sdk_util.cpp:16
std::function< void *(const std::string &)> get_proc_address_wrapper_
Definition: nim_sdk_util.h:75
void UnLoadSdkDll()
Definition: nim_sdk_util.cpp:62
void OnSDKInited()
Definition: nim_sdk_util.cpp:76
virtual ~SDKInstance()
Definition: nim_sdk_util.cpp:24
void * instance_nim_
Definition: nim_sdk_util.h:71
bool LoadSdkDll(const char *cur_module_dir, const char *sdk_dll_file_name)
Definition: nim_sdk_util.cpp:28
static void nim_print_unfound_func_name(const char *name)
Definition: nim_sdk_util.h:78
static void unfound_function_holder()
Definition: nim_sdk_util.h:82
BoolStatus
Definition: nim_sdk_util.h:22
@ BS_TRUE
true
Definition: nim_sdk_util.h:28
@ BS_NOT_INIT
未初始化
Definition: nim_sdk_util.h:24
@ BS_FALSE
false
Definition: nim_sdk_util.h:26