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

ktoblzcheck.h File Reference

Checking of German BLZ and account numbers. More...

#include <string>
#include <map>

Go to the source code of this file.

AccountNumberCheck methods

AccountNumberCheckAccountNumberCheck_new ()
AccountNumberCheckAccountNumberCheck_new_file (const char *filename)
void AccountNumberCheck_delete (AccountNumberCheck *a)
AccountNumberCheck_Result AccountNumberCheck_check (const AccountNumberCheck *a, const char *bankId, const char *accountId)
const AccountNumberCheck_RecordAccountNumberCheck_findBank (const AccountNumberCheck *a, const char *bankId)
unsigned int AccountNumberCheck_bankCount (const AccountNumberCheck *a)
void AccountNumberCheck_createIndex (AccountNumberCheck *a)

Ktoblzcheck library information

const char * AccountNumberCheck_stringEncoding ()
const char * AccountNumberCheck_libraryVersion ()

AccountNumberCheck_Record methods

void AccountNumberCheck_Record_delete (AccountNumberCheck_Record *a)
AccountNumberCheck_RecordAccountNumberCheck_Record_copy (const AccountNumberCheck_Record *a)
unsigned long AccountNumberCheck_Record_bankId (const AccountNumberCheck_Record *a)
const char * AccountNumberCheck_Record_bankName (const AccountNumberCheck_Record *a)
const char * AccountNumberCheck_Record_location (const AccountNumberCheck_Record *a)




typedef AccountNumberCheck::Result AccountNumberCheck_Result
typedef AccountNumberCheck::Record AccountNumberCheck_Record

Detailed Description

Checking of German BLZ and account numbers.

This file contains the classes and C wrappers for checking German BLZ (bank codes) and account numbers.

Define Documentation


The major version number of this library.

Introduced in ktoblzcheck-1.10.


The minor version number of this library.

Introduced in ktoblzcheck-1.10.

Typedef Documentation

typedef AccountNumberCheck::Record AccountNumberCheck_Record

typedef AccountNumberCheck::Result AccountNumberCheck_Result

Function Documentation

unsigned int AccountNumberCheck_bankCount const AccountNumberCheck a  ) 

Returns the number of bank-records currently loaded

AccountNumberCheck_Result AccountNumberCheck_check const AccountNumberCheck a,
const char *  bankId,
const char *  accountId

Check if bankId and accountId form a valid combination.

The returned value is simply an integer. The meanings of each integer values are defined in the AccountNumberCheck::Result enum, which is the following:

  • 0 everything is ok, account and bank match
  • 1 Could not be validated because the validation algorithm is unknown/unimplemented in ktoblzcheck
  • 2 account and bank probably do not match
  • 3 No bank with the specified bankid could be found

a The AccountNumberCheck object
bankId The bank code (BLZ) of the bank to test
accountId The account id to check

void AccountNumberCheck_createIndex AccountNumberCheck a  ) 

Generates an index over the bankIds.
Currently not implemented.

void AccountNumberCheck_delete AccountNumberCheck a  ) 

Destructor. All entries of the bank database are deleted as well.

This destructor also destroys any references that have been returned by AccountNumberCheck_findBank()! You have to make sure not to use these references any longer after this destructor has been called.

const AccountNumberCheck_Record* AccountNumberCheck_findBank const AccountNumberCheck a,
const char *  bankId

Find the info-record for a bank specified by bankId or otherwise return NULL.

The returned objects are still owned by this object! You have to make sure not to use the returned references after the destructor AccountNumberCheck_delete() has been called.
A pointer to the resulting bank object, or NULL if no matching bank could be found. The returned object is still owned by this AccountNumberObject and it becomes invalid if the AcccountNumberObject is being deleted.

const char* AccountNumberCheck_libraryVersion  ) 

Returns the value of ktoblzcheck's configuration variable VERSION, which can be "1.6" or something similar.

This function was introduced in ktoblzcheck-1.7.

AccountNumberCheck* AccountNumberCheck_new  ) 

Default Constructor.

This constructor also initializes the bank-database. The bank data is obtained from the location specified at compiler time. Default is $prefix/share/ktoblzcheck/bankdata.txt (set in where default for $prefix is /usr/local.

On Windows, this constructor also looks up the location of the bank data in the registry in the key HKEY_LOCAL_MACHINE/Software/Ktoblzcheck/Paths, key "datadir".

AccountNumberCheck* AccountNumberCheck_new_file const char *  filename  ) 

Constructor that initialize the bank-database from a data file at filename.

If the file could not be found, then the resulting AccountNumberCheck object simply has an empty bank database and a message is printed to stderr.

filename The absolute location of the KTOBLZCheck-database

unsigned long AccountNumberCheck_Record_bankId const AccountNumberCheck_Record a  ) 

Returns the id of the bank (german BLZ)

const char* AccountNumberCheck_Record_bankName const AccountNumberCheck_Record a  ) 

Returns the name of the bank as listed in the file of the Deutsche Bundesbank

AccountNumberCheck_Record* AccountNumberCheck_Record_copy const AccountNumberCheck_Record a  ) 

Copy constructor. The returned object will be owned by the caller and has to be deleted by the caller when no longer used. FIXME: Needs to be tested whether it works correctly -- internally it uses the automatically synthetized copy constructor of the C++ compiler.

void AccountNumberCheck_Record_delete AccountNumberCheck_Record a  ) 


const char* AccountNumberCheck_Record_location const AccountNumberCheck_Record a  ) 

Returns the city where the bank is located

const char* AccountNumberCheck_stringEncoding  ) 

Returns the character encoding that is used when strings are returned. So far this has been "ISO-8859-15" (up to and including version ktoblzcheck-1.11) but at some point in the future it might change into "UTF-8".

To obtain the encoding string in your application in a form that is backward-compatible to all ktoblzcheck-versions, do the following:

    const char *ktoblzcheck_encoding = 

This function was introduced in ktoblzcheck-1.7.

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