Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
EngineVersion.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Misc/EngineVersionBase.h"
7#include "Containers/UnrealString.h"
8#include "Serialization/StructuredArchive.h"
9
10/** Utility functions. */
12{
13public:
14
15 /** Empty constructor. Initializes the version to 0.0.0-0. */
16 FEngineVersion() = default;
17
18 /** Constructs a version from the given components. */
19 FEngineVersion(uint16 InMajor, uint16 InMinor, uint16 InPatch, uint32 InChangelist, const FString &InBranch);
20
21 /** Sets the version to the given values. */
22 void Set(uint16 InMajor, uint16 InMinor, uint16 InPatch, uint32 InChangelist, const FString &InBranch);
23
24 /** Clears the object. */
25 void Empty();
26
27 /** Checks whether this engine version is an exact match for another engine version */
28 bool ExactMatch(const FEngineVersion& Other) const;
29
30 /** Checks compatibility with another version object. */
31 bool IsCompatibleWith(const FEngineVersionBase &Other) const;
32
33 /** Generates a version string */
35
36 /** Parses a version object from a string. Returns true on success. */
37 static bool Parse(const FString &Text, FEngineVersion &OutVersion);
38
39 /** Gets the current engine version */
40 static const FEngineVersion& Current();
41
42 /** Gets the earliest version which this engine maintains strict API and package compatibility with */
44
45 /** Clears the current and compatible-with engine versions */
46 static void TearDown();
47
48 /** Serialization functions */
49 friend void operator<<(class FArchive &Ar, FEngineVersion &Version);
50 friend void operator<<(FStructuredArchive::FSlot Slot, FEngineVersion &Version);
51
52 /** Returns the branch name corresponding to this version. */
53 const FString GetBranch() const
54 {
55 return Branch.Replace( TEXT( "+" ), TEXT( "/" ) );
56 }
57
59
60
61private:
62
63 /** Branch name. */
65};
EVersionComponent
#define TEXT(x)
Definition Platform.h:1108
void Set(uint16 InMajor, uint16 InMinor, uint16 InPatch, uint32 InChangelist, const FString &InBranch)
static bool Parse(const FString &Text, FEngineVersion &OutVersion)
bool ExactMatch(const FEngineVersion &Other) const
FEngineVersion()=default
const FString GetBranch() const
friend void operator<<(class FArchive &Ar, FEngineVersion &Version)
FString ToString(EVersionComponent LastComponent=EVersionComponent::Branch) const
FEngineVersion(uint16 InMajor, uint16 InMinor, uint16 InPatch, uint32 InChangelist, const FString &InBranch)
const FString & GetBranchDescriptor() const
static const FEngineVersion & CompatibleWith()
static void TearDown()
bool IsCompatibleWith(const FEngineVersionBase &Other) const
friend void operator<<(FStructuredArchive::FSlot Slot, FEngineVersion &Version)
static const FEngineVersion & Current()