Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
atomic_serialization.h
Go to the documentation of this file.
1
27#ifndef TESSERACT_COMMON_ATOMIC_SERIALIZATION_H
28#define TESSERACT_COMMON_ATOMIC_SERIALIZATION_H
29
32#include <boost/serialization/serialization.hpp>
33#include <boost/serialization/split_free.hpp>
34#include <boost/serialization/nvp.hpp>
35#include <atomic>
37
40{
41template <class Archive, class T>
42inline void save(Archive& ar, const std::atomic<T>& t, const unsigned int)
43{
44 const T value = t.load();
46}
47
48template <class Archive, class T>
49inline void load(Archive& ar, std::atomic<T>& t, const unsigned int)
50{
51 T value;
53 t = value;
54}
55
56template <class Archive, class T>
57inline void serialize(Archive& ar, std::atomic<T>& t, const unsigned int version)
58{
59 boost::serialization::split_free(ar, t, version);
60}
61} // namespace boost::serialization
62#endif // TESSERACT_COMMON_ATOMIC_SERIALIZATION_H
Definition: polygon_mesh.h:46
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: serialization.h:45
void serialize(Archive &ar, tesseract_collision::ContactResult &g, const unsigned int version)
Definition: serialization.cpp:85
void load(Archive &ar, tesseract_collision::ContactResult &g, const unsigned int version)
Definition: serialization.cpp:67
void save(Archive &ar, const tesseract_collision::ContactResult &g, const unsigned int version)
Definition: serialization.cpp:49
object value
Definition: tesseract_common_serialization_unit.cpp:495
oa<< BOOST_SERIALIZATION_NVP(any_type);} tesseract_common::AnyPoly nany_type;{ std::ifstream ifs(tesseract_common::getTempPath()+"any_type_boost.xml");assert(ifs.good());boost::archive::xml_iarchive ia(ifs);ia > BOOST_SERIALIZATION_NVP(nany_type)