InterOp
v1.3.2
Code
Issues
Download
Home
Index
Modules
Classes
Files
File List
File Members
io
interop
util
cstdint.h
Go to the documentation of this file.
1
12
#pragma once
13
#include "interop/config.h"
14
15
#ifdef HAVE_STDINT_H
16
#include <stdint.h>
17
#elif defined(HAVE_SYS_TYPES_H)
18
#include <sys/types.h>
19
#else
20
#include "
interop/util/pstdint.h
"
21
#endif
22
23
24
#if 0
25
namespace
illumina
26
{
27
namespace
interop
28
{
29
namespace
util
30
{
31
32
35
template
<
typename
T,
unsigned
::
int
16_t N>
36
struct
fixed_integer
37
{
38
enum
{
40
byte_count=N/8,
42
bit_count=N
43
};
48
operator
T
()
const
49
{
50
return
convert(data);
51
}
57
static
T
convert(
char
* pdata)
58
{
59
return
pdata[byte_count-1] << (bit_count-8) | fixed_integer<T, bit_count-1>::convert(pdata);
60
}
62
char
data[byte_count];
63
};
68
template
<
typename
T>
69
struct
fixed_integer<
T
, 1>
70
{
71
enum
{
73
byte_count=1,
75
bit_count=8
76
};
81
operator
T
()
const
82
{
83
return
data;
84
}
90
static
T
convert(
char
* pdata)
91
{
92
return
pdata[0];
93
}
95
char
data;
96
};
101
template
<
typename
T>
102
struct
fixed_integer<
T
, 0>{};
103
104
105
}
106
}
107
}
108
109
namespace
std
110
{
112
typedef
unsigned
int16_t uint16_t;
114
typedef
unsigned
int
uint32_t;
116
typedef
unsigned
long
long
uint64_t;
117
}
118
#endif
119
120
illumina
Definition:
enum_description.h:15
illumina::interop::constants::T
Definition:
enums.h:301
pstdint.h