BEAST/BSE - Better Audio System and Sound Engine
0.8.2
|
00001 // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html 00002 #ifndef __BSE_CXX_CLOSURE_H__ 00003 #define __BSE_CXX_CLOSURE_H__ 00004 00005 #include <bse/bsecxxvalue.hh> 00006 #include <bse/bsecxxarg.hh> 00007 00008 namespace Bse { 00009 00010 class CxxClosure { 00011 GClosure *glib_closure; 00012 CxxClosure& operator= (const CxxClosure &c); 00013 explicit CxxClosure (const CxxClosure &c); 00014 protected: 00015 String sig_tokens; 00016 virtual void operator() (Value *return_value, 00017 const Value *param_values, 00018 gpointer invocation_hint, 00019 gpointer marshal_data) = 0; 00020 public: 00021 explicit CxxClosure (); 00022 virtual ~CxxClosure (); 00023 GClosure* gclosure (); 00024 const String signature () { return sig_tokens; } 00025 }; 00026 00027 /* include generated CxxClosure* Closure (class T*, ... (T::*f) (...)); constructors */ 00028 #include <bse/bsegenclosures.hh> 00029 00030 } // Bse 00031 00032 #endif /* __BSE_CXX_CLOSURE_H__ */