Single-file header library to parse an International Driver License (IDL).
This is a C++-only alternative to idlparser-c, which uses
std::string for automatic memory managment.
IDLs are usually encoded in a PDF417 barcode.
Reading this barcode is not part of this library.
Before you include the header file in one C++ source file, you need to
define IDL_PARSER_IMPLEMENTATION to create the implementation:
#define IDL_PARSER_IMPLEMENTATION
#include "idlparser.h"
Then invoke parse_idl() with IDL data:
IDL idl = parse_idl(data);
if (idl.count < 1) {
std::cerr << "error: failed to parse IDL" << std::endl;
}
Now the structure idl contains the parsed elements of the IDL:
std::cout << "IIN: " << idl.iin << std::endl;
