Ariles
Loading...
Searching...
No Matches
extra_visitors
protobuf3
ariles2
visitors
protobuf3
writer.h
Go to the documentation of this file.
1
/**
2
@file
3
@author Alexander Sherikov
4
5
@copyright 2020 Alexander Sherikov, Licensed under the Apache License, Version 2.0.
6
(see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
7
8
@brief
9
*/
10
11
#pragma once
12
13
namespace
ariles2
14
{
15
namespace
ns_protobuf3
16
{
17
class
Writer
:
public
visitor::Base
<Writer, visitor::Parameters>
18
{
19
public
:
20
using
Parameters
=
visitor::Parameters
;
21
22
23
public
:
24
/*
25
template <class t_Ariles>
26
const Parameters &getParameters(const t_Ariles &ariles_class) const
27
{
28
return (ariles_class.arilesGetParameters(*this));
29
}
30
*/
31
32
33
template
<
class
t_Left,
class
t_Right>
34
void
visit
(
const
t_Left &left, t_Right &right,
const
std::string &
/*name*/
,
const
Parameters
¶m)
35
{
36
CPPUT_TRACE_FUNCTION
;
37
try
38
{
39
left.arilesVisit(*
this
, right, param);
40
}
41
catch
(std::exception &e)
42
{
43
CPPUT_THROW
(
"Copying failed: "
, e.what());
44
}
45
}
46
};
47
}
// namespace ns_protobuf3
48
}
// namespace ariles2
ariles2::ns_protobuf3::Writer
Definition
writer.h:18
ariles2::ns_protobuf3::Writer::visit
void visit(const t_Left &left, t_Right &right, const std::string &, const Parameters ¶m)
Definition
writer.h:34
ariles2::visitor::Base
Definition
common.h:46
ariles2::visitor::Parameters
Definition
common.h:24
CPPUT_THROW
#define CPPUT_THROW(...)
Definition
exception.h:19
ariles2
Definition
basic.h:17
CPPUT_TRACE_FUNCTION
#define CPPUT_TRACE_FUNCTION
Definition
trace.h:126
Generated by
1.9.8