Home

Awesome

Ada Utility Library

Alire Alire Alire Alire Alire Alire Build Status Test Status Coverage Documentation Status Download License GitLab Commits

This Ada library contains various utility packages for building Ada applications. This includes:

Ada Util also provides a small test utility library on top of Ahven or AUnit to help in writing unit tests. Ahven is the default testing framework as it provides better reports.

Version 2.8.0 - Under development

Version 2.7.0 - Jun 2024

List all versions

Using with Alire

If you are using Alire in your project, use the following commands to use the library:

alr with utilada
alr with utilada_aws
alr with utilada_curl
alr with utilada_lzma
alr with utilada_unit
alr with utilada_xml

Using without Alire

The library needs Alire to compile but you can use it in your project if you build the library with the same compiler and then install it. For a detailed description on how you can configure, build and install the library refer to the Installation guide. Otherwise, you can easily configure and build the library with the steps described below.

The support for AWS, Curl, LZMA and XML/Ada are enabled only when a HAVE_XXX=yes configuration variable has defined. Run the setup command that records in the Makefile.conf the configuration you want to build:

make setup BUILD=debug PREFIX=/build/install HAVE_XML_ADA=yes HAVE_CURL=yes HAVE_LZMA=yes HAVE_AWS=yes

Then, build, run the test and install:

   make
   make test
   make install

To use the installed libraries, make sure your ADA_PROJECT_PATH contains the directory where you installed the libraries (configured by the PREFIX=<path> option in the setup phase). The installed GNAT projects are the same as those used when using Alire.

Samples

The samples are built by using:

cd samples
alr build
PackageExample
Util.Dates.Formatsdate.adb
Util.Beans.Objectsobjcalc.adb, jsonobj.adb, jsonread.adb
Util.Beans.Objects.Mapsjsonobj.adb, genentities.adb
Util.Beans.Objects.Vectorsdatasets.adb, jsonobj.adb
Util.Beans.Objects.Datasetsdatasets.adb
Util.Beans.Objects.Iteratorsjsonread.adb
Util.Encodersencodes.adb
Util.Encoders.AESdecrypt.adb, encrypt.adb
Util.Encoders.SHA256sha256.adb
Util.Filesrealpath.adb, gperfhash.adb
Util.Files.Rollingrolling_file.adb
Util.Files.Walktree.adb
Util.Http.Clientswget.adb, facebook.adb
Util.Log.Loggerslog.adb, syslog_appenders.adb, multipro_refs.adb, date.adb, xmlrd.adb, gperfhash.adb, multipro.adb, mapping.adb, csv_city.adb, bundles.adb
Util.Measuresmeasures.adb
Util.Processeslaunch.adb, env.adb, popen.adb
Util.Propertiesproperties.adb, proplist.adb, bundles.adb
Util.Refsmultipro_refs.adb
Util.Streams.AESdecrypt.adb, encrypt.adb
Util.Streams.Base64lzma_encrypt_b64.adb, lzma_decrypt_b64.adb, dumpcert.adb
Util.Streams.Buffered.Partsmultipart.adb, dumpcert.adb
Util.Streams.Filescopy.adb, sha256.adb, compress.adb, decompress.adb, decrypt.adb, encrypt.adb, lzma_encrypt.adb, lzma_decrypt.adb
Util.Streams.Pipeslaunch.adb, popen.adb
Util.Serialize.IO.CSVcsv_city.adb
Util.Serialize.IO.JSONserialize.adb, json.adb, jsonobj.adb, jsonread.adb, genentities.adb
Util.Serialize.IO.XMLserialize_xml.adb, xmi.adb, xmlrd.adb
Util.Serialize.Mapperscsv_reader.adb, csv_city.adb, xmi.adb, xmlrd.adb
Util.Serialize.Mappers.Record_Mapperxmi.adb, xmlrd.adb
Util.Serialize.Mappers.Vector_Mapperjson.adb, xmlrd.adb
Util.Stringscut.adb, escape.adb
Util.Strings.Tokenizerscut.adb, escape.adb
Util.Strings.Transformsescape.adb, gperfhash.adb
Util.Strings.Vectorsgperfhash.adb

Documentation

Articles