atesdal icon

wat

atesdal | PRO | 08/26/21 05:13:00 PM UTC | 0 ⭐ | 1283 👁️ | Never ⏰ | []
C++ |

720 B

|

None

|

0 👍

/

0 👎

// CType.h
namespace CType
{
    typedef struct
    {
        int a, b, c;
    } Specific_C_Type;
}
 
// CFunc.h
namespace CType
{
    extern "C"
    {
        void _C_Func_Does_Shit (
            // some params
            Specific_C_Type*    a_param
        );
    }
}
 
// CPPProxyTemplate.h
template<typename ProxyStruct>
struct ProxyTemplate : public ProxyStruct
{
    ProxyTemplate() {};
    ProxyTemplate(const ProxyStruct& e) : ProxyStruct(e) {};
}
 
// CPPProxyType.h
namespace CPPType
{
    struct Specific_C_Type_Proxy
    {
        int a, b, c;
    };
}
 
// CPPType.h
namespace CPPType
{
    using Specific_C_Type = ProxyTemplate<Specific_C_Type_Proxy>;
}
 
// CPPFunc.h
namespace CPPType
{
    void Do_C_Func(
        // some params
        Specific_C_Type& a_param
    );
}

Comments