Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jason Chemin
curves
Commits
265eaa19
Commit
265eaa19
authored
Aug 08, 2019
by
JasonChmn
Committed by
Pierre Fernbach
Sep 03, 2019
Browse files
[Fix] Add file archive_python_binding.h
parent
795d6e9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/archive_python_binding.h
0 → 100644
View file @
265eaa19
// Copyright (c) 2015-2018, CNRS
// Authors: Justin Carpentier <jcarpent@laas.fr>
#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
{
cl
.
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__
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment