74 Iban(
const std::string &iban,
bool normalize =
true);
82 return m_transmission;
88 if (m_printable.empty()) {
89 m_printable = createPrintable();
95 std::string m_transmission;
96 std::string m_printable;
99 static std::string createTransmission(
const std::string &iban_str);
101 std::string createPrintable()
const;
147 IbanCheck(
const std::string &filename =
"");
169 Result check(
const std::string &iban,
const std::string &country =
"")
const;
194 return m_IbanSpec.size() == 0;
204 static const char *m_ResultText[];
206 typedef std::vector<std::string> svector;
211 unsigned int bic_start, bic_end;
215 typedef std::map<std::string, Spec *> specmap;
222 typedef std::map<std::string, Country *> countrymap;
224 friend std ::istream &
operator>>(std::istream &is, Spec &spec);
225 friend std ::istream &
operator>>(std::istream &is, Country &c);
227 bool readSpecTable(std::istream &fin,
const std::string &stopcomment);
228 bool readCountryTable(std::istream &fin);
229 static int to_number(
char c)
234 static std::string iban2number(
const std::string &iban);
235 static int modulo97(
const std::string &number);
238 countrymap m_CountryMap;
int IbanCheck_selftest(IbanCheck *p)
const std::string & transmissionForm() const
Definition: iban.h:80
Result bic_position(const std::string &iban, int &start, int &end) const
const char * Iban_printableForm(Iban *iban)
IbanCheck::Result IbanCheck_Result
Definition: iban.h:241
the IBAN doesn't belong to the country
Definition: iban.h:128
IbanCheck_Result IbanCheck_check_iban(const IbanCheck *p, const Iban *iban, const char *country)
Iban * Iban_new(const char *iban, int normalize)
IbanCheck * IbanCheck_new(const char *filename)
Bad IBAN checksum, i.e. the IBAN probably contains a typo.
Definition: iban.h:129
int IbanCheck_error(const IbanCheck *p)
const char * Iban_transmissionForm(const Iban *iban)
bool error() const
Definition: iban.h:192
const char * IbanCheck_resultText(IbanCheck_Result res)
IBAN is too short to even check.
Definition: iban.h:124
IBAN is formally correct (length and checksum)
Definition: iban.h:123
Stores one IBAN (International Bank Account Number)
Definition: iban.h:54
IBAN has the wrong length.
Definition: iban.h:126
IBAN bank information database and IBAN verification.
Definition: iban.h:115
friend std ::istream & operator>>(std::istream &is, Spec &spec)
const std::string & printableForm()
Definition: iban.h:86
the 2-character IBAN prefix is unknown
Definition: iban.h:125
void IbanCheck_free(IbanCheck *p)
IbanCheck_Result IbanCheck_bic_position(const IbanCheck *p, const char *iban, int *start, int *end)
Result check(const Iban &iban, const std::string &country="") const
Definition: iban.h:160
IbanCheck_Result IbanCheck_check_str(const IbanCheck *p, const char *iban, const char *country)
static const char * resultText(Result res)
the country code to check against is unknown
Definition: iban.h:127
IbanCheck(const std::string &filename="")
Result
Definition: iban.h:120