Avara3D 0.2.0
C++ API reference
a3d::BuildInfo Class Reference

Exposes version and build metadata compiled into the A3D library. More...

#include <a3d/BuildInfo.h>

Classes

struct  Version
 Major, minor, and patch components of an A3D version. More...
 

Public Types

enum class  Type {
  Debug , Release , RelWithDebInfo , MinSizeRel ,
  Unknown
}
 Build configuration used to compile the library. More...
 
enum class  Origin { CI , AdHoc }
 Origin of the build metadata. More...
 

Public Member Functions

unsigned number () const
 Returns the CI build number, or zero for an ad-hoc build. More...
 
const Versionversion () const
 Returns the semantic version compiled into the library. More...
 
Type type () const
 Returns the build configuration. More...
 
Origin origin () const
 Returns whether the build metadata originated from CI or an ad-hoc build. More...
 
const std::tm & time () const
 Returns the recorded build time as calendar components. More...
 

Static Public Member Functions

static const BuildInfoInfo ()
 Returns the process-wide BuildInfo for the linked A3D library. More...
 
static std::string VersionString (const Version &version)
 Formats version as a dotted major.minor.patch string. More...
 
static std::string TypeString (Type type)
 Returns the canonical string for type. More...
 
static std::string OriginString (Origin origin)
 Returns the canonical string for origin. More...
 

Detailed Description

Exposes version and build metadata compiled into the A3D library.

Definition at line 19 of file BuildInfo.h.

Member Enumeration Documentation

◆ Origin

enum class a3d::BuildInfo::Origin
strong

Origin of the build metadata.

Enumerator
CI 

Build produced by the configured CI environment.

AdHoc 

Build produced outside the configured CI environment.

Definition at line 47 of file BuildInfo.h.

◆ Type

enum class a3d::BuildInfo::Type
strong

Build configuration used to compile the library.

Enumerator
Debug 

Debug build.

Release 

Release build.

RelWithDebInfo 

Release build with debug information.

MinSizeRel 

Release build optimized for minimum size.

Unknown 

Unrecognized or unavailable build configuration.

Definition at line 38 of file BuildInfo.h.

Member Function Documentation

◆ Info()

static const BuildInfo & a3d::BuildInfo::Info ( )
static

Returns the process-wide BuildInfo for the linked A3D library.

◆ number()

unsigned a3d::BuildInfo::number ( ) const

Returns the CI build number, or zero for an ad-hoc build.

◆ origin()

Origin a3d::BuildInfo::origin ( ) const

Returns whether the build metadata originated from CI or an ad-hoc build.

◆ OriginString()

static std::string a3d::BuildInfo::OriginString ( Origin  origin)
static

Returns the canonical string for origin.

◆ time()

const std::tm & a3d::BuildInfo::time ( ) const

Returns the recorded build time as calendar components.

CI builds use the CI pipeline creation timestamp. Ad-hoc builds currently do not contain a meaningful build timestamp.

◆ type()

Type a3d::BuildInfo::type ( ) const

Returns the build configuration.

◆ TypeString()

static std::string a3d::BuildInfo::TypeString ( Type  type)
static

Returns the canonical string for type.

◆ version()

const Version & a3d::BuildInfo::version ( ) const

Returns the semantic version compiled into the library.

◆ VersionString()

static std::string a3d::BuildInfo::VersionString ( const Version version)
static

Formats version as a dotted major.minor.patch string.


The documentation for this class was generated from the following file: