Build info#

#include "navground/core/build_info.h"
struct BuildInfo#

Stores build-time information.

Public Functions

std::string get_version_string() const#

Gets the version string.

Returns:

The version string: "<mayor>.<minor>.<patch>"

std::string get_date_string() const#

Gets the date string.

Returns:

The date string.

std::string to_string() const#

Returns a string representation of the object.

Returns:

String representation of the object.

std::string to_string_diff(const BuildInfo &other) const#

Returns a string representation of the object.

Returns:

String representation of the object.

inline BuildInfo(const Version &version, const std::string &git, const Date &date, const std::string &floating_point_type)#

Construct an instance.

Parameters:
  • version[in] The version ({major, minor, patch})

  • git[in] The output of git describe

  • date[in] The build date.

  • floating_point_type[in] Which type is used for floating-point numbers.

BuildInfo(const std::string &git_describe, const std::string &utc_date)#

Construct an instance.

Parameters:
  • git_describe[in] The output of git describe

  • utc_date[in] The utc date in format date_format.

Public Members

Version version#

The version (major.minor.patch)

std::string git#

The git describe

Date date#

The build time

std::string floating_point_type#

Which type is used for floating-point numbers (configured by NAVGROUND_USES_DOUBLE)

Public Static Attributes

static const char *date_format = "%Y-%m-%dT%H:%M:%SZ"#

The date format

struct DependencyInfo#

Holds the build information at build-time and run-time of a dependency.

Public Functions

inline std::string to_string() const#

Represent the different between a pair of BuildInfo using BuildInfo::to_string_diff.

Returns:

build.to_string_diff(run)

Public Members

BuildInfo build#

The build info of the dependency at build time of this library

BuildInfo run#

The build info of the currently loaded dependency

using navground::core::BuildDependencies = std::map<std::string, DependencyInfo>#

A map of dependencies: name -> {build-time version, run-time version}

using navground::core::PkgDependencies = std::map<std::string, std::map<std::filesystem::path, BuildDependencies>>#
BuildInfo navground::core::get_build_info()#

Gets the build information.

Returns:

The build information.

BuildDependencies navground::core::get_build_dependencies()#

Gets the build dependencies.

Returns:

The build dependencies.

const PkgDependencies &navground::core::get_plugins_dependencies()#

Gets the dependencies of loaded packages.