MiKTeX
26.5-next
A scalable TeX distribution
Loading...
Searching...
No Matches
Libraries
MiKTeX
TeXAndFriends
include
miktex
TeXAndFriends
CharacterConverterImpl.h
Go to the documentation of this file.
1
13
14
#pragma once
15
16
#include <miktex/TeXAndFriends/config.h>
17
18
#include "
WebAppInputLine.h
"
19
20
MIKTEX_TEXMF_BEGIN_NAMESPACE;
21
22
template
<
class
PROGRAM_CLASS>
class
CharacterConverterImpl :
23
public
ICharacterConverter
24
{
25
26
public
:
27
28
CharacterConverterImpl(PROGRAM_CLASS& program) :
29
program(program)
30
{
31
}
32
33
char
* xchr()
override
34
{
35
#if defined(MIKTEX_PTEX_FAMILY)
36
MIKTEX_UNEXPECTED();
37
#else
38
MIKTEX_ASSERT(
sizeof
(program.xchr[0]) ==
sizeof
(
char
));
39
return
reinterpret_cast<
char
*
>
(&program.xchr[0]);
40
#endif
41
}
42
43
char16_t
* xchr16()
override
44
{
45
#if defined(MIKTEX_PTEX_FAMILY)
46
MIKTEX_ASSERT(
sizeof
(program.xchr[0]) ==
sizeof
(
char16_t
));
47
return
reinterpret_cast<
char16_t
*
>
(&program.xchr[0]);
48
#else
49
MIKTEX_UNEXPECTED();
50
#endif
51
}
52
53
char
* xord()
override
54
{
55
MIKTEX_ASSERT(
sizeof
(program.xord[0]) ==
sizeof
(
char
));
56
return
reinterpret_cast<
char
*
>
(&program.xord[0]);
57
}
58
59
char
* xprn()
override
60
{
61
#if defined(MIKTEX_TEX_COMPILER) || defined(MIKTEX_METAFONT)
62
MIKTEX_ASSERT(
sizeof
(program.xprn[0]) ==
sizeof
(
char
));
63
return
reinterpret_cast<
char
*
>
(&program.xprn[0]);
64
#else
65
MIKTEX_UNEXPECTED();
66
#endif
67
}
68
69
private
:
70
71
PROGRAM_CLASS& program;
72
73
};
74
75
MIKTEX_TEXMF_END_NAMESPACE;
WebAppInputLine.h
MiKTeX WebApp input line base implementation.
MiKTeX::TeXAndFriends::ICharacterConverter
Definition
WebAppInputLine.h:42
Generated by
1.14.0