Main MRPT website
>
C++ reference for MRPT 1.4.0
mrpt
utils
integer_select.h
Go to the documentation of this file.
1
/* +---------------------------------------------------------------------------+
2
| Mobile Robot Programming Toolkit (MRPT) |
3
| http://www.mrpt.org/ |
4
| |
5
| Copyright (c) 2005-2016, Individual contributors, see AUTHORS file |
6
| See: http://www.mrpt.org/Authors - All rights reserved. |
7
| Released under BSD License. See details in http://www.mrpt.org/License |
8
+---------------------------------------------------------------------------+ */
9
10
#pragma once
11
12
#include <
mrpt/utils/mrpt_stdint.h
>
13
14
namespace
mrpt
15
{
16
namespace
utils
17
{
18
/** \addtogroup mrpt_int_select Templates to declare integers by byte count (in #include <mrpt/utils/integer_select.h>)
19
* \ingroup mrpt_base_grp
20
* @{ */
21
22
/** Usage: `int_select_by_bytecount<N>::type var;` allows defining var as a signed integer with, at least, N bytes. */
23
template
<
unsigned
int
num_
byte
s>
struct
int_select_by_bytecount
;
24
template
<>
struct
int_select_by_bytecount
<1> {
typedef
int8_t
type
; };
25
template
<>
struct
int_select_by_bytecount
<2> {
typedef
int16_t
type
; };
26
template
<>
struct
int_select_by_bytecount
<3> {
typedef
int32_t
type
; };
27
template
<>
struct
int_select_by_bytecount
<4> {
typedef
int32_t
type
; };
28
template
<>
struct
int_select_by_bytecount
<8> {
typedef
int64_t
type
; };
29
30
/** Usage: `uint_select_by_bytecount<N>::type var;` allows defining var as a unsigned integer with, at least, N bytes. */
31
template
<
unsigned
int
num_
byte
s>
struct
uint_select_by_bytecount
;
32
template
<>
struct
uint_select_by_bytecount
<1> {
typedef
uint8_t
type
; };
33
template
<>
struct
uint_select_by_bytecount
<2> {
typedef
uint16_t
type
; };
34
template
<>
struct
uint_select_by_bytecount
<3> {
typedef
uint32_t
type
; };
35
template
<>
struct
uint_select_by_bytecount
<4> {
typedef
uint32_t
type
; };
36
template
<>
struct
uint_select_by_bytecount
<8> {
typedef
uint64_t
type
; };
37
38
/** @} */
39
}
// End of namespace
40
}
// end of namespace
mrpt_stdint.h
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition:
CParticleFilter.h:17
uint32_t
unsigned long uint32_t
Definition:
pstdint.h:216
uint16_t
unsigned int uint16_t
Definition:
pstdint.h:170
int32_t
signed long int32_t
Definition:
pstdint.h:247
int16_t
signed int int16_t
Definition:
pstdint.h:194
uint8_t
unsigned char uint8_t
Definition:
pstdint.h:143
int8_t
signed char int8_t
Definition:
pstdint.h:158
mrpt::utils::int_select_by_bytecount< 1 >::type
int8_t type
Definition:
integer_select.h:24
mrpt::utils::int_select_by_bytecount< 2 >::type
int16_t type
Definition:
integer_select.h:25
mrpt::utils::int_select_by_bytecount< 3 >::type
int32_t type
Definition:
integer_select.h:26
mrpt::utils::int_select_by_bytecount< 4 >::type
int32_t type
Definition:
integer_select.h:27
mrpt::utils::int_select_by_bytecount< 8 >::type
int64_t type
Definition:
integer_select.h:28
mrpt::utils::int_select_by_bytecount
Usage: int_select_by_bytecount<N>::type var; allows defining var as a signed integer with,...
Definition:
integer_select.h:23
mrpt::utils::uint_select_by_bytecount< 1 >::type
uint8_t type
Definition:
integer_select.h:32
mrpt::utils::uint_select_by_bytecount< 2 >::type
uint16_t type
Definition:
integer_select.h:33
mrpt::utils::uint_select_by_bytecount< 3 >::type
uint32_t type
Definition:
integer_select.h:34
mrpt::utils::uint_select_by_bytecount< 4 >::type
uint32_t type
Definition:
integer_select.h:35
mrpt::utils::uint_select_by_bytecount< 8 >::type
uint64_t type
Definition:
integer_select.h:36
mrpt::utils::uint_select_by_bytecount
Usage: uint_select_by_bytecount<N>::type var; allows defining var as a unsigned integer with,...
Definition:
integer_select.h:31
Page generated by
Doxygen 1.9.6
for MRPT 1.4.0 SVN: at Sat Jan 21 06:46:15 UTC 2023