Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::VersioningUtils Struct Reference

Static Public Member Functions

static bool ParseSemver (string &semver, idx_t &major_out, idx_t &minor_out, idx_t &patch_out)
 Note: only supports format v{major}.{minor}.{patch}.
static bool IsSupportedCAPIVersion (string &capi_version_string)
 Note: only supports format v{major}.{minor}.{patch}.
static bool IsSupportedCAPIVersion (idx_t major, idx_t minor, idx_t patch)

Member Function Documentation

◆ ParseSemver()

bool duckdb::VersioningUtils::ParseSemver ( string & semver,
idx_t & major_out,
idx_t & minor_out,
idx_t & patch_out )
static

Note: only supports format v{major}.{minor}.{patch}.

280905 {
280906 if (!StringUtil::StartsWith(semver, "v")) {
280907 return false;
280908 }
280909
280910 auto without_v = semver.substr(1);
280911
280912 auto split = StringUtil::Split(without_v, '.');
280913
280914 if (split.size() != 3) {
280915 return false;
280916 }
280917
280918 idx_t major, minor, patch;
280919 bool succeeded = true;
280920
280921 succeeded &= TryCast::Operation<string_t, idx_t>(split[0], major);
280922 succeeded &= TryCast::Operation<string_t, idx_t>(split[1], minor);
280923 succeeded &= TryCast::Operation<string_t, idx_t>(split[2], patch);
280924
280925 if (!succeeded) {
280926 return false;
280927 }
280928
280929 major_out = major;
280930 minor_out = minor;
280931 patch_out = patch;
280932
280933 return true;
280934}
static DUCKDB_API vector< string > Split(const string &str, char delimiter)
Split the input string based on newline char.
Definition duckdb.cpp:109734
static DUCKDB_API bool StartsWith(string str, string prefix)
Returns true if the target string starts with the given prefix.
Definition duckdb.cpp:109377
void split(const Mat &src, Mat *mvbegin)
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsSupportedCAPIVersion() [1/2]

bool duckdb::VersioningUtils::IsSupportedCAPIVersion ( string & capi_version_string)
static

Note: only supports format v{major}.{minor}.{patch}.

280880 {
280881 idx_t major, minor, patch;
280882 if (!ParseSemver(capi_version_string, major, minor, patch)) {
280883 return false;
280884 }
280885
280886 return IsSupportedCAPIVersion(major, minor, patch);
280887}
static bool ParseSemver(string &semver, idx_t &major_out, idx_t &minor_out, idx_t &patch_out)
Note: only supports format v{major}.{minor}.{patch}.
Definition duckdb.cpp:280905
static bool IsSupportedCAPIVersion(string &capi_version_string)
Note: only supports format v{major}.{minor}.{patch}.
Definition duckdb.cpp:280880
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsSupportedCAPIVersion() [2/2]

bool duckdb::VersioningUtils::IsSupportedCAPIVersion ( idx_t major,
idx_t minor,
idx_t patch )
static
280889 {
280890 if (major != DUCKDB_EXTENSION_API_VERSION_MAJOR) {
280891 return false;
280892 }
280893 if (minor > DUCKDB_EXTENSION_API_VERSION_MINOR) {
280894 return false;
280895 }
280896 if (minor < DUCKDB_EXTENSION_API_VERSION_MINOR) {
280897 return true;
280898 }
280899 if (patch > DUCKDB_EXTENSION_API_VERSION_PATCH) {
280900 return false;
280901 }
280902 return true;
280903}

The documentation for this struct was generated from the following files: