foobar2000 SDK
2015-08-03
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
pfc
traits.h
Go to the documentation of this file.
1
namespace
pfc
{
2
3
class
traits_default
{
4
public
:
5
enum
{
6
realloc_safe
=
false
,
7
needs_destructor
=
true
,
8
needs_constructor
=
true
,
9
constructor_may_fail
=
true
10
};
11
};
12
13
class
traits_default_movable
{
14
public
:
15
enum
{
16
realloc_safe
=
true
,
17
needs_destructor
=
true
,
18
needs_constructor
=
true
,
19
constructor_may_fail
=
true
20
};
21
};
22
23
class
traits_rawobject
:
public
traits_default
{
24
public
:
25
enum
{
26
realloc_safe
=
true
,
27
needs_destructor
=
false
,
28
needs_constructor
=
false
,
29
constructor_may_fail
=
false
30
};
31
};
32
33
class
traits_vtable
{
34
public
:
35
enum
{
36
realloc_safe
=
true
,
37
needs_destructor
=
true
,
38
needs_constructor
=
true
,
39
constructor_may_fail
=
false
40
};
41
};
42
43
template
<
typename
T>
class
traits_t
:
public
traits_default
{};
44
45
template
<
typename
traits1,
typename
traits2>
46
class
combine_traits
{
47
public
:
48
enum
{
49
realloc_safe
= (traits1::realloc_safe && traits2::realloc_safe),
50
needs_destructor
= (traits1::needs_destructor || traits2::needs_destructor),
51
needs_constructor
= (traits1::needs_constructor || traits2::needs_constructor),
52
constructor_may_fail
= (traits1::constructor_may_fail || traits2::constructor_may_fail),
53
};
54
};
55
56
template
<
typename
type1,
typename
type2>
57
class
traits_combined
:
public
combine_traits
<traits_t<type1>,traits_t<type2> > {};
58
59
template
<
typename
T>
class
traits_t
<
T
*> :
public
traits_rawobject
{};
60
61
template
<>
class
traits_t
<char> :
public
traits_rawobject
{};
62
template
<>
class
traits_t
<unsigned char> :
public
traits_rawobject
{};
63
template
<>
class
traits_t
<signed char> :
public
traits_rawobject
{};
64
template
<>
class
traits_t
<wchar_t> :
public
traits_rawobject
{};
65
template
<>
class
traits_t
<short> :
public
traits_rawobject
{};
66
template
<>
class
traits_t
<unsigned short> :
public
traits_rawobject
{};
67
template
<>
class
traits_t
<int> :
public
traits_rawobject
{};
68
template
<>
class
traits_t
<unsigned int> :
public
traits_rawobject
{};
69
template
<>
class
traits_t
<long> :
public
traits_rawobject
{};
70
template
<>
class
traits_t
<unsigned long> :
public
traits_rawobject
{};
71
template
<>
class
traits_t
<long long> :
public
traits_rawobject
{};
72
template
<>
class
traits_t
<unsigned long long> :
public
traits_rawobject
{};
73
template
<>
class
traits_t
<bool> :
public
traits_rawobject
{};
74
75
template
<>
class
traits_t
<float> :
public
traits_rawobject
{};
76
template
<>
class
traits_t
<double> :
public
traits_rawobject
{};
77
78
template
<>
class
traits_t
<
GUID
> :
public
traits_rawobject
{};
79
80
template
<
typename
T,t_size p_count>
81
class
traits_t
<
T
[p_count]> :
public
traits_t
<T> {};
82
83
}
pfc::traits_default::constructor_may_fail
Definition:
traits.h:9
GUID
Definition:
pfc.h:71
pfc::traits_default::realloc_safe
Definition:
traits.h:6
pfc
Definition:
file_info_impl.h:22
pfc::traits_default
Definition:
traits.h:3
T
pfc::combine_traits
Definition:
traits.h:46
pfc::traits_rawobject
Definition:
traits.h:23
pfc::traits_default_movable
Definition:
traits.h:13
pfc::traits_t
Definition:
traits.h:43
pfc::traits_default::needs_constructor
Definition:
traits.h:8
pfc::traits_default::needs_destructor
Definition:
traits.h:7
pfc::traits_vtable
Definition:
traits.h:33
pfc::traits_combined
Definition:
traits.h:57
Generated by
1.8.11