Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Version< N > Struct Template Reference

Public Types

enum  { parts_count = N }
 Store size of Version object.
 
using ComponentType = AZ::u64
 The type each component is stored as.
 

Public Member Functions

 Version (const Version &other)
 
 Version (const AZStd::array< ComponentType, N > &parts)
 
 Version (const std::initializer_list< ComponentType > &values)
 
AZStd::string ToString () const
 
bool IsZero () const
 

Static Public Member Functions

static AZ::Outcome< Version, AZStd::stringParseFromString (const AZStd::string &versionStr)
 
static int Compare (const Version &a, const Version &b)
 

Public Attributes

AZStd::array< ComponentType, N > m_parts
 

Member Function Documentation

◆ Compare()

template<size_t N>
static int AZ::Version< N >::Compare ( const Version< N > &  a,
const Version< N > &  b 
)
inlinestatic

Compare two versions.

Returns: 0 if a == b, <0 if a < b, and >0 if a > b.

◆ IsZero()

template<size_t N>
bool AZ::Version< N >::IsZero ( ) const
inline

Check if current version is all zero-ed out

Returns: True if the current version is all zero-ed out, else false

◆ ParseFromString()

template<size_t N>
static AZ::Outcome< Version, AZStd::string > AZ::Version< N >::ParseFromString ( const AZStd::string versionStr)
inlinestatic

Parses a version from a string in the format "[part].[part].[part] ...".

Parameters
[in]versionStrThe string to parse for a version.
Returns
On success, the parsed Version; on failure, a message describing the error.

◆ ToString()

template<size_t N>
AZStd::string AZ::Version< N >::ToString ( ) const
inline

Returns the version in string form.

Returns
The version as a string formatted as "[major].[minor].[patch]".

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