#include <LammpsLoader.h>
Public Types | |
| 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 Member Functions | |
| bool | is_loaded () const noexcept |
| True if liblammps was successfully dlopened and the C ABI resolved. | |
| bool | available () const |
| Filesystem probe: a candidate liblammps file is visible without dlopen, so LAMMPS static initializers (the banner) do not run. | |
| void | require_loaded () |
| Load on first use, then throw if liblammps is not available. | |
| LammpsLoader (const LammpsLoader &)=delete | |
| LammpsLoader & | operator= (const LammpsLoader &)=delete |
Static Public Member Functions | |
| static LammpsLoader & | instance () |
| Thread-safe singleton accessor (Meyer's pattern). Does not dlopen. | |
Public Attributes | |
| 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} |
Private Member Functions | |
| LammpsLoader ()=default | |
| ~LammpsLoader () | |
| 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 {} |
Definition at line 34 of file LammpsLoader.h.
| using eonc::LammpsLoader::close_fn = void (*)(void *) |
Definition at line 38 of file LammpsLoader.h.
| using eonc::LammpsLoader::command_fn = char *(*)(void *, const char *) |
Definition at line 39 of file LammpsLoader.h.
| using eonc::LammpsLoader::extract_var_fn = void *(*)(void *, const char *, const char *) |
Definition at line 42 of file LammpsLoader.h.
| using eonc::LammpsLoader::file_fn = void (*)(void *, const char *) |
Definition at line 40 of file LammpsLoader.h.
| using eonc::LammpsLoader::open_no_mpi_fn = void *(*)(int, char **, void **) |
Definition at line 37 of file LammpsLoader.h.
| using eonc::LammpsLoader::scatter_atoms_fn = void (*)(void *, const char *, int, int, void *) |
Definition at line 41 of file LammpsLoader.h.
|
delete |
|
privatedefault |
|
private |
Definition at line 118 of file LammpsLoader.cpp.
|
nodiscard |
Filesystem probe: a candidate liblammps file is visible without dlopen, so LAMMPS static initializers (the banner) do not run.
Definition at line 120 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.
|
inlinenodiscardnoexcept |
True if liblammps was successfully dlopened and the C ABI resolved.
Definition at line 62 of file LammpsLoader.h.
|
inlineprivate |
Try to load a symbol; returns nullptr on failure.
Definition at line 85 of file LammpsLoader.h.
|
delete |
| void eonc::LammpsLoader::require_loaded | ( | ) |
Load on first use, then throw if liblammps is not available.
Definition at line 124 of file LammpsLoader.cpp.
| close_fn eonc::LammpsLoader::close {nullptr} |
Definition at line 52 of file LammpsLoader.h.
| command_fn eonc::LammpsLoader::command {nullptr} |
Definition at line 53 of file LammpsLoader.h.
| extract_var_fn eonc::LammpsLoader::extract_variable {nullptr} |
Definition at line 56 of file LammpsLoader.h.
| file_fn eonc::LammpsLoader::file {nullptr} |
Definition at line 54 of file LammpsLoader.h.
|
private |
Definition at line 82 of file LammpsLoader.h.
|
private |
Definition at line 80 of file LammpsLoader.h.
|
private |
Definition at line 81 of file LammpsLoader.h.
| open_no_mpi_fn eonc::LammpsLoader::open_no_mpi {nullptr} |
Definition at line 51 of file LammpsLoader.h.
| scatter_atoms_fn eonc::LammpsLoader::scatter_atoms {nullptr} |
Definition at line 55 of file LammpsLoader.h.