Main Page | Class List | Directories | File List | Class Members | File Members

iban.h File Reference

Checking of International Bank Account Numbers (IBAN). More...

#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <map>
#include <ctype.h>

Go to the source code of this file.

IbanCheck methods

IbanCheckIbanCheck_new (const char *filename)
void IbanCheck_free (IbanCheck *p)
IbanCheck_Result IbanCheck_check_str (const IbanCheck *p, const char *iban, const char *country)
IbanCheck_Result IbanCheck_check_iban (const IbanCheck *p, const Iban *iban, const char *country)
IbanCheck_Result IbanCheck_bic_position (const IbanCheck *p, const char *iban, int *start, int *end)
const char * IbanCheck_resultText (IbanCheck_Result res)
int IbanCheck_error (const IbanCheck *p)
int IbanCheck_selftest (IbanCheck *p)

Iban methods

IbanIban_new (const char *iban, int normalize)
void Iban_free (Iban *p)
const char * Iban_transmissionForm (const Iban *iban)
const char * Iban_printableForm (Iban *iban)

Typedefs

typedef IbanCheck::Result IbanCheck_Result


Detailed Description

Checking of International Bank Account Numbers (IBAN).

This file contains the classes and C wrappers for IBAN checking.


Typedef Documentation

typedef IbanCheck::Result IbanCheck_Result
 


Function Documentation

void Iban_free Iban p  ) 
 

Default destructor.

Iban* Iban_new const char *  iban,
int  normalize
 

Constructor from a string

const char* Iban_printableForm Iban iban  ) 
 

Returns the printable format for the IBAN

const char* Iban_transmissionForm const Iban iban  ) 
 

Returns the transmission format for the IBAN

IbanCheck_Result IbanCheck_bic_position const IbanCheck p,
const char *  iban,
int *  start,
int *  end
 

Returns the position of the BIC inside the IBAN. The iban should be formally correct, if not an error Result might be returned.

Parameters:
p IbanCheck object
iban [in] IBAN in transmission format
start [out] start of BIC (0-based index)
end [out] first position after BIC (0-based index)

IbanCheck_Result IbanCheck_check_iban const IbanCheck p,
const Iban iban,
const char *  country
 

Check the formal correctness of a given iban. This function checks if the prefix is known, if the length is correct for the prefix, if the checksum is ok and if the prefix is valid for a given country (if set).

Parameters:
p IbanCheck object
iban Iban instance
country 2-character country code (ISO 3166)

IbanCheck_Result IbanCheck_check_str const IbanCheck p,
const char *  iban,
const char *  country
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
p IbanCheck object
iban IBAN in transmission format
country 2-character country code (ISO 3166)

int IbanCheck_error const IbanCheck p  ) 
 

Returns:
false if the data file could not be opened and successfully read.

void IbanCheck_free IbanCheck p  ) 
 

Default destructor

IbanCheck* IbanCheck_new const char *  filename  ) 
 

Constructor that initalizes the mappings from a data file at filename.

If the file name argument is empty, then the compile-time datafile will be used. On Windows, the location of the datafile will be looked up in the registry.

If the file could not be found or is not successfully read, the mappings will be empty. Use error() to check for such an error condition.

Parameters:
filename If empty, then the compile-time file name will be used. Otherwise the relative or absolute full filename of the data file

const char* IbanCheck_resultText IbanCheck_Result  res  ) 
 

Convert Result code into an english message string.

Note:
if the value of res is an integer not inside the enum range, a special message will be returned.
Parameters:
res Result code from check() or bic_position()

int IbanCheck_selftest IbanCheck p  ) 
 

uses the example data to test the check routines.

Returns:
false if not successful


Generated on Thu Nov 23 13:33:27 2006 for ktoblzcheck by  doxygen 1.4.1