Move some code stubs

This commit is contained in:
Yorick de Wid 2020-10-24 23:54:50 +02:00
parent c93ff49861
commit 0e533afb4d
1 changed files with 75 additions and 76 deletions

View File

@ -30,13 +30,6 @@ extern "C"
#include <regex>
extern "C"
{
PG_MODULE_MAGIC;
using Iban = char;
}
class Specification {
public:
Specification(std::string structure, size_t length)
@ -120,7 +113,7 @@ static bool iso7064Mod97_10(std::string iban) {
}
/**
* parse the bban structure used to configure each iban specification and returns a matching regular expression.
* Parse the IBAN structure used to configure each iban specification and returns a matching regular expression.
* a structure is composed of blocks of 3 characters (one letter and 2 digits). each block represents
* a logical group in the typical representation of the bban. for each group, the letter indicates which characters
* are allowed in this group and the following 2-digits number tells the length of the group.
@ -362,7 +355,7 @@ Validate::Validate() {
/**
* Separate CXX and C logic to minimize unexpected or malformed symbols due to
* language conversions. Also catch all exceptions the std++ can throw since
* language conversions. Also demark all exceptions the std++ can throw since
* PostgreSQL is not able to handle them.
*
* @param {string} iban
@ -403,6 +396,11 @@ bool account_validate_str(char *iban) {
extern "C"
{
PG_MODULE_MAGIC;
typedef char Iban;
/**************************************************************************
* Input/Output functions
**************************************************************************/
@ -477,4 +475,5 @@ extern "C"
PG_RETURN_BOOL(result);
}
}
} // extern "C"