Ariles
Loading...
Searching...
No Matches
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
13namespace ariles2
14{
15 namespace ns_protobuf3
16 {
17 class Writer : public visitor::Base<Writer, visitor::Parameters>
18 {
19 public:
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 &param)
35 {
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
void visit(const t_Left &left, t_Right &right, const std::string &, const Parameters &param)
Definition writer.h:34
#define CPPUT_THROW(...)
Definition exception.h:19
#define CPPUT_TRACE_FUNCTION
Definition trace.h:126