#include <LammpsLoader.h>
Public Member Functions | |
| bool | is_loaded () const noexcept override |
| bool | available () const override |
| Filesystem probe: a candidate liblammps file is visible without dlopen, so LAMMPS static initializers (the banner) do not run. | |
| const std::string & | last_error () const noexcept override |
| Why the last ensure_loaded() failed. Empty if unused or loaded. | |
| void | require_loaded () override |
| Load on first use, then throw if liblammps is not available. | |
| LammpsLoader (const LammpsLoader &)=delete | |
| LammpsLoader & | operator= (const LammpsLoader &)=delete |
| Public Member Functions inherited from eonc::ILammpsLoader | |
| virtual | ~ILammpsLoader ()=default |
| ILammpsLoader (const ILammpsLoader &)=delete | |
| ILammpsLoader & | operator= (const ILammpsLoader &)=delete |
Static Public Member Functions | |
| static LammpsLoader & | instance () |
| Thread-safe singleton accessor (Meyer's pattern). Does not dlopen. | |
Private Member Functions | |
| LammpsLoader ()=default | |
| ~LammpsLoader () override | |
| void | ensure_loaded () |
| template<typename Fn> | |
| Fn | load_sym (const char *name) |
| Try to load a symbol; returns nullptr on failure. | |
Private Attributes | |
| bool | m_loaded {false} |
| bool | m_tried {false} |
| dynlib::Handle | m_handle {} |
| std::string | m_last_error {} |
Additional Inherited Members | |
| Public Types inherited from eonc::ILammpsLoader | |
| using | open_no_mpi_fn = void *(*)(int, char **, void **) |
| using | close_fn = void (*)(void *) |
| using | command_fn = char *(*)(void *, const char *) |
| using | file_fn = void (*)(void *, const char *) |
| using | scatter_atoms_fn = void (*)(void *, const char *, int, int, void *) |
| using | extract_var_fn = void *(*)(void *, const char *, const char *) |
| Public Attributes inherited from eonc::ILammpsLoader | |
| open_no_mpi_fn | open_no_mpi {nullptr} |
| close_fn | close {nullptr} |
| command_fn | command {nullptr} |
| file_fn | file {nullptr} |
| scatter_atoms_fn | scatter_atoms {nullptr} |
| extract_var_fn | extract_variable {nullptr} |
| Protected Member Functions inherited from eonc::ILammpsLoader | |
| ILammpsLoader ()=default | |
Definition at line 74 of file LammpsLoader.h.
|
delete |
|
privatedefault |
|
overrideprivate |
Definition at line 135 of file LammpsLoader.cpp.
|
nodiscardoverridevirtual |
Filesystem probe: a candidate liblammps file is visible without dlopen, so LAMMPS static initializers (the banner) do not run.
Implements eonc::ILammpsLoader.
Definition at line 137 of file LammpsLoader.cpp.
|
private |
Definition at line 84 of file LammpsLoader.cpp.
|
static |
Thread-safe singleton accessor (Meyer's pattern). Does not dlopen.
Definition at line 79 of file LammpsLoader.cpp.
|
inlinenodiscardoverridevirtualnoexcept |
|
inlinenodiscardoverridevirtualnoexcept |
Why the last ensure_loaded() failed. Empty if unused or loaded.
Implements eonc::ILammpsLoader.
Definition at line 86 of file LammpsLoader.h.
|
inlineprivate |
Try to load a symbol; returns nullptr on failure.
Definition at line 108 of file LammpsLoader.h.
|
delete |
|
overridevirtual |
Load on first use, then throw if liblammps is not available.
Implements eonc::ILammpsLoader.
Definition at line 141 of file LammpsLoader.cpp.
|
private |
Definition at line 104 of file LammpsLoader.h.
|
private |
Definition at line 105 of file LammpsLoader.h.
|
private |
Definition at line 102 of file LammpsLoader.h.
|
private |
Definition at line 103 of file LammpsLoader.h.