pupene
0.2.0
include
null-pupper.h
Go to the documentation of this file.
1
#
pragma
once
2
3
#
include
"pupper.h"
4
5
/** \file
6
* NopPupper was also a tempting name.
7
*/
8
namespace
pupene
{
9
/**
10
* Does nothing by itself. but can be used together with
11
* DebugPupper when inspecting existing objects.
12
*
13
* @see to_debug
14
*/
15
class
NullPupper
:
public
Pupper
<
NullPupper
> {
16
public
:
17
NullPupper
() =
default
;
18
~
NullPupper
() override =
default
;
19
20
template
<
typename
T>
21
PupPolicy
begin
(T&
/*value*/
,
const
Meta
&
/*meta*/
) {
22
return
PupPolicy
::
pup_object
;
23
}
24
25
void
end
(
const
Meta
&
/*meta*/
) {}
26
27
template
<
typename
T>
28
void
pup
(T&
/*value*/
,
const
Meta
&
/*meta*/
) {}
29
};
30
31
}
pupene::NullPupper::pup
void pup(T &, const Meta &)
Definition:
null-pupper.h:28
pupene::PupPolicy::pup_object
pup object using its component pup functions
pupene
Definition:
debug.cpp:4
pupene::NullPupper::begin
PupPolicy begin(T &, const Meta &)
Definition:
null-pupper.h:21
pupene::Meta
Holds name and type of objects.
Definition:
traits.h:7
pupene::NullPupper::~NullPupper
~NullPupper() override=default
pupene::NullPupper::end
void end(const Meta &)
Definition:
null-pupper.h:25
pupene::NullPupper::NullPupper
NullPupper()=default
pupene::NullPupper
Does nothing by itself.
Definition:
null-pupper.h:15
pupene::PupPolicy
PupPolicy
Controls an object's pup() behavior.
Definition:
pupper.h:17
pupene::Pupper
Base class for working with puppable types.
Definition:
pupper.h:83
Generated by
1.8.13