Go to the documentation of this file. 14 #ifndef AB_CXXWRAP_HPP 15 #define AB_CXXWRAP_HPP 32 #define AB_CXXWRAP_GET0_CONST(cxxname, cname) \ 34 { return cname(m_ptr); } 37 #define AB_CXXWRAP_GET0(cxxname, cname) \ 39 { return cname(m_ptr); } 42 #define AB_CXXWRAP_GET1_CONST(cxxname, type1, cname) \ 43 cxxname(type1 arg1) const \ 44 { return cname(m_ptr, arg1); } 47 #define AB_CXXWRAP_GET1(cxxname, type1, cname) \ 49 { return cname(m_ptr, arg1); } 52 #define AB_CXXWRAP_SET0(cxxname, cname) \ 57 #define AB_CXXWRAP_SET1(cxxname, type1, cname) \ 58 void cxxname(type1 arg1) \ 59 { cname(m_ptr, arg1); } 65 #define AB_CXXWRAP_CONSTRUCTOR0(cxxname, cprefix) \ 67 : m_ptr(cprefix##_new()) {} 75 #define AB_CXXWRAP_CONSTRUCTORS(cxxname, cprefix) \ 77 { cprefix##_free(m_ptr); } \ 78 cxxname(const wrapped_type *other) \ 79 : m_ptr(cprefix##_dup(other)) {} \ 80 cxxname(const cxxname& other) \ 81 : m_ptr(cprefix##_dup(other.m_ptr)) {} \ 82 cxxname& operator=(const cxxname& other) \ 86 cprefix##_free(m_ptr); \ 87 m_ptr = cprefix##_dup(other.m_ptr); \ 90 operator const wrapped_type*() const \ 92 operator wrapped_type*() \ 94 const wrapped_type* ptr() const \ 100 #endif // AB_CXXWRAP_HPP