Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
serialize.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2012-2021 Euclid Science Ground Segment
3 *
4 * This library is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 3.0 of the License, or (at your option)
7 * any later version.
8 *
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 * details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef XYDATASET_SERIALIZE_H
20#define XYDATASET_SERIALIZE_H
21
23#include <boost/serialization/string.hpp>
24#include <boost/serialization/vector.hpp>
25#include <string>
26#include <vector>
27
28namespace boost {
29namespace serialization {
30
38template <typename Archive>
39void serialize(Archive&, Euclid::XYDataset::QualifiedName&, const unsigned int) {
40 // Nothing here. Everything is done in the constructor
41}
42
50template <typename Archive>
51void save_construct_data(Archive& ar, const Euclid::XYDataset::QualifiedName* t, const unsigned int) {
52 std::vector<std::string> groups = t->groups();
53 ar << groups;
54 std::string name = t->datasetName();
55 ar << name;
56}
57
65template <typename Archive>
66void load_construct_data(Archive& ar, Euclid::XYDataset::QualifiedName* t, const unsigned int) {
68 ar >> groups;
69 std::string name;
70 ar >> name;
72}
73
74} // namespace serialization
75} // namespace boost
76
77#endif // XYDATASET_SERIALIZE_H
Represents a name qualified with a set of groups.
const std::string & datasetName() const
Returns the unqualified name.
const std::vector< std::string > & groups() const
Returns the groups qualifying the name.
T move(T... args)
void serialize(Archive &archive, std::array< CellType, ND > &array, const unsigned int)
Definition array.h:37
void save_construct_data(Archive &ar, const Euclid::GridContainer::GridAxis< T > *t, const unsigned int)
Definition GridAxis.h:69
void load_construct_data(Archive &ar, Euclid::GridContainer::GridAxis< T > *t, const unsigned int)
Definition GridAxis.h:111
Definition array.h:33