.::uuid++(3) | Universally Unique Identifier | .::uuid++(3) |
uuid++ - Universally Unique Identifier (C++ API)
OSSP uuid 1.6.2 (04-Jul-2008)
uuid++ is the ISO-C++ language binding of the OSSP uuid C API. It provides a thin ISO-C++ class uuid wrapping the ISO-C API type uuid_t.
The ISO-C++ Application Programming Interface (API) of OSSP uuid consists of the following components:
The constants are the same to those provided by the ISO-C API. See uuid(3) for details.
The following classes are provided:
The following methods are provided:
The following shows an example usage of the C++ API. Exception handling is omitted for code simplification and has to be re-added for production code.
/* generate a DCE 1.1 v1 UUID from system environment */ char *uuid_v1(void) { uuid id; char *str; id.make(UUID_MAKE_V1); str = id.string(); return str; } /* generate a DCE 1.1 v3 UUID from an URL */ char *uuid_v3(const char *url) { uuid id; uuid id_ns; char *str; id_ns.load("ns:URL"); id.make(UUID_MAKE_V3, &id_ns, url); str = id.string(); return str; }
OSSP uuid 1.6.2 | 04-Jul-2008 |