17 MyVersionInformationType

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

142* 21+   137  151
-------------------------------------------------------------------
----
---- ALLPROSE
---- Copyright (C) Ralf Hemmecke (ralf@hemmecke.de)
---- http://www.hemmecke.de/aldor
----
-------------------------------------------------------------------

#assert DontNeedLibraryMyAlps
#include "myalps"
cat: MyVersionInformationType 143

Uses DontNeedLibraryMyAlps 141.

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.

143cat: MyVersionInformationType 143  (142)
define MyVersionInformationType:Category == with {
        exports: MyVersionInformationType 145
}

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.

145exports: MyVersionInformationType 145  (143)  146
name: String;

Export of MyVersionInformationType

version: String

Usage

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

Description

Returns the version of the library.

146exports: MyVersionInformationType 145+   (143)  145  147
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.

147exports: MyVersionInformationType 145+   (143)  146  148
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.

148exports: MyVersionInformationType 145+   (143)  147  149
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.

149exports: MyVersionInformationType 145+   (143)  148  150
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.

150exports: MyVersionInformationType 145+   (143)  149
credits: List String;