Search Results for

    Show / Hide Table of Contents

    Struct Version

    Represents the version number made of major, minor, build and revision numbers.

    Assembly: FlaxEngine.dll
    File: Engine/Core/Types/Version.h
    Syntax
    public struct Version

    Constructors

    Version()

    Initializes a new instance of the Version class.

    Declaration
    public Version()

    Version(int32 major, int32 minor)

    Initializes a new instance of the Version class using the specified major and minor values.

    Declaration
    public Version(int32 major, int32 minor)
    Parameters
    int32 major

    The major version number.

    int32 minor

    The minor version number.

    Version(int32 major, int32 minor, int32 build)

    Initializes a new instance of the Version class using the specified major, minor, and build values.

    Declaration
    public Version(int32 major, int32 minor, int32 build)
    Parameters
    int32 major

    The major version number.

    int32 minor

    The minor version number.

    int32 build

    The build number.

    Version(int32 major, int32 minor, int32 build, int32 revision)

    Initializes a new instance of the Version class with the specified major, minor, build, and revision numbers.

    Declaration
    public Version(int32 major, int32 minor, int32 build, int32 revision)
    Parameters
    int32 major

    The major version number.

    int32 minor

    The minor version number.

    int32 build

    The build number.

    int32 revision

    The revision number.

    Methods

    Build()

    Gets the value of the build component of the version number for the current Version object.

    Declaration
    public int32 Build() const
    Returns
    int32

    The build number, or -1 if the build number is undefined.

    CompareTo(const Version& value)

    Compares the current Version object to a specified Version object and returns an indication of their relative values.

    Declaration
    public int32 CompareTo(const Version& value) const
    Parameters
    Version value

    A Version object to compare to the current Version object, or null.

    Returns
    int32

    A signed integer that indicates the relative values of the two objects, as shown in the following table.Return value Meaning Less than zero The current Version object is a version before value . Zero The current Version object is the same version as value . Greater than zero The current Version object is a version subsequent to value . -or-value is null.

    Equals(const Version& obj)

    Returns a value indicating whether the current Version object and a specified Version object represent the same value.

    Declaration
    public bool Equals(const Version& obj) const
    Parameters
    Version obj

    A Version object to compare to the current Version object, or null.

    Returns
    bool

    True if every component of the current Version object matches the corresponding component of the obj parameter; otherwise, false.

    Major()

    Gets the value of the major component of the version number for the current Version object.

    Declaration
    public int32 Major() const
    Returns
    int32

    The major version number.

    Minor()

    Gets the value of the minor component of the version number for the current Version object.

    Declaration
    public int32 Minor() const
    Returns
    int32

    The minor version number.

    operator!=(const Version& other)

    Declaration
    public bool operator!=(const Version& other) const
    Parameters
    Version other

    Returns
    bool

    operator<(const Version& other)

    Declaration
    public bool operator<(const Version& other) const
    Parameters
    Version other

    Returns
    bool

    operator<=(const Version& other)

    Declaration
    public bool operator<=(const Version& other) const
    Parameters
    Version other

    Returns
    bool

    operator==(const Version& other)

    Declaration
    public bool operator==(const Version& other) const
    Parameters
    Version other

    Returns
    bool

    operator>(const Version& other)

    Declaration
    public bool operator>(const Version& other) const
    Parameters
    Version other

    Returns
    bool

    operator>=(const Version& other)

    Declaration
    public bool operator>=(const Version& other) const
    Parameters
    Version other

    Returns
    bool

    Parse(const String& text, Version* value)

    Try to parse Version from string.

    Declaration
    public static bool Parse(const String& text, Version* value)
    Parameters
    String text

    Input text.

    Version value

    Result value.

    Returns
    bool

    True if cannot parse text, otherwise false.

    Revision()

    Gets the value of the revision component of the version number for the current Version object.

    Declaration
    public int32 Revision() const
    Returns
    int32

    The revision number, or -1 if the revision number is undefined.

    ToString()

    Declaration
    public String ToString() const
    Returns
    String

    ToString(int32 fieldCount)

    Converts the value of the current Version object to its equivalent T:String representation. A specified count indicates the number of components to return.

    Declaration
    public String ToString(int32 fieldCount) const
    Parameters
    int32 fieldCount

    The number of components to return. The fieldCount ranges from 0 to 4.

    Returns
    String

    The T:String representation of the values of the major, minor, build, and revision components of the current Version object, each separated by a period character ('.'). The fieldCount parameter determines how many components are returned.fieldCount Return Value 0 An empty string (""). 1 major 2 major.minor 3 major.minor.build 4 major.minor.build.revision For example, if you create Version object using the constructor Version(1,3,5), ToString(2) returns "1.3" and ToString(4) throws an exception.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat