Skip to content

Commit bc493e7

Browse files
committed
Add Ventura US text encoding and aliases recognision.
1 parent f536748 commit bc493e7

4 files changed

Lines changed: 76 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_VENTURAUSTEXTENCODINGTYPE
6+
#define CRAP_TEXTENCODING_IANAENCODINGS_VENTURAUSTEXTENCODINGTYPE
7+
8+
namespace crap
9+
{
10+
using text_encoding_id_VenturaUS_t =
11+
std :: integral_constant<textEncodingType <void> :: id, textEncodingType <void> :: id :: VenturaUS>;
12+
13+
template <>
14+
struct textEncodingType<text_encoding_id_VenturaUS_t> : textEncodingType<void>
15+
{
16+
using mib = text_encoding_id_VenturaUS_t;
17+
using name = string<char, 'V', 'e', 'n', 't', 'u', 'r', 'a', '-', 'U', 'S'>;
18+
using aliases = typeList<
19+
string<char, 'V', 'e', 'n', 't', 'u', 'r', 'a', '-', 'U', 'S'>,
20+
string<char, 'c', 's', 'V', 'e', 'n', 't', 'u', 'r', 'a', 'U', 'S'> >;
21+
};
22+
23+
template <>
24+
struct textEncodingType<string<char, 'c', 's', 'V', 'e', 'n', 't', 'u', 'r', 'a', 'U', 'S'> >
25+
: textEncodingType<text_encoding_id_VenturaUS_t>
26+
{
27+
};
28+
29+
template <>
30+
struct textEncodingType<string<char, 'V', 'e', 'n', 't', 'u', 'r', 'a', '-', 'U', 'S'> >
31+
: textEncodingType<text_encoding_id_VenturaUS_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/VenturaUS_textencodingtype.h"
4+
#include "../textencodingtype.h"
5+
6+
#ifndef CRAP_TEXTENCODING_ALIASES_VENTURAUSTEXTENCODINGTYPEALIAS
7+
#define CRAP_TEXTENCODING_ALIASES_VENTURAUSTEXTENCODINGTYPEALIAS
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', 'u', 's'>
15+
: textEncodingType<text_encoding_id_VenturaUS_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', 'u', 's'>
23+
: textEncodingType<text_encoding_id_VenturaUS_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_VENTURAUSTEXTENCODINGTYPEALIASESDECLARATION
4+
#define CRAP_TEXTENCODING_ALIASESDECLARATIONS_VENTURAUSTEXTENCODINGTYPEALIASESDECLARATION
5+
6+
template <class PlaceHolder>
7+
struct alias<PlaceHolder, char, 'c', 's', 'v', 'e', 'n', 't', 'u', 'r', 'a', 'u', 's'>;
8+
9+
template <class PlaceHolder>
10+
struct alias<PlaceHolder, char, 'v', 'e', 'n', 't', 'u', 'r', 'a', 'u', 's'>;
11+
#endif

‎include/crap/text_encoding.d/textencodingtype.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ namespace crap
449449
#include "IANA_encodings.d/Windows31Latin5_textencodingtype.h"
450450
#include "IANA_encodings.d/HPRoman8_textencodingtype.h"
451451
#include "IANA_encodings.d/AdobeStandardEncoding_textencodingtype.h"
452+
#include "IANA_encodings.d/VenturaUS_textencodingtype.h"
452453

453454
namespace crap
454455
{
@@ -900,6 +901,7 @@ namespace crap
900901
#include "aliases_declarations.d/Windows31Latin5_textencodingtype_aliasesdeclaration.h"
901902
#include "aliases_declarations.d/HPRoman8_textencodingtype_aliasesdeclaration.h"
902903
#include "aliases_declarations.d/AdobeStandardEncoding_textencodingtype_aliasesdeclaration.h"
904+
#include "aliases_declarations.d/VenturaUS_textencodingtype_aliasesdeclaration.h"
903905
//
904906
template <CharType ... SubLetters>
905907
using aliasMaker = alias<CharType, CharType, SubLetters...>;
@@ -1138,6 +1140,7 @@ namespace crap
11381140
#include "aliases.d/Windows31Latin5_textencodingtype_alias.h"
11391141
#include "aliases.d/HPRoman8_textencodingtype_alias.h"
11401142
#include "aliases.d/AdobeStandardEncoding_textencodingtype_alias.h"
1143+
#include "aliases.d/VenturaUS_textencodingtype_alias.h"
11411144

11421145
namespace crap
11431146
{

0 commit comments

Comments
 (0)