-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow DlLoader to have multiple fallback names when searching for a library #1635
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,10 +22,12 @@ namespace core { | |
// Utility class for retrieving function pointers from dynamic libraries. | ||
class DlLoader { | ||
public: | ||
// Loads the specified dynamic library. | ||
// If the library cannot be loaded then this is a fatal error. | ||
// For *nix systems, a nullptr can be used to search the application's functions. | ||
DlLoader(const char* name); | ||
// Loads the dynamic library specified by the given name and fallback names | ||
// (if any). Names will be used to try to find the library in order. If the | ||
// library cannot be loaded then this is a fatal error. For *nix systems, | ||
// a nullptr can be used to search the application's functions. | ||
template<typename... ConstCharPtrs> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a particular reason we are doing this with template magic, rather than something like std::initializer_list? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, I just feel There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, as much as I personally love templates, reading
is a lot harder to parse than
|
||
DlLoader(const char* name, ConstCharPtrs... fallback_names); | ||
|
||
// Unloads the library loaded in the constructor. | ||
~DlLoader(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#undef DL
?