Skip to content

ddn.ddn

Core version information module for the DDN library.

Module Declaration

module ddn.ddn;

Manifest Constants

MAJOR

enum MAJOR = 2;

Major version number of the DDN library.


MINOR

enum MINOR = 0;

Minor version number of the DDN library.


PATCH

enum PATCH = 0;

Patch version number of the DDN library.


Functions

ddnVersion

static int ddnVersion() nothrow @nogc pure;

Returns the DDN library version as a single integer.

The version is encoded as: PATCH + MINOR * 1_000 + MAJOR * 1_000_000

Returns:

int — The encoded version number.

Attributes:

nothrow @nogc pure

Example:

import ddn.ddn;

int ver = ddnVersion();
// ver == 2_000_000 for version 2.0.0

// Version comparison
if (ddnVersion() >= 2_000_000) {
    // Use features from version 2.0.0+
}

ddnVersionString

static string ddnVersionString() nothrow @nogc pure;

Returns the DDN library version as a human-readable string.

Returns:

string — The version string in "MAJOR.MINOR.PATCH" format.

Attributes:

nothrow @nogc pure

Example:

import ddn.ddn;

string verStr = ddnVersionString();
// verStr == "2.0.0"

See Also