28 namespace fs = std::filesystem;
62 auto f = std::ifstream(path);
63 auto size = std::filesystem::file_size(path);
64 auto content = std::string(size,
'\0');
65 f.read(content.data(), size);
74 if (
const char* nmodl_home = std::getenv(
"NMODLHOME")) {
75 auto path = std::string(nmodl_home) +
"/share/nmodl/nrnunits.lib";
81 std::ifstream f(path.c_str());
Common utility functions for file/dir manipulation.
encapsulates code generation backend implementations
static const std::string SHARED_LIBRARY_SUFFIX
Information of units database i.e.
static std::string get_path()
Return path of units database file.
static std::vector< std::string > NRNUNITSLIB_PATH
paths where nrnunits.lib can be found
static const std::string_view embedded_nrnunits
static std::string get_content(const std::string &path)
Return content of units database file.
Project version information.
static const std::string NMODL_VERSION
project tagged version in the cmake
static std::string to_string()
return version string (version + git id) as a string
static const std::string GIT_REVISION
git revision id