ocean.util.uuid.RandomGen

Most people who want UUIDs will generate small numbers of them (maybe a few hundred thousand) and not require a huge amount of uniqueness (just for this one application). This module provides a convenient way to obtain that behavior.

To streamline your usage, this module publicly imports Uuid, so you can import this module alone.

To use this module, just:

import ocean.util.uuid.RandomGen;

Uuid id = randUuid.next;

Public Imports

ocean.util.uuid.Uuid
public import ocean.util.uuid.Uuid;

Members

Variables

randUuid
UuidGen randUuid;

The default random UUID generator. You can set this if you need to generate UUIDs in another manner and already have code pointing to this module.

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).