Skip to content

Commit 4596b1c

Browse files
committed
Add HP DeskTop text encoding and aliases recognision.
1 parent 10d9e86 commit 4596b1c

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_HPDESKTOPTEXTENCODINGTYPE
6+
#define CRAP_TEXTENCODING_IANAENCODINGS_HPDESKTOPTEXTENCODINGTYPE
7+
8+
namespace crap
9+
{
10+
using text_encoding_id_HPDesktop_t =
11+
std :: integral_constant<textEncodingType <void> :: id, textEncodingType <void> :: id :: HPDesktop>;
12+
13+
template <>
14+
struct textEncodingType<text_encoding_id_HPDesktop_t> : textEncodingType<void>
15+
{
16+
using mib = text_encoding_id_HPDesktop_t;
17+
using name = string<char, 'H', 'P', '-', 'D', 'e', 's', 'k', 'T', 'o', 'p'>;
18+
using aliases = typeList<
19+
string<char, 'H', 'P', '-', 'D', 'e', 's', 'k', 'T', 'o', 'p'>,
20+
string<char, 'c', 's', 'H', 'P', 'D', 'e', 's', 'k', 't', 'o', 'p'> >;
21+
};
22+
23+
template <>
24+
struct textEncodingType<string<char, 'c', 's', 'H', 'P', 'D', 'e', 's', 'k', 't', 'o', 'p'> >
25+
: textEncodingType<text_encoding_id_HPDesktop_t>
26+
{
27+
};
28+
29+
template <>
30+
struct textEncodingType<string<char, 'H', 'P', '-', 'D', 'e', 's', 'k', 'T', 'o', 'p'> >
31+
: textEncodingType<text_encoding_id_HPDesktop_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/HPDesktop_textencodingtype.h"
4+
#include "../textencodingtype.h"
5+
6+
#ifndef CRAP_TEXTENCODING_ALIASES_HPDESKTOPTEXTENCODINGTYPEALIAS
7+
#define CRAP_TEXTENCODING_ALIASES_HPDESKTOPTEXTENCODINGTYPEALIAS
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', 'h', 'p', 'd', 'e', 's', 'k', 't', 'o', 'p'>
15+
: textEncodingType<text_encoding_id_HPDesktop_t>
16+
{
17+
};
18+
19+
template <class CharType, CharType ... Letters>
20+
template <class PlaceHolder>
21+
struct textEncodingType<string<CharType, Letters...> > ::
22+
alias<PlaceHolder, char, 'h', 'p', 'd', 'e', 's', 'k', 't', 'o', 'p'>
23+
: textEncodingType<text_encoding_id_HPDesktop_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_HPDESKTOPTEXTENCODINGTYPEALIASESDECLARATION
4+
#define CRAP_TEXTENCODING_ALIASESDECLARATIONS_HPDESKTOPTEXTENCODINGTYPEALIASESDECLARATION
5+
6+
template <class PlaceHolder>
7+
struct alias<PlaceHolder, char, 'c', 's', 'h', 'p', 'd', 'e', 's', 'k', 't', 'o', 'p'>;
8+
9+
template <class PlaceHolder>
10+
struct alias<PlaceHolder, char, 'h', 'p', 'd', 'e', 's', 'k', 't', 'o', 'p'>;
11+
#endif

include/crap/text_encoding.d/textencodingtype.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ namespace crap
462462
#include "IANA_encodings.d/HPPiFont_textencodingtype.h"
463463
#include "IANA_encodings.d/HPMath8_textencodingtype.h"
464464
#include "IANA_encodings.d/HPPSMath_textencodingtype.h"
465+
#include "IANA_encodings.d/HPDesktop_textencodingtype.h"
465466

466467
namespace crap
467468
{
@@ -926,6 +927,7 @@ namespace crap
926927
#include "aliases_declarations.d/HPPiFont_textencodingtype_aliasesdeclaration.h"
927928
#include "aliases_declarations.d/HPMath8_textencodingtype_aliasesdeclaration.h"
928929
#include "aliases_declarations.d/HPPSMath_textencodingtype_aliasesdeclaration.h"
930+
#include "aliases_declarations.d/HPDesktop_textencodingtype_aliasesdeclaration.h"
929931
//
930932
template <CharType ... SubLetters>
931933
using aliasMaker = alias<CharType, CharType, SubLetters...>;
@@ -1177,6 +1179,7 @@ namespace crap
11771179
#include "aliases.d/HPPiFont_textencodingtype_alias.h"
11781180
#include "aliases.d/HPMath8_textencodingtype_alias.h"
11791181
#include "aliases.d/HPPSMath_textencodingtype_alias.h"
1182+
#include "aliases.d/HPDesktop_textencodingtype_alias.h"
11801183

11811184
namespace crap
11821185
{

0 commit comments

Comments
 (0)