Jpp 21.0.1
the software that should make you happy
Loading...
Searching...
No Matches
meta_utils.hh
Go to the documentation of this file.
1#ifndef _META_UTILS_HH
2#define _META_UTILS_HH
3
4#include <string>
5#include <unordered_map>
6
7/// @brief Reads the jpp version from file
8/// @param filename Input filename
9/// @return JPP version or empty string if nothing is found
10std::string get_jpp_version_from_file(const char *filename);
11
12/// @brief Retrieve the JPP version from the metadata (mainly used for testing purposes)
13/// @param meta Metadata
14/// @return JPP version or empty string if nothing is found
15std::string get_jpp_version_from_meta(const std::unordered_map<std::string, std::unordered_map<std::string, std::string>> &meta);
16
17/// @brief Get the jpp major version
18/// @param version_str Version string
19/// @return Major version as integer
20int get_jpp_major_version(const std::string &version_str);
21
22#endif
std::string get_jpp_version_from_meta(const std::unordered_map< std::string, std::unordered_map< std::string, std::string > > &meta)
Retrieve the JPP version from the metadata (mainly used for testing purposes)
Definition meta_utils.cc:38
std::string get_jpp_version_from_file(const char *filename)
Reads the jpp version from file.
Definition meta_utils.cc:57
int get_jpp_major_version(const std::string &version_str)
Get the jpp major version.
Definition meta_utils.cc:63