TRIQS/app4triqs 3.3.0
A TRIQS application
Loading...
Searching...
No Matches
app4triqs.hpp
Go to the documentation of this file.
1
5
6#pragma once
7#include <h5/h5.hpp>
8
9namespace app4triqs {
10
15
21 class toto {
22
23 int i = 0;
24
25 public:
26 toto() = default;
27
33 explicit toto(int i_) : i(i_) {}
34
35 ~toto() = default;
36
37 // Copy/Move construction
38 toto(toto const &) = default;
39 toto(toto &&) = default;
40
42 toto &operator=(toto const &) = default;
43 toto &operator=(toto &&) = default;
44
46 [[nodiscard]] int get_i() const { return i; }
47
53 int f(int u) { return u; }
54
56 toto operator+(toto const &b) const;
57 toto &operator+=(toto const &b);
58
60 bool operator==(toto const &b) const;
61
63 static std::string hdf5_format() { return "Toto"; }
64
65 friend void h5_write(h5::group grp, std::string subgroup_name, toto const &m);
66 friend void h5_read(h5::group grp, std::string subgroup_name, toto &m);
67
69 void serialize(auto &ar) const { ar & i; }
70 void deserialize(auto &ar) { ar & i; }
71 };
72
84 int chain(int i, int j);
85
87
88} // namespace app4triqs
toto operator+(toto const &b) const
Arithmetic operations.
Definition app4triqs.cpp:16
void serialize(auto &ar) const
Serialization.
Definition app4triqs.hpp:69
bool operator==(toto const &b) const
Comparison.
Definition app4triqs.cpp:22
toto & operator=(toto const &)=default
Copy/Move assignment.
static std::string hdf5_format()
HDF5.
Definition app4triqs.hpp:63
int get_i() const
Simple accessor.
Definition app4triqs.hpp:46
int f(int u)
Definition app4triqs.hpp:53
int chain(int i, int j)
Chain digits of two integers.
Definition app4triqs.cpp:37