2018-07-21 13:57:30 +02:00
|
|
|
/*
|
|
|
|
|
Copyright (C) 2018 Erik Ogenvik
|
|
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef CYPHESIS_CYPY_OPERATION_H
|
|
|
|
|
#define CYPHESIS_CYPY_OPERATION_H
|
|
|
|
|
|
|
|
|
|
#include "external/pycxx/CXX/Objects.hxx"
|
|
|
|
|
#include "external/pycxx/CXX/Extensions.hxx"
|
|
|
|
|
#include "WrapperBase.h"
|
|
|
|
|
|
|
|
|
|
#include <Atlas/Objects/RootOperation.h>
|
|
|
|
|
#include <Atlas/Objects/SmartPtr.h>
|
|
|
|
|
|
|
|
|
|
class CyPy_Operation : public WrapperBase<Atlas::Objects::Operation::RootOperation, CyPy_Operation>
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CyPy_Operation(Py::PythonClassInstance* self, Py::Tuple& args, Py::Dict& kwds);
|
|
|
|
|
|
|
|
|
|
CyPy_Operation(Py::PythonClassInstance* self, Atlas::Objects::Operation::RootOperation value);
|
|
|
|
|
|
|
|
|
|
static void init_type();
|
|
|
|
|
|
|
|
|
|
PyCxx_ssize_t sequence_length() override;
|
|
|
|
|
|
|
|
|
|
Py::Object sequence_item(Py_ssize_t) override;
|
|
|
|
|
|
|
|
|
|
Py::Object number_add(const Py::Object&) override;
|
|
|
|
|
|
|
|
|
|
Py::Object getattro(const Py::String& name) override;
|
|
|
|
|
|
|
|
|
|
int setattro(const Py::String& name, const Py::Object& attr) override;
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
Py::Object setSerialno(const Py::Tuple& args);
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_VARARGS_METHOD_DECL(CyPy_Operation, setSerialno);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object setRefno(const Py::Tuple& args);
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_VARARGS_METHOD_DECL(CyPy_Operation, setRefno);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object setFrom(const Py::Tuple& args);
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_VARARGS_METHOD_DECL(CyPy_Operation, setFrom);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object setTo(const Py::Tuple& args);
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_VARARGS_METHOD_DECL(CyPy_Operation, setTo);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object setSeconds(const Py::Tuple& args);
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_VARARGS_METHOD_DECL(CyPy_Operation, setSeconds);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object setFutureSeconds(const Py::Tuple& args);
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_VARARGS_METHOD_DECL(CyPy_Operation, setFutureSeconds);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object setName(const Py::Tuple& args);
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_VARARGS_METHOD_DECL(CyPy_Operation, setName);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object setArgs(const Py::Tuple& args);
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_VARARGS_METHOD_DECL(CyPy_Operation, setArgs);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object getSerialno();
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_NOARGS_METHOD_DECL(CyPy_Operation, getSerialno);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object isDefaultSerialno();
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_NOARGS_METHOD_DECL(CyPy_Operation, isDefaultSerialno);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object getRefno();
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_NOARGS_METHOD_DECL(CyPy_Operation, getRefno);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object getFrom();
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_NOARGS_METHOD_DECL(CyPy_Operation, getFrom);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object getTo();
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_NOARGS_METHOD_DECL(CyPy_Operation, getTo);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object getSeconds();
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_NOARGS_METHOD_DECL(CyPy_Operation, getSeconds);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object getFutureSeconds();
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_NOARGS_METHOD_DECL(CyPy_Operation, getFutureSeconds);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object getName();
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_NOARGS_METHOD_DECL(CyPy_Operation, getName);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object getArgs();
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_NOARGS_METHOD_DECL(CyPy_Operation, getArgs);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
Py::Object get_name();
|
|
|
|
|
|
2018-07-24 21:16:50 +02:00
|
|
|
PYCXX_NOARGS_METHOD_DECL(CyPy_Operation, get_name);
|
2018-07-21 13:57:30 +02:00
|
|
|
|
|
|
|
|
void addToArgs(std::vector<Atlas::Objects::Root>& args, const Py::Object& arg);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //CYPHESIS_CYPY_OPERATION_H
|