Bond
 
Loading...
Searching...
No Matches
null.h
1// Copyright (c) Microsoft. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
4#pragma once
5
6#include <bond/core/config.h>
7
8#include "detail/tags.h"
9
10namespace bond
11{
12
13class Null
14 : public DeserializingTransform
15{
16public:
17 void Begin(const Metadata&) const
18 {}
19
20 void End() const
21 {}
22
23 void UnknownEnd() const
24 {}
25
26 template <typename T>
27 bool Base(const T& base) const
28 {
29 return Apply(*this, base);
30 }
31
32 template <typename T, template <typename BufferT, typename MarshaledBondedProtocolsT> class Reader, typename Buffer, typename MarshaledBondedProtocols>
33 bool Base(const bonded<T, Reader<Buffer, MarshaledBondedProtocols>&>& base) const
34 {
35 return Apply<MarshaledBondedProtocols>(*this, base);
36 }
37
38 template <typename T>
39 bool Field(uint16_t, const Metadata&, const T&) const
40 {
41 return false;
42 }
43
44 template <typename T>
45 bool UnknownField(uint16_t, const T&) const
46 {
47 return false;
48 }
49};
50
51}
namespace bond
Definition: apply.h:17