One Hat Cyber Team
Your IP :
216.73.216.136
Server IP :
162.240.179.46
Server :
Linux vps-14493116.nutrivittasaude.com.br 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
Server Software :
Apache
PHP Version :
8.2.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
include
/
Imath
/
View File Name :
PyImathDecorators.h
// // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenEXR Project. // // clang-format off #ifndef INCLUDED_PYIMATH_DECORATORS_H #define INCLUDED_PYIMATH_DECORATORS_H #include <boost/python.hpp> namespace PyImath { // These function add __copy__ and __deepcopy__ methods // to python classes by simply wrapping the copy constructors // This interface is needed for using these classes with // the python copy module. template <class T> static T copy(const T& x) { return T(x); } template <class T> static T deepcopy(const T& x, boost::python::dict&) { return copy(x); } template <class T, class X1, class X2, class X3> boost::python::class_<T,X1,X2,X3>& decoratecopy(boost::python::class_<T,X1,X2,X3>& cls) { cls.def("__copy__",©<T>); cls.def("__deepcopy__",&deepcopy<T>); return cls; } } // namespace PyImath #endif // INCLUDED_PYIMATH_DECORATORS_H