🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
Library.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include "AstUtil/StringView.hpp"
25
26AST_NAMESPACE_BEGIN
27
48class AST_UTIL_API Library
49{
50public:
52 Library();
53
55 explicit Library(StringView fileName);
56
58 ~Library();
59
60 A_DISABLE_COPY(Library)
61
62
64 errc_t load();
65
68 errc_t unload();
69
71 bool isLoaded() const { return handle_ != nullptr; }
72
77 void* resolve(const char* symbol);
78
80 std::string fileName() const { return fileName_; }
81
84 void setFileName(StringView fileName);
85
87 static bool IsLibrary(StringView fileName);
88
94 static void* Resolve(StringView fileName, const char* symbol);
95
96private:
97 void* handle_{ nullptr };
98 std::string fileName_{};
99};
100
103AST_NAMESPACE_END
动态库加载类
定义 Library.hpp:49
std::string fileName() const
获取文件名
定义 Library.hpp:80
bool isLoaded() const
判断动态库是否已加载
定义 Library.hpp:71