Go to file
Anthony Arnold 5d28bc1365 Can now make install. 2012-01-17 17:10:23 +10:00
ali Split some unit tests up to test more distinct functionality. Added new unit test to check that Invalid_String is thrown in From_Name. Fixed up some ignore files. 2012-01-17 13:26:45 +10:00
bin Split some unit tests up to test more distinct functionality. Added new unit test to check that Invalid_String is thrown in From_Name. Fixed up some ignore files. 2012-01-17 13:26:45 +10:00
include Switched tests to AUnit test suite. Reorganised build to use project files. New directory structure for new build. TODO: Unit test exceptions, make install option 2012-01-17 12:23:27 +10:00
lib Empty bin and lib directories required for building. 2012-01-16 00:55:48 +10:00
obj Split some unit tests up to test more distinct functionality. Added new unit test to check that Invalid_String is thrown in From_Name. Fixed up some ignore files. 2012-01-17 13:26:45 +10:00
src Can now make install. 2012-01-17 17:10:23 +10:00
support Can now make install. 2012-01-17 17:10:23 +10:00
test Can now make install. 2012-01-17 17:10:23 +10:00
.gitignore Can now make install. 2012-01-17 17:10:23 +10:00
LICENSE Added README and LICENSE files. Getting ready to go to github 2012-01-16 00:19:51 +10:00
Makefile Can now make install. 2012-01-17 17:10:23 +10:00
README.md Added From_String generator. Thinking about moving generators to subpackage. Removed To_Wide_String; decided that AdaID will only deal in Strings. It is up to the user to handle the case of stuffing them into Wide strings. Fixed bullet lists in README.md 2012-01-16 14:55:03 +10:00
adaid.gpr Can now make install. 2012-01-17 17:10:23 +10:00
adaid_debug.gpr Can now make install. 2012-01-17 17:10:23 +10:00
test.gpr Can now make install. 2012-01-17 17:10:23 +10:00

README.md

#AdaID#

AdaID is a simple Ada library for generating UUIDs. Supported operations include:

  • Generating random UUIDs
  • Generating name-based UUIDs
  • Restoring UUIDs from a string representation (Not yet implemented).
  • Converting a UUID to a string

Included is Jonh Halleck's NIST-validated implementation of SHA1 (distrubted under the GNU GPLv3).

To use the library, ensure that the latest version of GNAT is installed. Then run make, followed by an optional make test. Then, use the src/adaid.ads file and link your project with libadaid.a.

Here's an example usage:

with AdaID; use AdaID;
with Ada.Text_IO; use Ada.Text_IO;
procedure Print_Random_UUID is
	id : UUID;
begin
	Random(id);
	Put_Line(To_String(id));
end Print_Random_UUID;

Future improvements include:

  • Moving the test program to a proper unit test framework
  • Including an install option in the build process
  • General make file improvements