7 MyVersionInformationType

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

38* 13+   33  47
-------------------------------------------------------------------
----
---- ALLPROSE
---- Copyright (C) Ralf Hemmecke (ralf@hemmecke.de)
---- http://www.hemmecke.de/aldor
----
-------------------------------------------------------------------

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

Uses DontNeedLibraryMyAlps 37.

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.

39cat: MyVersionInformationType 39  (38)
define MyVersionInformationType:Category == with {
        exports: MyVersionInformationType 41
}

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.

41exports: MyVersionInformationType 41  (39)  42
name: String;

Export of MyVersionInformationType

version: String

Usage

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

Description

Returns the version of the library.

42exports: MyVersionInformationType 41+   (39)  41  43
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.

43exports: MyVersionInformationType 41+   (39)  42  44
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.

44exports: MyVersionInformationType 41+   (39)  43  45
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.

45exports: MyVersionInformationType 41+   (39)  44  46
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.

46exports: MyVersionInformationType 41+   (39)  45
credits: List String;