libbio
Loading...
Searching...
No Matches
inc
bio
common
Primitives.h
Go to the documentation of this file.
1
/*
2
* This file is a part of the Biology project by eons LLC.
3
* Biology (aka Develop Biology) is a framework for approaching software
4
* development from a natural sciences perspective.
5
*
6
* Copyright (C) 2022 Séon O'Shannon & eons LLC
7
*
8
* This program is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU Affero General Public License as
10
* published by the Free Software Foundation, either version 3 of the
11
* License, or (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Affero General Public License for more details.
17
*
18
* You should have received a copy of the GNU Affero General Public License
19
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20
*/
21
22
#pragma once
23
24
#include "
bio/common/macro/Macros.h
"
25
#include "
bio/common/type/IsPrimitive.h
"
26
#include "
ByteStream.h
"
27
28
#include <vector>
29
#include <map>
30
#include <string>
31
#include <ostream>
32
33
namespace
bio
{
34
namespace
type {
35
43
template
<
typename
T >
44
struct
IsPrimitiveImplementation
<
TransparentWrapper
<
T
> >
45
{
46
//@formatter:off
47
#if BIO_CPP_VERSION < 14
48
static
const
bool
sValue
=
true
;
49
#else
50
static
const
bool
sValue
=
IsPrimitive< T >
();
51
#endif
52
//@formatter:on
53
};
54
55
BIO_SET_PRIMITIVE
(
String
)
56
BIO_SET_PRIMITIVE
(
const
String
)
57
58
#if BIO_CPP_VERSION < 11
59
60
BIO_SET_PRIMITIVE
(
bool
)
61
BIO_SET_PRIMITIVE
(
float
)
62
BIO_SET_PRIMITIVE
(
double
)
63
64
//This is int8_t & may cause compiler errors.
65
//BIO_SET_PRIMITIVE(char)
66
67
BIO_SET_PRIMITIVE
(::std::string)
68
69
BIO_SET_PRIMITIVE
(
int8_t
)
70
BIO_SET_PRIMITIVE
(
int16_t
)
71
BIO_SET_PRIMITIVE
(
int32_t
)
72
BIO_SET_PRIMITIVE
(
int64_t
)
73
BIO_SET_PRIMITIVE
(
uint8_t
)
74
BIO_SET_PRIMITIVE
(
uint16_t
)
75
BIO_SET_PRIMITIVE
(
uint32_t
)
76
BIO_SET_PRIMITIVE
(
uint64_t
)
77
78
#endif
79
80
}
//type namespace
81
}
//bio namespace
ByteStream.h
IsPrimitive.h
BIO_SET_PRIMITIVE
#define BIO_SET_PRIMITIVE(type)
Definition
UtilityHelperMacros.h:27
bio::Pointer
Definition
Pointer.h:115
bio::String
Definition
String.h:55
bio::TransparentWrapper
Definition
TransparentWrapper.h:64
Macros.h
bio
Definition
FinalCell.h:29
bio::type::IsPrimitiveImplementation
Definition
IsPrimitive.h:120
bio::type::IsPrimitiveImplementation::sValue
static const bool sValue
Definition
IsPrimitive.h:123
Generated by
1.9.8