Commit 265eaa19 authored by JasonChmn's avatar JasonChmn Committed by Pierre Fernbach
Browse files

[Fix] Add file archive_python_binding.h

parent 795d6e9a
// Copyright (c) 2015-2018, CNRS
// Authors: Justin Carpentier <>
#ifndef __curves_python_serialization_archive_hpp__
#define __curves_python_serialization_archive_hpp__
#include <boost/python.hpp>
namespace curves
namespace bp = boost::python;
template<typename Derived>
struct SerializableVisitor
: public boost::python::def_visitor< SerializableVisitor<Derived> >
template<class PyClass>
void visit(PyClass& cl) const
.def("saveAsText",&Derived::saveAsText,bp::args("filename"),"Saves *this inside a text file.")
.def("loadFromText",&Derived::loadFromText,bp::args("filename"),"Loads *this from a text file.")
.def("saveAsXML",&Derived::saveAsXML,bp::args("filename","tag_name"),"Saves *this inside a XML file.")
.def("loadFromXML",&Derived::loadFromXML,bp::args("filename","tag_name"),"Loads *this from a XML file.")
.def("saveAsBinary",&Derived::saveAsBinary,bp::args("filename"),"Saves *this inside a binary file.")
.def("loadFromBinary",&Derived::loadFromBinary,bp::args("filename"),"Loads *this from a binary file.")
#endif // ifndef __multicontact_api_python_serialization_archive_hpp__
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment