~sole>
~sole> cat sample.cc
#include <iostream>
#include "sole.hpp"
int main()
{
sole::uuid u0 = sole::uuid0(), u1 = sole::uuid1(), u4 = sole::uuid4();
std::cout << "uuid v0 string : " << u0 << std::endl;
std::cout << "uuid v0 base62 : " << u0.base62() << std::endl;
std::cout << "uuid v0 pretty : " << u0.pretty() << std::endl << std::endl;
std::cout << "uuid v1 string : " << u1 << std::endl;
std::cout << "uuid v1 base62 : " << u1.base62() << std::endl;
std::cout << "uuid v1 pretty : " << u1.pretty() << std::endl << std::endl;
std::cout << "uuid v4 string : " << u4 << std::endl;
std::cout << "uuid v4 base62 : " << u4.base62() << std::endl;
std::cout << "uuid v4 pretty : " << u4.pretty() << std::endl << std::endl;
u1 = sole::rebuild("F81D4FAE-7DEC-11D0-A765-00A0C91E6BF6");
std::cout << "uuid v1 rebuilt: " << u1 << " -> " << u1.pretty() << std::endl;
u4 = sole::rebuild("GITheR4tLlg-BagIW20DGja");
std::cout << "uuid v4 rebuilt: " << u4 << " -> " << u4.pretty() << std::endl;
return 0;
}
~sole>
~sole> cl sample.cc sole.cpp && sample.exe
uuid v0 string : 00aed2f9-c5f8-0030-0fd8-00ffb77bd832
uuid v0 base62 : 3dNJHWv0aW-1MKpXy7mEmf
uuid v0 pretty : version=0,timestamp="03/07/2013 12:19:43",mac=00ffb77bd832,pid=4056,
uuid v1 string : 14314b83-e3ca-11e2-8b83-00ffb77bd832
uuid v1 base62 : 1jU2TXBD9t4-BycINxiP5Jh
uuid v1 pretty : version=1,timestamp="03/07/2013 12:19:43",mac=00ffb77bd832,clock_seq=2947,
uuid v4 string : fa237b32-d580-42db-aeb9-b09a1d90067e
uuid v4 base62 : LTTsO5t3jMR-F03eZqkMchC
uuid v4 pretty : version=4,randbits=fa237b32d58002db2eb9b09a1d90067e,
uuid v1 rebuilt : f81d4fae-7dec-11d0-a765-00a0c91e6bf6 -> version=1,timestamp="03/02/1997 18:43:12",mac=00a0c91e6bf6,clock_seq=10085,
uuid v4 rebuilt : bdd55e2f-6f6b-4088-8703-ddedba9456a2 -> version=4,randbits=bdd55e2f6f6b0088703ddedba9456a2,
~sole>