29 #ifndef HPP_CORE_PARSER_ROADMAP_HH
30 #define HPP_CORE_PARSER_ROADMAP_HH
34 #include <hpp/pinocchio/serialization.hh>
41 template <
typename Parent,
typename Child>
43 using std::pair<std::string, Child>::pair;
46 template <
class Archive,
class A>
47 inline void insert(Archive& ar,
const std::pair<std::string, A*>& a) {
48 ar.insert(a.first, a.second);
51 template <
class Archive,
class Parent,
class Child>
53 ar.template insertChildClass<Parent, Child>(a.first, a.second);
56 template <
class Archive>
58 template <
class Archive,
class A,
class... B>
59 inline void inserts(Archive& ar, A& a, B&... b) {
77 std::pair<std::string, A*>
make_nvp(
const std::string& n, A* a) {
78 return std::pair<std::string, A*>(n, a);
80 template <
class Parent,
class Child>
82 const std::string& n, Child* a) {
86 template <
class Archive,
class... Args>
89 typename std::conditional<Archive::is_saving::value, std::ofstream,
90 std::ifstream>::type fs(filename);
100 #endif // HPP_CORE_PARSER_ROADMAP_HH