Skip to content

Commit b072c7c

Browse files
committed
Add Ventura International text encoding and aliases recognision.
1 parent bc493e7 commit b072c7c

4 files changed

Lines changed: 77 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#include <type_traits>
2+
3+
#include "../textencodingtype.h"
4+
5+
#ifndef CRAP_TEXTENCODING_IANAENCODINGS_VENTURAINTERNATIONALTEXTENCODINGTYPE
6+
#define CRAP_TEXTENCODING_IANAENCODINGS_VENTURAINTERNATIONALTEXTENCODINGTYPE
7+
8+
namespace crap
9+
{
10+
using text_encoding_id_VenturaInternational_t =
11+
std :: integral_constant<textEncodingType <void> :: id, textEncodingType <void> :: id :: VenturaInternational>;
12+
13+
template <>
14+
struct textEncodingType<text_encoding_id_VenturaInternational_t> : textEncodingType<void>
15+
{
16+
using mib = text_encoding_id_VenturaInternational_t;
17+
using name = string<char, 'V', 'e', 'n', 't', 'u', 'r', 'a', '-', 'I', 'n', 't', 'e', 'r', 'n', 'a', 't', 'i', 'o', 'n', 'a', 'l'>;
18+
using aliases = typeList<
19+
string<char, 'V', 'e', 'n', 't', 'u', 'r', 'a', '-', 'I', 'n', 't', 'e', 'r', 'n', 'a', 't', 'i', 'o', 'n', 'a', 'l'>,
20+
string<char, 'c', 's', 'V', 'e', 'n', 't', 'u', 'r', 'a', 'I', 'n', 't', 'e', 'r', 'n', 'a', 't', 'i', 'o', 'n', 'a', 'l'> >;
21+
};
22+
23+
template <>
24+
struct textEncodingType<string<char, 'c', 's', 'V', 'e', 'n', 't', 'u', 'r', 'a', 'I', 'n', 't', 'e', 'r', 'n', 'a', 't', 'i', 'o', 'n', 'a', 'l'> >
25+
: textEncodingType<text_encoding_id_VenturaInternational_t>
26+
{
27+
};
28+
29+
template <>
30+
struct textEncodingType<string<char, 'V', 'e', 'n', 't', 'u', 'r', 'a', '-', 'I', 'n', 't', 'e', 'r', 'n', 'a', 't', 'i', 'o', 'n', 'a', 'l'> >
31+
: textEncodingType<text_encoding_id_VenturaInternational_t>
32+
{
33+
};
34+
}
35+
#endif
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include <type_traits>
2+
3+
#include "../IANA_encodings.d/VenturaInternational_textencodingtype.h"
4+
#include "../textencodingtype.h"
5+
6+
#ifndef CRAP_TEXTENCODING_ALIASES_VENTURAINTERNATIONALTEXTENCODINGTYPEALIAS
7+
#define CRAP_TEXTENCODING_ALIASES_VENTURAINTERNATIONALTEXTENCODINGTYPEALIAS
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', 'v', 'e', 'n', 't', 'u', 'r', 'a', 'i', 'n', 't', 'e', 'r', 'n', 'a', 't', 'i', 'o', 'n', 'a', 'l'>
15+
: textEncodingType<text_encoding_id_VenturaInternational_t>
16+
{
17+
};
18+
19+
template <class CharType, CharType ... Letters>
20+
template <class PlaceHolder>
21+
struct textEncodingType<string<CharType, Letters...> > ::
22+
alias<PlaceHolder, char, 'v', 'e', 'n', 't', 'u', 'r', 'a', 'i', 'n', 't', 'e', 'r', 'n', 'a', 't', 'i', 'o', 'n', 'a', 'l'>
23+
: textEncodingType<text_encoding_id_VenturaInternational_t>
24+
{
25+
};
26+
}
27+
#endif
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include "../textencodingtype.h"
2+
3+
#ifndef CRAP_TEXTENCODING_ALIASESDECLARATIONS_VENTURAINTERNATIONALTEXTENCODINGTYPEALIASESDECLARATION
4+
#define CRAP_TEXTENCODING_ALIASESDECLARATIONS_VENTURAINTERNATIONALTEXTENCODINGTYPEALIASESDECLARATION
5+
6+
template <class PlaceHolder>
7+
struct alias<PlaceHolder, char, 'c', 's', 'v', 'e', 'n', 't', 'u', 'r', 'a', 'i', 'n', 't', 'e', 'r', 'n', 'a', 't', 'i', 'o', 'n', 'a', 'l'>;
8+
9+
template <class PlaceHolder>
10+
struct alias<PlaceHolder, char, 'v', 'e', 'n', 't', 'u', 'r', 'a', 'i', 'n', 't', 'e', 'r', 'n', 'a', 't', 'i', 'o', 'n', 'a', 'l'>;
11+
#endif

include/crap/text_encoding.d/textencodingtype.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ namespace crap
450450
#include "IANA_encodings.d/HPRoman8_textencodingtype.h"
451451
#include "IANA_encodings.d/AdobeStandardEncoding_textencodingtype.h"
452452
#include "IANA_encodings.d/VenturaUS_textencodingtype.h"
453+
#include "IANA_encodings.d/VenturaInternational_textencodingtype.h"
453454

454455
namespace crap
455456
{
@@ -902,6 +903,8 @@ namespace crap
902903
#include "aliases_declarations.d/HPRoman8_textencodingtype_aliasesdeclaration.h"
903904
#include "aliases_declarations.d/AdobeStandardEncoding_textencodingtype_aliasesdeclaration.h"
904905
#include "aliases_declarations.d/VenturaUS_textencodingtype_aliasesdeclaration.h"
906+
#include "aliases_declarations.d/VenturaInternational_textencodingtype_aliasesdeclaration.h"
907+
905908
//
906909
template <CharType ... SubLetters>
907910
using aliasMaker = alias<CharType, CharType, SubLetters...>;
@@ -1141,6 +1144,7 @@ namespace crap
11411144
#include "aliases.d/HPRoman8_textencodingtype_alias.h"
11421145
#include "aliases.d/AdobeStandardEncoding_textencodingtype_alias.h"
11431146
#include "aliases.d/VenturaUS_textencodingtype_alias.h"
1147+
#include "aliases.d/VenturaInternational_textencodingtype_alias.h"
11441148

11451149
namespace crap
11461150
{

0 commit comments

Comments
 (0)