#include <ktoblzcheck.h>
Public Types | |
| typedef enum AccountNumberCheck::Result | Result |
| enum | Result { OK = 0, UNKNOWN = 1, ERROR = 2, BANK_NOT_KNOWN = 3 } |
Public Member Functions | |
| AccountNumberCheck () | |
| AccountNumberCheck (const std::string &filename) | |
| ~AccountNumberCheck () | |
| Result | check (const std::string &bankId, const std::string &accountId, const std::string &method="") const |
| const Record & | findBank (const std::string &bankId) const |
| unsigned int | bankCount () const |
| void | createIndex () |
Static Public Member Functions | |
| static std::string | resultToString (Result r) |
Ktoblzcheck library information | |
| static const char * | stringEncoding () |
| static const char * | libraryVersion () |
Classes | |
| class | Record |
| Available information about one bank. More... | |
Class that stores a list of known German banks, returns banks with given bank codes, and validates account numbers accordings to the bank's known validation/checking algorithms.
The list of known banks is read from the configuration file when this object is constructed.
|
|
Gives information about the success of the check
|
|
|
|
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 configure.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". |
|
|
Constructor that initialize the bank-database from a data file at 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.
|
|
|
Destructor. All entries of the bank database are deleted as well.
|
|
|
Returns the number of bank-records currently loaded |
|
||||||||||||||||
|
Check if
|
|
|
Generates an index over the bankIds. This is supposed to speed up the checking if you want to check 100s of combination (batch-processing) Currently this does nothing. The bank list structure (std::map) does not need this anyway. |
|
|
Find the info-record for a bank specified by
|
|
|
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. |
|
|
Returns a meaningful english string explaining the result value |
|
|
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 =
#ifdef KTOBLZCHECK_VERSION_MAJOR
AccountNumberCheck_stringEncoding()
#else
"ISO-8859-15"
#endif
;
This function was introduced in ktoblzcheck-1.7. |
1.4.1