atesdal

wat

Aug 26th, 2021
1,323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. // CType.h
  2. namespace CType
  3. {
  4.     typedef struct
  5.     {
  6.         int a, b, c;
  7.     } Specific_C_Type;
  8. }
  9.  
  10. // CFunc.h
  11. namespace CType
  12. {
  13.     extern "C"
  14.     {
  15.         void _C_Func_Does_Shit (
  16.             // some params
  17.             Specific_C_Type*    a_param
  18.         );
  19.     }
  20. }
  21.  
  22. // CPPProxyTemplate.h
  23. template<typename ProxyStruct>
  24. struct ProxyTemplate : public ProxyStruct
  25. {
  26.     ProxyTemplate() {};
  27.     ProxyTemplate(const ProxyStruct& e) : ProxyStruct(e) {};
  28. }
  29.  
  30. // CPPProxyType.h
  31. namespace CPPType
  32. {
  33.     struct Specific_C_Type_Proxy
  34.     {
  35.         int a, b, c;
  36.     };
  37. }
  38.  
  39. // CPPType.h
  40. namespace CPPType
  41. {
  42.     using Specific_C_Type = ProxyTemplate<Specific_C_Type_Proxy>;
  43. }
  44.  
  45. // CPPFunc.h
  46. namespace CPPType
  47. {
  48.     void Do_C_Func(
  49.         // some params
  50.         Specific_C_Type& a_param
  51.     );
  52. }
Advertisement
Add Comment
Please, Sign In to add comment