Skip to content

kurzdigital/idlparser-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IDL Parser for C++

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.

Barcode

IDLs are usually encoded in a PDF417 barcode.

AAMVA sample

Reading this barcode is not part of this library.

How to use

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"

How to parse an IDL

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;

About

C++ Single-file header library to parse an IDL

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published