Skip to content

Commit 37a8164

Browse files
committed
Add ISO 13 JIS C6220 jp aliases recognision.
1 parent 5d0997e commit 37a8164

3 files changed

Lines changed: 84 additions & 1 deletion

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#include <type_traits>
2+
3+
#include "../IANA_encodings.d/ISO13JISC6220jp_textencodingtype.h"
4+
#include "../textencodingtype.h"
5+
6+
#ifndef CRAP_TEXTENCODING_ALIASES_ISO13JISC6220JPTEXTENCODINGTYPEALIAS
7+
#define CRAP_TEXTENCODING_ALIASES_ISO13JISC6220JPTEXTENCODINGTYPEALIAS
8+
9+
namespace crap
10+
{
11+
template <class CharType, CharType ... Letters>
12+
template <class PlaceHolder>
13+
struct textEncodingType<string<CharType, Letters...> > ::
14+
alias<PlaceHolder, char, 'c', 's', 'i', 's', 'o', '1', '3', 'j', 'i', 's', 'c', '6', '2', '2', '0', 'j', 'p'>
15+
: textEncodingType<text_encoding_id_ISO13JISC6220jp_t>
16+
{
17+
};
18+
19+
template <class CharType, CharType ... Letters>
20+
template <class PlaceHolder>
21+
struct textEncodingType<string<CharType, Letters...> > ::
22+
alias<PlaceHolder, char, 'i', 's', 'o', 'i', 'r', '1', '3'>
23+
: textEncodingType<text_encoding_id_ISO13JISC6220jp_t>
24+
{
25+
};
26+
27+
template <class CharType, CharType ... Letters>
28+
template <class PlaceHolder>
29+
struct textEncodingType<string<CharType, Letters...> > ::
30+
alias<PlaceHolder, char, 'j', 'i', 's', 'c', '6', '2', '2', '0', '1', '9', '6', '9'>
31+
: textEncodingType<text_encoding_id_ISO13JISC6220jp_t>
32+
{
33+
};
34+
35+
template <class CharType, CharType ... Letters>
36+
template <class PlaceHolder>
37+
struct textEncodingType<string<CharType, Letters...> > ::
38+
alias<PlaceHolder, char, 'j', 'i', 's', 'c', '6', '2', '2', '0', '1', '9', '6', '9', 'j', 'p'>
39+
: textEncodingType<text_encoding_id_ISO13JISC6220jp_t>
40+
{
41+
};
42+
43+
template <class CharType, CharType ... Letters>
44+
template <class PlaceHolder>
45+
struct textEncodingType<string<CharType, Letters...> > ::
46+
alias<PlaceHolder, char, 'k', 'a', 't', 'a', 'k', 'a', 'n', 'a'>
47+
: textEncodingType<text_encoding_id_ISO13JISC6220jp_t>
48+
{
49+
};
50+
51+
template <class CharType, CharType ... Letters>
52+
template <class PlaceHolder>
53+
struct textEncodingType<string<CharType, Letters...> > ::
54+
alias<PlaceHolder, char, 'x', '2', '0', '1', '7'>
55+
: textEncodingType<text_encoding_id_ISO13JISC6220jp_t>
56+
{
57+
};
58+
}
59+
#endif
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include "../textencodingtype.h"
2+
3+
#ifndef CRAP_TEXTENCODING_ALIASESDECLARATIONS_ISO13JISC6220JPTEXTENCODINGTYPEALIASESDECLARATION
4+
#define CRAP_TEXTENCODING_ALIASESDECLARATIONS_ISO13JISC6220JPTEXTENCODINGTYPEALIASESDECLARATION
5+
6+
template <class PlaceHolder>
7+
struct alias<PlaceHolder, char, 'c', 's', 'i', 's', 'o', '1', '3', 'j', 'i', 's', 'c', '6', '2', '2', '0', 'j', 'p'>;
8+
9+
template <class PlaceHolder>
10+
struct alias<PlaceHolder, char, 'i', 's', 'o', 'i', 'r', '1', '3'>;
11+
12+
template <class PlaceHolder>
13+
struct alias<PlaceHolder, char, 'j', 'i', 's', 'c', '6', '2', '2', '0', '1', '9', '6', '9'>;
14+
15+
template <class PlaceHolder>
16+
struct alias<PlaceHolder, char, 'j', 'i', 's', 'c', '6', '2', '2', '0', '1', '9', '6', '9', 'j', 'p'>;
17+
18+
template <class PlaceHolder>
19+
struct alias<PlaceHolder, char, 'k', 'a', 't', 'a', 'k', 'a', 'n', 'a'>;
20+
21+
template <class PlaceHolder>
22+
struct alias<PlaceHolder, char, 'x', '2', '0', '1', '7'>;
23+
#endif

include/crap/text_encoding.d/textencodingtype.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ namespace crap
746746
#include "aliases_declarations.d/EUCKR_textencodingtype_aliasesdeclaration.h"
747747
#include "aliases_declarations.d/ISO2022JP_textencodingtype_aliasesdeclaration.h"
748748
#include "aliases_declarations.d/ISO2022JP2_textencodingtype_aliasesdeclaration.h"
749-
749+
#include "aliases_declarations.d/ISO13JISC6220jp_textencodingtype_aliasesdeclaration.h"
750750
//
751751
template <CharType ... SubLetters>
752752
using aliasMaker = alias<CharType, CharType, SubLetters...>;
@@ -880,6 +880,7 @@ namespace crap
880880
#include "aliases.d/EUCKR_textencodingtype_alias.h"
881881
#include "aliases.d/ISO2022JP_textencodingtype_alias.h"
882882
#include "aliases.d/ISO2022JP2_textencodingtype_alias.h"
883+
#include "aliases.d/ISO13JISC6220jp_textencodingtype_alias.h"
883884

884885
namespace crap
885886
{

0 commit comments

Comments
 (0)