17 MyVersionInformationType

Every library in Aldor should provide an implementation of the category MyVersionInformationType.

139⟨* 21⟩+≡   ⊲134  148 ⊳
-------------------------------------------------------------------
----
---- ALLPROSE
---- Copyright (C) Ralf Hemmecke (ralf@hemmecke.de)
---- http://www.hemmecke.de/aldor
----
-------------------------------------------------------------------

#assert DontNeedLibraryMyAlps
#include "myalps"
⟨cat: MyVersionInformationType 140⟩

Uses DontNeedLibraryMyAlps 138.

Type Constructor

MyVersionInformationType

Usage

#include "myalps"
LibraryInformationMyAlps: MyVersionInformationType == add {
  name: String == "MyAlps";
  version: String == "0.0.1";
  major: MachineInteger == 0;
  minor: MachineInteger == 0;
  patch: MachineInteger == 1;
  credits: List String == ["Ralf Hemmecke (ralf@hemmecke.de)"];
}

Description

Provides version information.

MyVersionInformationType is the category of types providing version information.

140⟨cat: MyVersionInformationType 140⟩≡   (139)
define MyVersionInformationType:Category == with {
        ⟨exports: MyVersionInformationType 142⟩
}

Defines:
MyVersionInformationType, never used.

Exports of MyVersionInformationType

name: String Returns the name of the library.

version: String Returns the version of the library.

major: MachineInteger Returns the major version number of a library.

minor: MachineInteger Returns the minor version number of a library.

patch: MachineInteger Returns the patchlevel of a library.

credits: List String Returns a list of lines, crediting the various authors of a library.

Export of MyVersionInformationType

name: String

Usage

stdout << "The name of the library is " << name << newline;

Description

Returns the name of the library.

142⟨exports: MyVersionInformationType 142⟩≡   (140)  143 ⊳
name: String;

Export of MyVersionInformationType

version: String

Usage

stdout << "The version of the library is " << version << newline;

Description

Returns the version of the library.

143⟨exports: MyVersionInformationType 142⟩+≡   (140)  ⊲142  144 ⊳
version: String;

Export of MyVersionInformationType

major: MachineInteger

Usage

if major > 1 or (major = 1 and minor > 3) then {
    -- everything is ok
} else {
    if patch > 2 then ... else ...;
}

Description

Returns the major version number of a library.

144⟨exports: MyVersionInformationType 142⟩+≡   (140)  ⊲143  145 ⊳
major: MachineInteger;

Export of MyVersionInformationType

minor: MachineInteger

Usage

if major > 1 or (major = 1 and minor > 3) then {
    -- everything is ok
} else {
    if patch > 2 then ... else ...;
}

Description

Returns the minor version number of a library.

145⟨exports: MyVersionInformationType 142⟩+≡   (140)  ⊲144  146 ⊳
minor: MachineInteger;

Export of MyVersionInformationType

patch: MachineInteger

Usage

if major > 1 or (major = 1 and minor > 3) then {
    -- everything is ok
} else {
    if patch > 2 then ... else ...;
}

Description

Returns the patchlevel of a library.

146⟨exports: MyVersionInformationType 142⟩+≡   (140)  ⊲145  147 ⊳
patch: MachineInteger;

Export of MyVersionInformationType

credits: List String

Usage

for c in credits repeat stdout << c << newline;

Description

Returns a list of lines, crediting the various authors of a library.

147⟨exports: MyVersionInformationType 142⟩+≡   (140)  ⊲146
credits: List String;