Spicy
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
hilti::rt::library::Version Struct Reference

#include <library.h>

Public Member Functions

std::string toJSON () const
 
void checkCompatibility () const
 

Static Public Member Functions

static hilti::rt::Result< VersionfromJSON (const std::string &json)
 

Public Attributes

std::string magic
 
int hilti_version
 
double created
 
bool debug
 
bool optimize
 
hilti::rt::filesystem::path path
 

Friends

bool operator== (const Version &a, const Version &b)
 
bool operator!= (const Version &a, const Version &b)
 

Detailed Description

Version information that's embedded as JSON into HLTO libraries to record the HILTI version they were compile with.

Member Function Documentation

◆ checkCompatibility()

void hilti::rt::library::Version::checkCompatibility ( ) const

Checks the version for compatibility with the current runtime system. Prints out warnings on mismatches, but doesn't abort.

◆ fromJSON()

hilti::rt::Result< hilti::rt::library::Version > hilti::rt::library::Version::fromJSON ( const std::string &  json)
static

Parses a JSON representation of an instance.

Returns
a Version or an error if parsing of JSON failed

◆ toJSON()

std::string hilti::rt::library::Version::toJSON ( ) const

Converts the instances into a JSON string.

Member Data Documentation

◆ created

double hilti::rt::library::Version::created

time library was compiled in seconds since epoch

◆ debug

bool hilti::rt::library::Version::debug

true if compiled in debug mode

◆ hilti_version

int hilti::rt::library::Version::hilti_version

HILTI project version

◆ magic

std::string hilti::rt::library::Version::magic

magic string for identification

◆ optimize

bool hilti::rt::library::Version::optimize

true if compiled with optimizations enabled

◆ path

hilti::rt::filesystem::path hilti::rt::library::Version::path

path to file that library was loaded from; not embedded into JSON, but filled in by Library::open()


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