uobject.hh

Go to the documentation of this file.
00001 
00021 #ifndef URBI_UOBJECT_HH
00022 # define URBI_UOBJECT_HH
00023 
00024 # include <string>
00025 # include <list>
00026 # include <algorithm>
00027 
00028 # include "libport/singleton-ptr.hh"
00029 # include "libport/ufloat.h"
00030 # include "libport/hash.hh"
00031 
00032 # include "urbi/fwd.hh"
00033 # include "urbi/ubinary.hh"
00034 # include "urbi/utypes-common.hh"
00035 # include "urbi/uvalue.hh"
00036 # include "urbi/uvar.hh"
00037 
00039 # define UStart(x)                                                      \
00040   ::urbi::URBIStarter<x> x ##  ____URBI_object(std::string(# x),        \
00041                                                ::urbi::objectlist)
00042 
00044 # define UStartRename(x,name)                                           \
00045   ::urbi::URBIStarter<x> x ##  ____URBI_object(std::string(# name),     \
00046                                                ::urbi::objectlist)
00047 
00049 # define UStartHub(x)                                                   \
00050   ::urbi::URBIStarterHub<x> x ##  ____URBI_object(std::string(# x),     \
00051                                                   ::urbi::objecthublist)
00052 
00053 
00059 # define UBindVar(obj,x) x.init(__name,# x)
00060 
00068 # define UOwned(x) x.setOwned()
00069 // for backward compatibility
00070 # define USensor(x) x.setOwned()
00071 
00077 # define UBindFunction(obj,x)                                           \
00078   ::urbi::createUCallback(__name, "function", this,                     \
00079                           (&obj::x),__name+"."+std::string(# x),        \
00080                           ::urbi::functionmap)
00081 
00087 # define UBindEvent(obj,x)                                              \
00088   ::urbi::createUCallback(__name, "event", this,                        \
00089                           (&obj::x),__name+"."+std::string(# x),        \
00090                           ::urbi::eventmap)
00091 
00098 # define UBindEventEnd(obj,x,fun)                                       \
00099   ::urbi::createUCallback(__name, "eventend", this,                     \
00100                           (&obj::x),(&obj::fun),__name+"."+std::string(# x), \
00101                           ::urbi::eventendmap)
00102 
00104 # define URegister(hub)                                         \
00105   do {                                                          \
00106     objecthub = ::urbi::getUObjectHub((std::string) #hub);      \
00107     if (objecthub)                                              \
00108       objecthub->addMember(dynamic_cast<UObject*>(this));       \
00109     else                                                        \
00110       ::urbi::echo("Error: hub name '%s' is unknown\n", #hub);  \
00111   } while (0)
00112 
00113 
00114 //macro to send urbi commands
00115 # ifndef URBI
00116 
00119 #   define URBI(a) ::urbi::uobject_unarmorAndSend(# a)
00120 # endif
00121 
00122 
00123 namespace urbi
00124 {
00125 
00126   // A few list and hashtable types
00127   typedef libport::hash_map_type<std::string, std::list<UGenericCallback*> >::type UTable;
00128   typedef libport::hash_map_type<std::string, std::list<UVar*> >::type UVarTable;
00129   typedef std::list<baseURBIStarter*> UStartlist;
00130   typedef std::list<baseURBIStarterHub*> UStartlistHub;
00131   typedef std::list<UTimerCallback*> UTimerTable;
00132   typedef std::list<UObject*> UObjectList;
00133 
00134   typedef int UReturn;
00135 
00136   // Two singleton lists to handle the object and hubobject registration.
00137   EXTERN_STATIC_INSTANCE(UStartlist, objectlist);
00138   EXTERN_STATIC_INSTANCE(UStartlistHub, objecthublist);
00139 
00140   // Lists and hashtables used.
00141   extern UVarTable varmap;
00142   extern UTable functionmap;
00143   extern UTable eventmap;
00144   extern UTable eventendmap;
00145   extern UTable monitormap;
00146   extern UTable accessmap;
00147 
00148   // Timer and update maps.
00149   extern UTimerTable timermap;
00150   extern UTimerTable updatemap;
00151 
00152   // For remote mode.
00153   extern void main(int argc, char *argv[]);
00154 
00157   extern UObject* dummyUObject;
00158 
00159   // Global function of the urbi:: namespace to access kernel features
00160 
00162   void echo(const char * format, ... );
00164   UObjectHub* getUObjectHub(const std::string& n);
00166   UObject* getUObject(const std::string& n);
00167 
00170   void uobject_unarmorAndSend(const char * str);
00172   void send(const char* str);
00174   void send(void* buf,int size);
00175 
00177 
00181   class UGenericCallback
00182   {
00183   public:
00184     UGenericCallback(const std::string& objname,
00185                      const std::string& type,
00186                      const std::string& name,
00187                      int size, UTable &t);
00188     UGenericCallback(const std::string& objname,
00189                      const std::string& type,
00190                      const std::string& name, UTable &t);
00191     virtual ~UGenericCallback();
00192     std::string getName() { return name;};
00193 
00194     virtual UValue __evalcall(UList &param)  = 0;
00195 
00197     void   *storage;
00199     ufloat period;
00201     int    nbparam;
00203     std::string objname;
00204 
00205   private:
00206     std::string name;
00207   };
00208 
00209 
00211 
00214   class UTimerCallback
00215   {
00216   public:
00217     UTimerCallback(const std::string& objname, ufloat period, UTimerTable &tt);
00218     virtual ~UTimerCallback();
00219 
00220     virtual void call() = 0;
00221 
00222     ufloat period;
00223     ufloat lastTimeCalled;
00224     std::string objname;
00225   };
00226 
00227   // UTimerCallback subclasses
00228 
00229   template <class T>
00230   class UTimerCallbackobj : public UTimerCallback
00231   {
00232   public:
00233     UTimerCallbackobj(const std::string& objname,
00234                       ufloat period, T* obj, int (T::*fun) (), UTimerTable &tt)
00235       : UTimerCallback(objname, period,tt), obj(obj), fun(fun)
00236     {}
00237 
00238     virtual void call()
00239     {
00240       ((*obj).*fun)();
00241     }
00242   private:
00243     T* obj;
00244     int (T::*fun) ();
00245   };
00246 
00247 
00252   class UObject
00253   {
00254   public:
00255 
00256     UObject(const std::string&);
00258     UObject(int);
00259     virtual ~UObject();
00260 
00262     template <class T>
00263     void UNotifyChange (UVar& v, int (T::*fun) ())
00264     {
00265       createUCallback(__name, "var", (T*)this, fun, v.get_name(), monitormap);
00266     }
00267 
00269     template <class T>
00270     void UNotifyChange (UVar& v, int (T::*fun) (UVar&))
00271     {
00272       UGenericCallback* cb =
00273         createUCallback(__name, "var", (T*)this, fun, v.get_name(), monitormap);
00274       if (cb)
00275         cb->storage = &v;
00276     }
00277 
00279     template <class T>
00280     void UNotifyOnRequest (UVar& v, int (T::*fun) ())
00281     {
00282       createUCallback(__name, "var_onrequest", (T*)this,
00283                       fun, v.get_name(), monitormap);
00284     }
00285 
00287     template <class T>
00288     void UNotifyOnRequest (UVar& v, int (T::*fun) (UVar&))
00289     {
00290       UGenericCallback* cb =
00291         createUCallback(__name, "var_onrequest", (T*)this,
00292                         fun, v.get_name(), monitormap);
00293       if (cb)
00294         cb->storage = &v;
00295     }
00296 
00298     template <class T>
00299     void UNotifyChange (const std::string& name, int (T::*fun) ())
00300     {
00301       createUCallback(__name, "var", (T*)this, fun, name, monitormap);
00302     }
00303 
00305     template <class T>
00306     void UNotifyChange (const std::string& name, int (T::*fun) (UVar&))
00307     {
00308       UGenericCallback* cb =
00309         createUCallback(__name, "var", (T*)this, fun, name, monitormap);
00310       if (cb)
00311         cb->storage = new UVar(name);
00312     }
00313 
00315     template <class T>
00316     void UNotifyAccess (UVar& v, int (T::*fun) (UVar&))
00317     {
00318       UGenericCallback* cb =
00319         createUCallback(__name, "varaccess", (T*)this,
00320                         fun, v.get_name(), accessmap);
00321       if (cb)
00322         cb->storage = &v;
00323     }
00324 
00326     template <class T>
00327     void USetTimer(ufloat t, int (T::*fun) ())
00328     {
00329       new UTimerCallbackobj<T> (__name, t,(T*)this, fun, timermap);
00330     }
00331 
00333     void USync(UVar &v);
00334 
00336     std::string __name;
00338     std::string classname;
00340     bool   derived;
00341 
00342     UObjectList members;
00344     UObjectHub  *objecthub;
00345 
00348     void USetUpdate(ufloat period);
00349     virtual int update() {return 0;};
00351     void UAutoGroup() { autogroup = true; };
00353     virtual void addAutoGroup() { UJoinGroup(classname+"s"); };
00354 
00356     virtual void UJoinGroup(const std::string& gpname);
00358     int voidfun() {return  0;};
00360     bool autogroup;
00361 
00363     bool remote;
00364 
00366     void clean();
00367 
00370     UVar load;
00371 
00372   private:
00375     UObjectData*  objectData;
00376     ufloat period;
00377   };
00378 
00379 
00380 
00382   class UObjectHub
00383   {
00384   public:
00385 
00386     UObjectHub(const std::string&);
00387     virtual ~UObjectHub();
00388 
00389     void addMember(UObject* obj);
00390 
00392     void USetUpdate(ufloat period);
00393     virtual int update() {return 0;}
00394 
00395     UObjectList  members;
00396     UObjectList* getSubClass(const std::string&);
00397     //   UObjectList* getAllSubClass(const std::string&); //TODO
00398 
00399   protected:
00401     int updateGlobal();
00402 
00403     ufloat period;
00404     std::string name;
00405   };
00406 
00407 
00408   /*----------.
00409   | Casters.  |
00410   `----------*/
00411 
00412 # define SETCAST(Type)                          \
00413   inline Type                                   \
00414   cast(UValue &val, Type*)                      \
00415   {                                             \
00416     return (Type)val;                           \
00417   }
00418 
00419   inline const UValue & cast(UValue &val, const UValue *)
00420   {
00421     return val;
00422   }
00423 
00424   inline UValue cast(UValue &val,  UValue *)
00425   {
00426     return val;
00427   }
00428   SETCAST(int);
00429   SETCAST(unsigned int);
00430   SETCAST(long);
00431   SETCAST(unsigned long);
00432   SETCAST(ufloat);
00433   SETCAST(std::string);
00434   SETCAST(const std::string);
00435   SETCAST(bool);
00436   SETCAST(UImage);
00437   SETCAST(USound);
00438   UVar& cast(UValue &val, UVar *var);
00439   UBinary cast(UValue &v, UBinary * b);
00440   UList cast(UValue &v, UList *l);
00441   UObjectStruct cast(UValue &v, UObjectStruct *o);
00442   const char * cast(UValue &v, const char ** b);
00443 
00444 #ifndef UOBJECT_NO_LIST_CAST
00445 template<class I> std::list<I> cast(UValue &val, std::list<I> * inu)
00446 {
00447   std::list<I> result;
00448   if (val.type != DATA_LIST)
00449     //cast just the element
00450     result.push_back(cast(val, (I*)0));
00451   else
00452     for (int i=0;i<val.list->size();i++)
00453       result.push_back(cast(*val.list->array[i], (I*)0));
00454   return result;
00455 }
00456 #endif
00457 
00460   class baseURBIStarter
00461   {
00462   public:
00463     baseURBIStarter(const std::string& name)
00464       : name(name)
00465     {}
00466     virtual ~baseURBIStarter() {}
00467 
00468     virtual UObject* getUObject() = 0;
00469 
00471     virtual void clean() = 0;
00473     virtual void init(const std::string&) = 0;
00475     virtual void copy(const std::string&) = 0;
00476     std::string name;
00477   };
00478 
00480 
00483   template <class T>
00484   class URBIStarter
00485     : public baseURBIStarter
00486   {
00487   public:
00488     URBIStarter(const std::string& name, UStartlist& _slist)
00489       : baseURBIStarter(name)
00490     {
00491       slist = &_slist;
00492       slist->push_back(dynamic_cast<baseURBIStarter*>(this));
00493     }
00494 
00495     virtual ~URBIStarter()
00496     {
00497       clean();
00498     }
00499 
00500     virtual void clean()
00501     {
00502       delete getUObject();
00503       UStartlist::iterator toerase =
00504         std::find(slist->begin(), slist->end(),
00505                   dynamic_cast<baseURBIStarter*>(this));
00506       if (toerase != slist->end())
00507         slist->erase(toerase);
00508     }
00509 
00510     virtual void
00511     copy(const std::string& objname)
00512     {
00513       URBIStarter<T>* ustarter = new URBIStarter<T>(objname,*slist);
00514       ustarter->init(objname);
00515       UObject *uso = dynamic_cast<UObject*>(ustarter->object);
00516       getUObject()->members.push_back(uso);
00517       uso->derived   = true;
00518       uso->classname = getUObject()->classname;
00519       if (uso->autogroup)
00520         uso->addAutoGroup();
00521     }
00522 
00524     virtual UObject* getUObject()
00525     {
00526       return dynamic_cast<UObject*>(object);
00527     }
00528 
00529   protected:
00531     virtual void init(const std::string& objname)
00532     {
00533       object = new T(objname);
00534     }
00535 
00536     UStartlist  *slist;
00537     T*          object;
00538   };
00539 
00540 
00543   class baseURBIStarterHub
00544   {
00545   public:
00546 
00547     baseURBIStarterHub(const std::string& name) : name(name) {};
00548     virtual ~baseURBIStarterHub() {};
00549 
00551     virtual void init(const std::string&) = 0;
00552     virtual UObjectHub* getUObjectHub() = 0;
00553     std::string name;
00554   };
00555 
00557 
00560   template <class T> class URBIStarterHub : public baseURBIStarterHub
00561   {
00562   public:
00563     URBIStarterHub(const std::string& name, UStartlistHub& _slist)
00564       : baseURBIStarterHub(name)
00565     {
00566       slist = &_slist;
00567       slist->push_back(dynamic_cast<baseURBIStarterHub*>(this));
00568     }
00569     virtual ~URBIStarterHub() {/* noone can kill a hub*/ };
00570 
00571   protected:
00573     virtual void init(const std::string& objname)
00574     {
00575       object = new T(objname);
00576     }
00577 
00579     virtual UObjectHub* getUObjectHub()
00580     {
00581       return dynamic_cast<UObjectHub*>(object);
00582     }
00583 
00584     UStartlistHub  *slist;
00585     T*              object;
00586   };
00587 
00588 
00589   template<typename T>
00590   class utrait
00591   {
00592   public:
00593     typedef T noref;
00594   };
00595 
00596 # ifndef _MSC_VER
00597 
00598   template<typename T>
00599   class utrait<T&>
00600   {
00601   public:
00602     typedef T noref;
00603   };
00604 
00605 # else
00606 
00607   template<>
00608   class utrait<UVar&>
00609   {
00610   public:
00611     typedef UVar noref;
00612   };
00613 
00614 # endif
00615 
00616   /*-----------------------------------------------------.
00617   | This section is autogenerated. Not for humans eyes.  |
00618   `-----------------------------------------------------*/
00619 
00620 
00621        // non void return type
00622 
00623 template <class OBJ, class R>
00624 class UCallback0 : public UGenericCallback
00625 {
00626  public:
00627   UCallback0(const std::string& objname, const std::string& type,
00628                OBJ* obj,
00629                R (OBJ::*fun) (),
00630                const std::string& funname, UTable &t)
00631     : UGenericCallback(objname, type, funname, 0, t),
00632       obj(obj), fun(fun)
00633   {
00634   }
00635 
00636   virtual UValue __evalcall(UList& param)
00637   {
00638     // Avoid warnings when we don't use param.
00639     (void) param;
00640     return UValue(((*obj).*fun)());
00641   }
00642 
00643  private:
00644   OBJ* obj;
00645   R (OBJ::*fun) ();
00646 };
00647 
00648 // void return type
00649 
00650 template <class OBJ>
00651 class UCallbackvoid0 : public UGenericCallback
00652 {
00653  public:
00654   UCallbackvoid0(const std::string& objname, const std::string& type,
00655                    OBJ* obj,
00656                    void (OBJ::*fun) (),
00657                    const std::string& funname, UTable &t)
00658     : UGenericCallback(objname, type, funname,0, t),
00659     obj(obj), fun(fun)
00660   {
00661   }
00662 
00663   virtual UValue __evalcall(UList &param)
00664   {
00665     // Avoid warnings when we don't use param.
00666     (void) param;
00667     ((*obj).*fun)();
00668     return UValue();
00669   }
00670  private:
00671   OBJ* obj;
00672   void (OBJ::*fun) ();
00673 };
00674 
00675 // void return type : special case for notifyend event callbacks
00676 
00677 template <class OBJ>
00678 class UCallbacknotifyend0 : public UGenericCallback
00679 {
00680 public:
00681   UCallbacknotifyend0(const std::string& objname, const std::string& type,
00682                         OBJ* obj,
00683                         void (OBJ::*fun) (),
00684                         void (OBJ::*end)(),const std::string& funname,
00685                         UTable &t)
00686     : UGenericCallback(objname, type, funname,0, t),
00687     obj(obj), fun(end)
00688   {
00689   }
00690 
00691   virtual UValue __evalcall(UList &)
00692   {
00693     ((*obj).*fun)();
00694     return UValue();
00695   }
00696 
00697 private:
00698   OBJ* obj;
00699   void (OBJ::*fun) ();
00700 };
00701 
00702 // void non-member function
00703 template <class INU >
00704 class UFCallbackvoid0 : public UGenericCallback
00705 {
00706  public:
00707   UFCallbackvoid0(const std::string& objname, const std::string& type,
00708                     void (*fun) (),
00709                     const std::string& funname, UTable &t)
00710     : UGenericCallback(objname, type, funname,0, t),  fun(fun)
00711   {
00712   }
00713 
00714   virtual UValue __evalcall(UList &param)
00715   {
00716     // Avoid warnings when we don't use param.
00717     (void) param;
00718     (*fun)();
00719     return UValue();
00720   }
00721 
00722  private:
00723   void (*fun) ();
00724 };
00725 
00726 // non void non-member function
00727 template <class R>
00728 class UFCallback0 : public UGenericCallback
00729 {
00730  public:
00731   UFCallback0(const std::string& objname, const std::string& type,
00732                 R (*fun) (),
00733                 const std::string& funname, UTable &t)
00734     : UGenericCallback(objname, type, funname,0, t),  fun(fun)
00735   {
00736   }
00737 
00738   virtual UValue __evalcall(UList& param)
00739   {
00740     // Avoid warnings when we don't use param.
00741     (void) param;
00742     return UValue((*fun)());
00743   }
00744 
00745  private:
00746   R (*fun) ();
00747 };
00748 
00749 // callback creation for non-member non void return type
00750 
00751 template <class R>
00752 UGenericCallback*
00753 createUCallback(const std::string& objname, const std::string& type,
00754                 R (*fun) (),
00755                 const std::string& funname, UTable& t)
00756 {
00757   return new UFCallback0<R> (objname, type,fun,funname,t);
00758 }
00759 
00760 // callback creation for non-member void return type
00761 // inline required since one of them is not a template
00762 template <> inline
00763 UGenericCallback*
00764 createUCallback(const std::string& objname, const std::string& type,
00765                 void (*fun) (),
00766                 const std::string& funname,UTable &t)
00767 {
00768   return new UFCallbackvoid0<void > (objname, type,fun,funname,t);
00769 }
00770 
00771 // callback creation for non void return type
00772 
00773 template <class OBJ, class R>
00774 UGenericCallback*
00775 createUCallback(const std::string& objname, const std::string& type,
00776                 OBJ* obj,
00777                 R (OBJ::*fun) (),
00778                 const std::string& funname,UTable &t)
00779 {
00780   return new UCallback0<OBJ,R> (objname, type,obj,fun,funname,t);
00781 }
00782 
00783 // callback creation for void return type
00784 
00785 template <class OBJ>
00786 UGenericCallback*
00787 createUCallback(const std::string& objname, const std::string& type,
00788                 OBJ* obj,
00789                 void (OBJ::*fun) (),
00790                 const std::string& funname,UTable &t)
00791 {
00792   return new UCallbackvoid0<OBJ> (objname, type,obj,fun,funname,t);
00793 }
00794 
00795 // special case for eventend notification
00796 template <class OBJ>
00797 UGenericCallback*
00798 createUCallback(const std::string& objname, const std::string& type,
00799                 OBJ* obj,
00800                 void (OBJ::*fun) (),
00801                 void (OBJ::*end)(), const std::string& funname,UTable &t)
00802 {
00803   return new UCallbacknotifyend0<OBJ> (objname, type,obj,fun,end,funname,t);
00804 }
00805 
00806 
00807        // non void return type
00808 
00809 template <class OBJ, class R, class P1 >
00810 class UCallback1 : public UGenericCallback
00811 {
00812  public:
00813   UCallback1(const std::string& objname, const std::string& type,
00814                OBJ* obj,
00815                R (OBJ::*fun) ( P1 ),
00816                const std::string& funname, UTable &t)
00817     : UGenericCallback(objname, type, funname, 1, t),
00818       obj(obj), fun(fun)
00819   {
00820   }
00821 
00822   virtual UValue __evalcall(UList& param)
00823   {
00824     // Avoid warnings when we don't use param.
00825     (void) param;
00826     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) ));
00827   }
00828 
00829  private:
00830   OBJ* obj;
00831   R (OBJ::*fun) ( P1 );
00832 };
00833 
00834 // void return type
00835 
00836 template <class OBJ, class P1 >
00837 class UCallbackvoid1 : public UGenericCallback
00838 {
00839  public:
00840   UCallbackvoid1(const std::string& objname, const std::string& type,
00841                    OBJ* obj,
00842                    void (OBJ::*fun) ( P1 ),
00843                    const std::string& funname, UTable &t)
00844     : UGenericCallback(objname, type, funname,1, t),
00845     obj(obj), fun(fun)
00846   {
00847   }
00848 
00849   virtual UValue __evalcall(UList &param)
00850   {
00851     // Avoid warnings when we don't use param.
00852     (void) param;
00853     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) );
00854     return UValue();
00855   }
00856  private:
00857   OBJ* obj;
00858   void (OBJ::*fun) ( P1 );
00859 };
00860 
00861 // void return type : special case for notifyend event callbacks
00862 
00863 template <class OBJ, class P1 >
00864 class UCallbacknotifyend1 : public UGenericCallback
00865 {
00866 public:
00867   UCallbacknotifyend1(const std::string& objname, const std::string& type,
00868                         OBJ* obj,
00869                         void (OBJ::*fun) ( P1 ),
00870                         void (OBJ::*end)(),const std::string& funname,
00871                         UTable &t)
00872     : UGenericCallback(objname, type, funname,1, t),
00873     obj(obj), fun(end)
00874   {
00875   }
00876 
00877   virtual UValue __evalcall(UList &)
00878   {
00879     ((*obj).*fun)();
00880     return UValue();
00881   }
00882 
00883 private:
00884   OBJ* obj;
00885   void (OBJ::*fun) ();
00886 };
00887 
00888 // void non-member function
00889 template <class INU , class P1 >
00890 class UFCallbackvoid1 : public UGenericCallback
00891 {
00892  public:
00893   UFCallbackvoid1(const std::string& objname, const std::string& type,
00894                     void (*fun) ( P1 ),
00895                     const std::string& funname, UTable &t)
00896     : UGenericCallback(objname, type, funname,1, t),  fun(fun)
00897   {
00898   }
00899 
00900   virtual UValue __evalcall(UList &param)
00901   {
00902     // Avoid warnings when we don't use param.
00903     (void) param;
00904     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) );
00905     return UValue();
00906   }
00907 
00908  private:
00909   void (*fun) ( P1 );
00910 };
00911 
00912 // non void non-member function
00913 template <class R, class P1 >
00914 class UFCallback1 : public UGenericCallback
00915 {
00916  public:
00917   UFCallback1(const std::string& objname, const std::string& type,
00918                 R (*fun) ( P1 ),
00919                 const std::string& funname, UTable &t)
00920     : UGenericCallback(objname, type, funname,1, t),  fun(fun)
00921   {
00922   }
00923 
00924   virtual UValue __evalcall(UList& param)
00925   {
00926     // Avoid warnings when we don't use param.
00927     (void) param;
00928     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) ));
00929   }
00930 
00931  private:
00932   R (*fun) ( P1 );
00933 };
00934 
00935 // callback creation for non-member non void return type
00936 
00937 template <class R, class P1 >
00938 UGenericCallback*
00939 createUCallback(const std::string& objname, const std::string& type,
00940                 R (*fun) ( P1 ),
00941                 const std::string& funname, UTable& t)
00942 {
00943   return new UFCallback1<R, P1 > (objname, type,fun,funname,t);
00944 }
00945 
00946 // callback creation for non-member void return type
00947 // inline required since one of them is not a template
00948 template < class P1 > inline
00949 UGenericCallback*
00950 createUCallback(const std::string& objname, const std::string& type,
00951                 void (*fun) ( P1 ),
00952                 const std::string& funname,UTable &t)
00953 {
00954   return new UFCallbackvoid1<void , P1 > (objname, type,fun,funname,t);
00955 }
00956 
00957 // callback creation for non void return type
00958 
00959 template <class OBJ, class R, class P1 >
00960 UGenericCallback*
00961 createUCallback(const std::string& objname, const std::string& type,
00962                 OBJ* obj,
00963                 R (OBJ::*fun) ( P1 ),
00964                 const std::string& funname,UTable &t)
00965 {
00966   return new UCallback1<OBJ,R, P1 > (objname, type,obj,fun,funname,t);
00967 }
00968 
00969 // callback creation for void return type
00970 
00971 template <class OBJ, class P1 >
00972 UGenericCallback*
00973 createUCallback(const std::string& objname, const std::string& type,
00974                 OBJ* obj,
00975                 void (OBJ::*fun) ( P1 ),
00976                 const std::string& funname,UTable &t)
00977 {
00978   return new UCallbackvoid1<OBJ, P1 > (objname, type,obj,fun,funname,t);
00979 }
00980 
00981 // special case for eventend notification
00982 template <class OBJ, class P1 >
00983 UGenericCallback*
00984 createUCallback(const std::string& objname, const std::string& type,
00985                 OBJ* obj,
00986                 void (OBJ::*fun) ( P1 ),
00987                 void (OBJ::*end)(), const std::string& funname,UTable &t)
00988 {
00989   return new UCallbacknotifyend1<OBJ, P1 > (objname, type,obj,fun,end,funname,t);
00990 }
00991 
00992 
00993        // non void return type
00994 
00995 template <class OBJ, class R, class P1 , class P2 >
00996 class UCallback2 : public UGenericCallback
00997 {
00998  public:
00999   UCallback2(const std::string& objname, const std::string& type,
01000                OBJ* obj,
01001                R (OBJ::*fun) ( P1 , P2 ),
01002                const std::string& funname, UTable &t)
01003     : UGenericCallback(objname, type, funname, 2, t),
01004       obj(obj), fun(fun)
01005   {
01006   }
01007 
01008   virtual UValue __evalcall(UList& param)
01009   {
01010     // Avoid warnings when we don't use param.
01011     (void) param;
01012     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) ));
01013   }
01014 
01015  private:
01016   OBJ* obj;
01017   R (OBJ::*fun) ( P1 , P2 );
01018 };
01019 
01020 // void return type
01021 
01022 template <class OBJ, class P1 , class P2 >
01023 class UCallbackvoid2 : public UGenericCallback
01024 {
01025  public:
01026   UCallbackvoid2(const std::string& objname, const std::string& type,
01027                    OBJ* obj,
01028                    void (OBJ::*fun) ( P1 , P2 ),
01029                    const std::string& funname, UTable &t)
01030     : UGenericCallback(objname, type, funname,2, t),
01031     obj(obj), fun(fun)
01032   {
01033   }
01034 
01035   virtual UValue __evalcall(UList &param)
01036   {
01037     // Avoid warnings when we don't use param.
01038     (void) param;
01039     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) );
01040     return UValue();
01041   }
01042  private:
01043   OBJ* obj;
01044   void (OBJ::*fun) ( P1 , P2 );
01045 };
01046 
01047 // void return type : special case for notifyend event callbacks
01048 
01049 template <class OBJ, class P1 , class P2 >
01050 class UCallbacknotifyend2 : public UGenericCallback
01051 {
01052 public:
01053   UCallbacknotifyend2(const std::string& objname, const std::string& type,
01054                         OBJ* obj,
01055                         void (OBJ::*fun) ( P1 , P2 ),
01056                         void (OBJ::*end)(),const std::string& funname,
01057                         UTable &t)
01058     : UGenericCallback(objname, type, funname,2, t),
01059     obj(obj), fun(end)
01060   {
01061   }
01062 
01063   virtual UValue __evalcall(UList &)
01064   {
01065     ((*obj).*fun)();
01066     return UValue();
01067   }
01068 
01069 private:
01070   OBJ* obj;
01071   void (OBJ::*fun) ();
01072 };
01073 
01074 // void non-member function
01075 template <class INU , class P1 , class P2 >
01076 class UFCallbackvoid2 : public UGenericCallback
01077 {
01078  public:
01079   UFCallbackvoid2(const std::string& objname, const std::string& type,
01080                     void (*fun) ( P1 , P2 ),
01081                     const std::string& funname, UTable &t)
01082     : UGenericCallback(objname, type, funname,2, t),  fun(fun)
01083   {
01084   }
01085 
01086   virtual UValue __evalcall(UList &param)
01087   {
01088     // Avoid warnings when we don't use param.
01089     (void) param;
01090     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) );
01091     return UValue();
01092   }
01093 
01094  private:
01095   void (*fun) ( P1 , P2 );
01096 };
01097 
01098 // non void non-member function
01099 template <class R, class P1 , class P2 >
01100 class UFCallback2 : public UGenericCallback
01101 {
01102  public:
01103   UFCallback2(const std::string& objname, const std::string& type,
01104                 R (*fun) ( P1 , P2 ),
01105                 const std::string& funname, UTable &t)
01106     : UGenericCallback(objname, type, funname,2, t),  fun(fun)
01107   {
01108   }
01109 
01110   virtual UValue __evalcall(UList& param)
01111   {
01112     // Avoid warnings when we don't use param.
01113     (void) param;
01114     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) ));
01115   }
01116 
01117  private:
01118   R (*fun) ( P1 , P2 );
01119 };
01120 
01121 // callback creation for non-member non void return type
01122 
01123 template <class R, class P1 , class P2 >
01124 UGenericCallback*
01125 createUCallback(const std::string& objname, const std::string& type,
01126                 R (*fun) ( P1 , P2 ),
01127                 const std::string& funname, UTable& t)
01128 {
01129   return new UFCallback2<R, P1 , P2 > (objname, type,fun,funname,t);
01130 }
01131 
01132 // callback creation for non-member void return type
01133 // inline required since one of them is not a template
01134 template < class P1 , class P2 > inline
01135 UGenericCallback*
01136 createUCallback(const std::string& objname, const std::string& type,
01137                 void (*fun) ( P1 , P2 ),
01138                 const std::string& funname,UTable &t)
01139 {
01140   return new UFCallbackvoid2<void , P1 , P2 > (objname, type,fun,funname,t);
01141 }
01142 
01143 // callback creation for non void return type
01144 
01145 template <class OBJ, class R, class P1 , class P2 >
01146 UGenericCallback*
01147 createUCallback(const std::string& objname, const std::string& type,
01148                 OBJ* obj,
01149                 R (OBJ::*fun) ( P1 , P2 ),
01150                 const std::string& funname,UTable &t)
01151 {
01152   return new UCallback2<OBJ,R, P1 , P2 > (objname, type,obj,fun,funname,t);
01153 }
01154 
01155 // callback creation for void return type
01156 
01157 template <class OBJ, class P1 , class P2 >
01158 UGenericCallback*
01159 createUCallback(const std::string& objname, const std::string& type,
01160                 OBJ* obj,
01161                 void (OBJ::*fun) ( P1 , P2 ),
01162                 const std::string& funname,UTable &t)
01163 {
01164   return new UCallbackvoid2<OBJ, P1 , P2 > (objname, type,obj,fun,funname,t);
01165 }
01166 
01167 // special case for eventend notification
01168 template <class OBJ, class P1 , class P2 >
01169 UGenericCallback*
01170 createUCallback(const std::string& objname, const std::string& type,
01171                 OBJ* obj,
01172                 void (OBJ::*fun) ( P1 , P2 ),
01173                 void (OBJ::*end)(), const std::string& funname,UTable &t)
01174 {
01175   return new UCallbacknotifyend2<OBJ, P1 , P2 > (objname, type,obj,fun,end,funname,t);
01176 }
01177 
01178 
01179        // non void return type
01180 
01181 template <class OBJ, class R, class P1 , class P2 , class P3 >
01182 class UCallback3 : public UGenericCallback
01183 {
01184  public:
01185   UCallback3(const std::string& objname, const std::string& type,
01186                OBJ* obj,
01187                R (OBJ::*fun) ( P1 , P2 , P3 ),
01188                const std::string& funname, UTable &t)
01189     : UGenericCallback(objname, type, funname, 3, t),
01190       obj(obj), fun(fun)
01191   {
01192   }
01193 
01194   virtual UValue __evalcall(UList& param)
01195   {
01196     // Avoid warnings when we don't use param.
01197     (void) param;
01198     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) ));
01199   }
01200 
01201  private:
01202   OBJ* obj;
01203   R (OBJ::*fun) ( P1 , P2 , P3 );
01204 };
01205 
01206 // void return type
01207 
01208 template <class OBJ, class P1 , class P2 , class P3 >
01209 class UCallbackvoid3 : public UGenericCallback
01210 {
01211  public:
01212   UCallbackvoid3(const std::string& objname, const std::string& type,
01213                    OBJ* obj,
01214                    void (OBJ::*fun) ( P1 , P2 , P3 ),
01215                    const std::string& funname, UTable &t)
01216     : UGenericCallback(objname, type, funname,3, t),
01217     obj(obj), fun(fun)
01218   {
01219   }
01220 
01221   virtual UValue __evalcall(UList &param)
01222   {
01223     // Avoid warnings when we don't use param.
01224     (void) param;
01225     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) );
01226     return UValue();
01227   }
01228  private:
01229   OBJ* obj;
01230   void (OBJ::*fun) ( P1 , P2 , P3 );
01231 };
01232 
01233 // void return type : special case for notifyend event callbacks
01234 
01235 template <class OBJ, class P1 , class P2 , class P3 >
01236 class UCallbacknotifyend3 : public UGenericCallback
01237 {
01238 public:
01239   UCallbacknotifyend3(const std::string& objname, const std::string& type,
01240                         OBJ* obj,
01241                         void (OBJ::*fun) ( P1 , P2 , P3 ),
01242                         void (OBJ::*end)(),const std::string& funname,
01243                         UTable &t)
01244     : UGenericCallback(objname, type, funname,3, t),
01245     obj(obj), fun(end)
01246   {
01247   }
01248 
01249   virtual UValue __evalcall(UList &)
01250   {
01251     ((*obj).*fun)();
01252     return UValue();
01253   }
01254 
01255 private:
01256   OBJ* obj;
01257   void (OBJ::*fun) ();
01258 };
01259 
01260 // void non-member function
01261 template <class INU , class P1 , class P2 , class P3 >
01262 class UFCallbackvoid3 : public UGenericCallback
01263 {
01264  public:
01265   UFCallbackvoid3(const std::string& objname, const std::string& type,
01266                     void (*fun) ( P1 , P2 , P3 ),
01267                     const std::string& funname, UTable &t)
01268     : UGenericCallback(objname, type, funname,3, t),  fun(fun)
01269   {
01270   }
01271 
01272   virtual UValue __evalcall(UList &param)
01273   {
01274     // Avoid warnings when we don't use param.
01275     (void) param;
01276     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) );
01277     return UValue();
01278   }
01279 
01280  private:
01281   void (*fun) ( P1 , P2 , P3 );
01282 };
01283 
01284 // non void non-member function
01285 template <class R, class P1 , class P2 , class P3 >
01286 class UFCallback3 : public UGenericCallback
01287 {
01288  public:
01289   UFCallback3(const std::string& objname, const std::string& type,
01290                 R (*fun) ( P1 , P2 , P3 ),
01291                 const std::string& funname, UTable &t)
01292     : UGenericCallback(objname, type, funname,3, t),  fun(fun)
01293   {
01294   }
01295 
01296   virtual UValue __evalcall(UList& param)
01297   {
01298     // Avoid warnings when we don't use param.
01299     (void) param;
01300     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) ));
01301   }
01302 
01303  private:
01304   R (*fun) ( P1 , P2 , P3 );
01305 };
01306 
01307 // callback creation for non-member non void return type
01308 
01309 template <class R, class P1 , class P2 , class P3 >
01310 UGenericCallback*
01311 createUCallback(const std::string& objname, const std::string& type,
01312                 R (*fun) ( P1 , P2 , P3 ),
01313                 const std::string& funname, UTable& t)
01314 {
01315   return new UFCallback3<R, P1 , P2 , P3 > (objname, type,fun,funname,t);
01316 }
01317 
01318 // callback creation for non-member void return type
01319 // inline required since one of them is not a template
01320 template < class P1 , class P2 , class P3 > inline
01321 UGenericCallback*
01322 createUCallback(const std::string& objname, const std::string& type,
01323                 void (*fun) ( P1 , P2 , P3 ),
01324                 const std::string& funname,UTable &t)
01325 {
01326   return new UFCallbackvoid3<void , P1 , P2 , P3 > (objname, type,fun,funname,t);
01327 }
01328 
01329 // callback creation for non void return type
01330 
01331 template <class OBJ, class R, class P1 , class P2 , class P3 >
01332 UGenericCallback*
01333 createUCallback(const std::string& objname, const std::string& type,
01334                 OBJ* obj,
01335                 R (OBJ::*fun) ( P1 , P2 , P3 ),
01336                 const std::string& funname,UTable &t)
01337 {
01338   return new UCallback3<OBJ,R, P1 , P2 , P3 > (objname, type,obj,fun,funname,t);
01339 }
01340 
01341 // callback creation for void return type
01342 
01343 template <class OBJ, class P1 , class P2 , class P3 >
01344 UGenericCallback*
01345 createUCallback(const std::string& objname, const std::string& type,
01346                 OBJ* obj,
01347                 void (OBJ::*fun) ( P1 , P2 , P3 ),
01348                 const std::string& funname,UTable &t)
01349 {
01350   return new UCallbackvoid3<OBJ, P1 , P2 , P3 > (objname, type,obj,fun,funname,t);
01351 }
01352 
01353 // special case for eventend notification
01354 template <class OBJ, class P1 , class P2 , class P3 >
01355 UGenericCallback*
01356 createUCallback(const std::string& objname, const std::string& type,
01357                 OBJ* obj,
01358                 void (OBJ::*fun) ( P1 , P2 , P3 ),
01359                 void (OBJ::*end)(), const std::string& funname,UTable &t)
01360 {
01361   return new UCallbacknotifyend3<OBJ, P1 , P2 , P3 > (objname, type,obj,fun,end,funname,t);
01362 }
01363 
01364 
01365        // non void return type
01366 
01367 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 >
01368 class UCallback4 : public UGenericCallback
01369 {
01370  public:
01371   UCallback4(const std::string& objname, const std::string& type,
01372                OBJ* obj,
01373                R (OBJ::*fun) ( P1 , P2 , P3 , P4 ),
01374                const std::string& funname, UTable &t)
01375     : UGenericCallback(objname, type, funname, 4, t),
01376       obj(obj), fun(fun)
01377   {
01378   }
01379 
01380   virtual UValue __evalcall(UList& param)
01381   {
01382     // Avoid warnings when we don't use param.
01383     (void) param;
01384     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) ));
01385   }
01386 
01387  private:
01388   OBJ* obj;
01389   R (OBJ::*fun) ( P1 , P2 , P3 , P4 );
01390 };
01391 
01392 // void return type
01393 
01394 template <class OBJ, class P1 , class P2 , class P3 , class P4 >
01395 class UCallbackvoid4 : public UGenericCallback
01396 {
01397  public:
01398   UCallbackvoid4(const std::string& objname, const std::string& type,
01399                    OBJ* obj,
01400                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 ),
01401                    const std::string& funname, UTable &t)
01402     : UGenericCallback(objname, type, funname,4, t),
01403     obj(obj), fun(fun)
01404   {
01405   }
01406 
01407   virtual UValue __evalcall(UList &param)
01408   {
01409     // Avoid warnings when we don't use param.
01410     (void) param;
01411     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) );
01412     return UValue();
01413   }
01414  private:
01415   OBJ* obj;
01416   void (OBJ::*fun) ( P1 , P2 , P3 , P4 );
01417 };
01418 
01419 // void return type : special case for notifyend event callbacks
01420 
01421 template <class OBJ, class P1 , class P2 , class P3 , class P4 >
01422 class UCallbacknotifyend4 : public UGenericCallback
01423 {
01424 public:
01425   UCallbacknotifyend4(const std::string& objname, const std::string& type,
01426                         OBJ* obj,
01427                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 ),
01428                         void (OBJ::*end)(),const std::string& funname,
01429                         UTable &t)
01430     : UGenericCallback(objname, type, funname,4, t),
01431     obj(obj), fun(end)
01432   {
01433   }
01434 
01435   virtual UValue __evalcall(UList &)
01436   {
01437     ((*obj).*fun)();
01438     return UValue();
01439   }
01440 
01441 private:
01442   OBJ* obj;
01443   void (OBJ::*fun) ();
01444 };
01445 
01446 // void non-member function
01447 template <class INU , class P1 , class P2 , class P3 , class P4 >
01448 class UFCallbackvoid4 : public UGenericCallback
01449 {
01450  public:
01451   UFCallbackvoid4(const std::string& objname, const std::string& type,
01452                     void (*fun) ( P1 , P2 , P3 , P4 ),
01453                     const std::string& funname, UTable &t)
01454     : UGenericCallback(objname, type, funname,4, t),  fun(fun)
01455   {
01456   }
01457 
01458   virtual UValue __evalcall(UList &param)
01459   {
01460     // Avoid warnings when we don't use param.
01461     (void) param;
01462     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) );
01463     return UValue();
01464   }
01465 
01466  private:
01467   void (*fun) ( P1 , P2 , P3 , P4 );
01468 };
01469 
01470 // non void non-member function
01471 template <class R, class P1 , class P2 , class P3 , class P4 >
01472 class UFCallback4 : public UGenericCallback
01473 {
01474  public:
01475   UFCallback4(const std::string& objname, const std::string& type,
01476                 R (*fun) ( P1 , P2 , P3 , P4 ),
01477                 const std::string& funname, UTable &t)
01478     : UGenericCallback(objname, type, funname,4, t),  fun(fun)
01479   {
01480   }
01481 
01482   virtual UValue __evalcall(UList& param)
01483   {
01484     // Avoid warnings when we don't use param.
01485     (void) param;
01486     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) ));
01487   }
01488 
01489  private:
01490   R (*fun) ( P1 , P2 , P3 , P4 );
01491 };
01492 
01493 // callback creation for non-member non void return type
01494 
01495 template <class R, class P1 , class P2 , class P3 , class P4 >
01496 UGenericCallback*
01497 createUCallback(const std::string& objname, const std::string& type,
01498                 R (*fun) ( P1 , P2 , P3 , P4 ),
01499                 const std::string& funname, UTable& t)
01500 {
01501   return new UFCallback4<R, P1 , P2 , P3 , P4 > (objname, type,fun,funname,t);
01502 }
01503 
01504 // callback creation for non-member void return type
01505 // inline required since one of them is not a template
01506 template < class P1 , class P2 , class P3 , class P4 > inline
01507 UGenericCallback*
01508 createUCallback(const std::string& objname, const std::string& type,
01509                 void (*fun) ( P1 , P2 , P3 , P4 ),
01510                 const std::string& funname,UTable &t)
01511 {
01512   return new UFCallbackvoid4<void , P1 , P2 , P3 , P4 > (objname, type,fun,funname,t);
01513 }
01514 
01515 // callback creation for non void return type
01516 
01517 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 >
01518 UGenericCallback*
01519 createUCallback(const std::string& objname, const std::string& type,
01520                 OBJ* obj,
01521                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 ),
01522                 const std::string& funname,UTable &t)
01523 {
01524   return new UCallback4<OBJ,R, P1 , P2 , P3 , P4 > (objname, type,obj,fun,funname,t);
01525 }
01526 
01527 // callback creation for void return type
01528 
01529 template <class OBJ, class P1 , class P2 , class P3 , class P4 >
01530 UGenericCallback*
01531 createUCallback(const std::string& objname, const std::string& type,
01532                 OBJ* obj,
01533                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 ),
01534                 const std::string& funname,UTable &t)
01535 {
01536   return new UCallbackvoid4<OBJ, P1 , P2 , P3 , P4 > (objname, type,obj,fun,funname,t);
01537 }
01538 
01539 // special case for eventend notification
01540 template <class OBJ, class P1 , class P2 , class P3 , class P4 >
01541 UGenericCallback*
01542 createUCallback(const std::string& objname, const std::string& type,
01543                 OBJ* obj,
01544                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 ),
01545                 void (OBJ::*end)(), const std::string& funname,UTable &t)
01546 {
01547   return new UCallbacknotifyend4<OBJ, P1 , P2 , P3 , P4 > (objname, type,obj,fun,end,funname,t);
01548 }
01549 
01550 
01551        // non void return type
01552 
01553 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 >
01554 class UCallback5 : public UGenericCallback
01555 {
01556  public:
01557   UCallback5(const std::string& objname, const std::string& type,
01558                OBJ* obj,
01559                R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 ),
01560                const std::string& funname, UTable &t)
01561     : UGenericCallback(objname, type, funname, 5, t),
01562       obj(obj), fun(fun)
01563   {
01564   }
01565 
01566   virtual UValue __evalcall(UList& param)
01567   {
01568     // Avoid warnings when we don't use param.
01569     (void) param;
01570     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) , cast(param[5 - 1], (typename utrait<P5>::noref*)0) ));
01571   }
01572 
01573  private:
01574   OBJ* obj;
01575   R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 );
01576 };
01577 
01578 // void return type
01579 
01580 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 >
01581 class UCallbackvoid5 : public UGenericCallback
01582 {
01583  public:
01584   UCallbackvoid5(const std::string& objname, const std::string& type,
01585                    OBJ* obj,
01586                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 ),
01587                    const std::string& funname, UTable &t)
01588     : UGenericCallback(objname, type, funname,5, t),
01589     obj(obj), fun(fun)
01590   {
01591   }
01592 
01593   virtual UValue __evalcall(UList &param)
01594   {
01595     // Avoid warnings when we don't use param.
01596     (void) param;
01597     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) );
01598     return UValue();
01599   }
01600  private:
01601   OBJ* obj;
01602   void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 );
01603 };
01604 
01605 // void return type : special case for notifyend event callbacks
01606 
01607 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 >
01608 class UCallbacknotifyend5 : public UGenericCallback
01609 {
01610 public:
01611   UCallbacknotifyend5(const std::string& objname, const std::string& type,
01612                         OBJ* obj,
01613                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 ),
01614                         void (OBJ::*end)(),const std::string& funname,
01615                         UTable &t)
01616     : UGenericCallback(objname, type, funname,5, t),
01617     obj(obj), fun(end)
01618   {
01619   }
01620 
01621   virtual UValue __evalcall(UList &)
01622   {
01623     ((*obj).*fun)();
01624     return UValue();
01625   }
01626 
01627 private:
01628   OBJ* obj;
01629   void (OBJ::*fun) ();
01630 };
01631 
01632 // void non-member function
01633 template <class INU , class P1 , class P2 , class P3 , class P4 , class P5 >
01634 class UFCallbackvoid5 : public UGenericCallback
01635 {
01636  public:
01637   UFCallbackvoid5(const std::string& objname, const std::string& type,
01638                     void (*fun) ( P1 , P2 , P3 , P4 , P5 ),
01639                     const std::string& funname, UTable &t)
01640     : UGenericCallback(objname, type, funname,5, t),  fun(fun)
01641   {
01642   }
01643 
01644   virtual UValue __evalcall(UList &param)
01645   {
01646     // Avoid warnings when we don't use param.
01647     (void) param;
01648     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) );
01649     return UValue();
01650   }
01651 
01652  private:
01653   void (*fun) ( P1 , P2 , P3 , P4 , P5 );
01654 };
01655 
01656 // non void non-member function
01657 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 >
01658 class UFCallback5 : public UGenericCallback
01659 {
01660  public:
01661   UFCallback5(const std::string& objname, const std::string& type,
01662                 R (*fun) ( P1 , P2 , P3 , P4 , P5 ),
01663                 const std::string& funname, UTable &t)
01664     : UGenericCallback(objname, type, funname,5, t),  fun(fun)
01665   {
01666   }
01667 
01668   virtual UValue __evalcall(UList& param)
01669   {
01670     // Avoid warnings when we don't use param.
01671     (void) param;
01672     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) ));
01673   }
01674 
01675  private:
01676   R (*fun) ( P1 , P2 , P3 , P4 , P5 );
01677 };
01678 
01679 // callback creation for non-member non void return type
01680 
01681 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 >
01682 UGenericCallback*
01683 createUCallback(const std::string& objname, const std::string& type,
01684                 R (*fun) ( P1 , P2 , P3 , P4 , P5 ),
01685                 const std::string& funname, UTable& t)
01686 {
01687   return new UFCallback5<R, P1 , P2 , P3 , P4 , P5 > (objname, type,fun,funname,t);
01688 }
01689 
01690 // callback creation for non-member void return type
01691 // inline required since one of them is not a template
01692 template < class P1 , class P2 , class P3 , class P4 , class P5 > inline
01693 UGenericCallback*
01694 createUCallback(const std::string& objname, const std::string& type,
01695                 void (*fun) ( P1 , P2 , P3 , P4 , P5 ),
01696                 const std::string& funname,UTable &t)
01697 {
01698   return new UFCallbackvoid5<void , P1 , P2 , P3 , P4 , P5 > (objname, type,fun,funname,t);
01699 }
01700 
01701 // callback creation for non void return type
01702 
01703 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 >
01704 UGenericCallback*
01705 createUCallback(const std::string& objname, const std::string& type,
01706                 OBJ* obj,
01707                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 ),
01708                 const std::string& funname,UTable &t)
01709 {
01710   return new UCallback5<OBJ,R, P1 , P2 , P3 , P4 , P5 > (objname, type,obj,fun,funname,t);
01711 }
01712 
01713 // callback creation for void return type
01714 
01715 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 >
01716 UGenericCallback*
01717 createUCallback(const std::string& objname, const std::string& type,
01718                 OBJ* obj,
01719                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 ),
01720                 const std::string& funname,UTable &t)
01721 {
01722   return new UCallbackvoid5<OBJ, P1 , P2 , P3 , P4 , P5 > (objname, type,obj,fun,funname,t);
01723 }
01724 
01725 // special case for eventend notification
01726 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 >
01727 UGenericCallback*
01728 createUCallback(const std::string& objname, const std::string& type,
01729                 OBJ* obj,
01730                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 ),
01731                 void (OBJ::*end)(), const std::string& funname,UTable &t)
01732 {
01733   return new UCallbacknotifyend5<OBJ, P1 , P2 , P3 , P4 , P5 > (objname, type,obj,fun,end,funname,t);
01734 }
01735 
01736 
01737        // non void return type
01738 
01739 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
01740 class UCallback6 : public UGenericCallback
01741 {
01742  public:
01743   UCallback6(const std::string& objname, const std::string& type,
01744                OBJ* obj,
01745                R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 ),
01746                const std::string& funname, UTable &t)
01747     : UGenericCallback(objname, type, funname, 6, t),
01748       obj(obj), fun(fun)
01749   {
01750   }
01751 
01752   virtual UValue __evalcall(UList& param)
01753   {
01754     // Avoid warnings when we don't use param.
01755     (void) param;
01756     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) , cast(param[5 - 1], (typename utrait<P5>::noref*)0) , cast(param[6 - 1], (typename utrait<P6>::noref*)0) ));
01757   }
01758 
01759  private:
01760   OBJ* obj;
01761   R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 );
01762 };
01763 
01764 // void return type
01765 
01766 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
01767 class UCallbackvoid6 : public UGenericCallback
01768 {
01769  public:
01770   UCallbackvoid6(const std::string& objname, const std::string& type,
01771                    OBJ* obj,
01772                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 ),
01773                    const std::string& funname, UTable &t)
01774     : UGenericCallback(objname, type, funname,6, t),
01775     obj(obj), fun(fun)
01776   {
01777   }
01778 
01779   virtual UValue __evalcall(UList &param)
01780   {
01781     // Avoid warnings when we don't use param.
01782     (void) param;
01783     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) );
01784     return UValue();
01785   }
01786  private:
01787   OBJ* obj;
01788   void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 );
01789 };
01790 
01791 // void return type : special case for notifyend event callbacks
01792 
01793 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
01794 class UCallbacknotifyend6 : public UGenericCallback
01795 {
01796 public:
01797   UCallbacknotifyend6(const std::string& objname, const std::string& type,
01798                         OBJ* obj,
01799                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 ),
01800                         void (OBJ::*end)(),const std::string& funname,
01801                         UTable &t)
01802     : UGenericCallback(objname, type, funname,6, t),
01803     obj(obj), fun(end)
01804   {
01805   }
01806 
01807   virtual UValue __evalcall(UList &)
01808   {
01809     ((*obj).*fun)();
01810     return UValue();
01811   }
01812 
01813 private:
01814   OBJ* obj;
01815   void (OBJ::*fun) ();
01816 };
01817 
01818 // void non-member function
01819 template <class INU , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
01820 class UFCallbackvoid6 : public UGenericCallback
01821 {
01822  public:
01823   UFCallbackvoid6(const std::string& objname, const std::string& type,
01824                     void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 ),
01825                     const std::string& funname, UTable &t)
01826     : UGenericCallback(objname, type, funname,6, t),  fun(fun)
01827   {
01828   }
01829 
01830   virtual UValue __evalcall(UList &param)
01831   {
01832     // Avoid warnings when we don't use param.
01833     (void) param;
01834     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) );
01835     return UValue();
01836   }
01837 
01838  private:
01839   void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 );
01840 };
01841 
01842 // non void non-member function
01843 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
01844 class UFCallback6 : public UGenericCallback
01845 {
01846  public:
01847   UFCallback6(const std::string& objname, const std::string& type,
01848                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 ),
01849                 const std::string& funname, UTable &t)
01850     : UGenericCallback(objname, type, funname,6, t),  fun(fun)
01851   {
01852   }
01853 
01854   virtual UValue __evalcall(UList& param)
01855   {
01856     // Avoid warnings when we don't use param.
01857     (void) param;
01858     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) ));
01859   }
01860 
01861  private:
01862   R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 );
01863 };
01864 
01865 // callback creation for non-member non void return type
01866 
01867 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
01868 UGenericCallback*
01869 createUCallback(const std::string& objname, const std::string& type,
01870                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 ),
01871                 const std::string& funname, UTable& t)
01872 {
01873   return new UFCallback6<R, P1 , P2 , P3 , P4 , P5 , P6 > (objname, type,fun,funname,t);
01874 }
01875 
01876 // callback creation for non-member void return type
01877 // inline required since one of them is not a template
01878 template < class P1 , class P2 , class P3 , class P4 , class P5 , class P6 > inline
01879 UGenericCallback*
01880 createUCallback(const std::string& objname, const std::string& type,
01881                 void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 ),
01882                 const std::string& funname,UTable &t)
01883 {
01884   return new UFCallbackvoid6<void , P1 , P2 , P3 , P4 , P5 , P6 > (objname, type,fun,funname,t);
01885 }
01886 
01887 // callback creation for non void return type
01888 
01889 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
01890 UGenericCallback*
01891 createUCallback(const std::string& objname, const std::string& type,
01892                 OBJ* obj,
01893                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 ),
01894                 const std::string& funname,UTable &t)
01895 {
01896   return new UCallback6<OBJ,R, P1 , P2 , P3 , P4 , P5 , P6 > (objname, type,obj,fun,funname,t);
01897 }
01898 
01899 // callback creation for void return type
01900 
01901 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
01902 UGenericCallback*
01903 createUCallback(const std::string& objname, const std::string& type,
01904                 OBJ* obj,
01905                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 ),
01906                 const std::string& funname,UTable &t)
01907 {
01908   return new UCallbackvoid6<OBJ, P1 , P2 , P3 , P4 , P5 , P6 > (objname, type,obj,fun,funname,t);
01909 }
01910 
01911 // special case for eventend notification
01912 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
01913 UGenericCallback*
01914 createUCallback(const std::string& objname, const std::string& type,
01915                 OBJ* obj,
01916                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 ),
01917                 void (OBJ::*end)(), const std::string& funname,UTable &t)
01918 {
01919   return new UCallbacknotifyend6<OBJ, P1 , P2 , P3 , P4 , P5 , P6 > (objname, type,obj,fun,end,funname,t);
01920 }
01921 
01922 
01923        // non void return type
01924 
01925 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
01926 class UCallback7 : public UGenericCallback
01927 {
01928  public:
01929   UCallback7(const std::string& objname, const std::string& type,
01930                OBJ* obj,
01931                R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 ),
01932                const std::string& funname, UTable &t)
01933     : UGenericCallback(objname, type, funname, 7, t),
01934       obj(obj), fun(fun)
01935   {
01936   }
01937 
01938   virtual UValue __evalcall(UList& param)
01939   {
01940     // Avoid warnings when we don't use param.
01941     (void) param;
01942     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) , cast(param[5 - 1], (typename utrait<P5>::noref*)0) , cast(param[6 - 1], (typename utrait<P6>::noref*)0) , cast(param[7 - 1], (typename utrait<P7>::noref*)0) ));
01943   }
01944 
01945  private:
01946   OBJ* obj;
01947   R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 );
01948 };
01949 
01950 // void return type
01951 
01952 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
01953 class UCallbackvoid7 : public UGenericCallback
01954 {
01955  public:
01956   UCallbackvoid7(const std::string& objname, const std::string& type,
01957                    OBJ* obj,
01958                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 ),
01959                    const std::string& funname, UTable &t)
01960     : UGenericCallback(objname, type, funname,7, t),
01961     obj(obj), fun(fun)
01962   {
01963   }
01964 
01965   virtual UValue __evalcall(UList &param)
01966   {
01967     // Avoid warnings when we don't use param.
01968     (void) param;
01969     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) );
01970     return UValue();
01971   }
01972  private:
01973   OBJ* obj;
01974   void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 );
01975 };
01976 
01977 // void return type : special case for notifyend event callbacks
01978 
01979 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
01980 class UCallbacknotifyend7 : public UGenericCallback
01981 {
01982 public:
01983   UCallbacknotifyend7(const std::string& objname, const std::string& type,
01984                         OBJ* obj,
01985                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 ),
01986                         void (OBJ::*end)(),const std::string& funname,
01987                         UTable &t)
01988     : UGenericCallback(objname, type, funname,7, t),
01989     obj(obj), fun(end)
01990   {
01991   }
01992 
01993   virtual UValue __evalcall(UList &)
01994   {
01995     ((*obj).*fun)();
01996     return UValue();
01997   }
01998 
01999 private:
02000   OBJ* obj;
02001   void (OBJ::*fun) ();
02002 };
02003 
02004 // void non-member function
02005 template <class INU , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
02006 class UFCallbackvoid7 : public UGenericCallback
02007 {
02008  public:
02009   UFCallbackvoid7(const std::string& objname, const std::string& type,
02010                     void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 ),
02011                     const std::string& funname, UTable &t)
02012     : UGenericCallback(objname, type, funname,7, t),  fun(fun)
02013   {
02014   }
02015 
02016   virtual UValue __evalcall(UList &param)
02017   {
02018     // Avoid warnings when we don't use param.
02019     (void) param;
02020     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) );
02021     return UValue();
02022   }
02023 
02024  private:
02025   void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 );
02026 };
02027 
02028 // non void non-member function
02029 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
02030 class UFCallback7 : public UGenericCallback
02031 {
02032  public:
02033   UFCallback7(const std::string& objname, const std::string& type,
02034                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 ),
02035                 const std::string& funname, UTable &t)
02036     : UGenericCallback(objname, type, funname,7, t),  fun(fun)
02037   {
02038   }
02039 
02040   virtual UValue __evalcall(UList& param)
02041   {
02042     // Avoid warnings when we don't use param.
02043     (void) param;
02044     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) ));
02045   }
02046 
02047  private:
02048   R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 );
02049 };
02050 
02051 // callback creation for non-member non void return type
02052 
02053 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
02054 UGenericCallback*
02055 createUCallback(const std::string& objname, const std::string& type,
02056                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 ),
02057                 const std::string& funname, UTable& t)
02058 {
02059   return new UFCallback7<R, P1 , P2 , P3 , P4 , P5 , P6 , P7 > (objname, type,fun,funname,t);
02060 }
02061 
02062 // callback creation for non-member void return type
02063 // inline required since one of them is not a template
02064 template < class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 > inline
02065 UGenericCallback*
02066 createUCallback(const std::string& objname, const std::string& type,
02067                 void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 ),
02068                 const std::string& funname,UTable &t)
02069 {
02070   return new UFCallbackvoid7<void , P1 , P2 , P3 , P4 , P5 , P6 , P7 > (objname, type,fun,funname,t);
02071 }
02072 
02073 // callback creation for non void return type
02074 
02075 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
02076 UGenericCallback*
02077 createUCallback(const std::string& objname, const std::string& type,
02078                 OBJ* obj,
02079                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 ),
02080                 const std::string& funname,UTable &t)
02081 {
02082   return new UCallback7<OBJ,R, P1 , P2 , P3 , P4 , P5 , P6 , P7 > (objname, type,obj,fun,funname,t);
02083 }
02084 
02085 // callback creation for void return type
02086 
02087 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
02088 UGenericCallback*
02089 createUCallback(const std::string& objname, const std::string& type,
02090                 OBJ* obj,
02091                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 ),
02092                 const std::string& funname,UTable &t)
02093 {
02094   return new UCallbackvoid7<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 > (objname, type,obj,fun,funname,t);
02095 }
02096 
02097 // special case for eventend notification
02098 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
02099 UGenericCallback*
02100 createUCallback(const std::string& objname, const std::string& type,
02101                 OBJ* obj,
02102                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 ),
02103                 void (OBJ::*end)(), const std::string& funname,UTable &t)
02104 {
02105   return new UCallbacknotifyend7<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 > (objname, type,obj,fun,end,funname,t);
02106 }
02107 
02108 
02109        // non void return type
02110 
02111 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
02112 class UCallback8 : public UGenericCallback
02113 {
02114  public:
02115   UCallback8(const std::string& objname, const std::string& type,
02116                OBJ* obj,
02117                R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 ),
02118                const std::string& funname, UTable &t)
02119     : UGenericCallback(objname, type, funname, 8, t),
02120       obj(obj), fun(fun)
02121   {
02122   }
02123 
02124   virtual UValue __evalcall(UList& param)
02125   {
02126     // Avoid warnings when we don't use param.
02127     (void) param;
02128     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) , cast(param[5 - 1], (typename utrait<P5>::noref*)0) , cast(param[6 - 1], (typename utrait<P6>::noref*)0) , cast(param[7 - 1], (typename utrait<P7>::noref*)0) , cast(param[8 - 1], (typename utrait<P8>::noref*)0) ));
02129   }
02130 
02131  private:
02132   OBJ* obj;
02133   R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 );
02134 };
02135 
02136 // void return type
02137 
02138 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
02139 class UCallbackvoid8 : public UGenericCallback
02140 {
02141  public:
02142   UCallbackvoid8(const std::string& objname, const std::string& type,
02143                    OBJ* obj,
02144                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 ),
02145                    const std::string& funname, UTable &t)
02146     : UGenericCallback(objname, type, funname,8, t),
02147     obj(obj), fun(fun)
02148   {
02149   }
02150 
02151   virtual UValue __evalcall(UList &param)
02152   {
02153     // Avoid warnings when we don't use param.
02154     (void) param;
02155     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) );
02156     return UValue();
02157   }
02158  private:
02159   OBJ* obj;
02160   void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 );
02161 };
02162 
02163 // void return type : special case for notifyend event callbacks
02164 
02165 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
02166 class UCallbacknotifyend8 : public UGenericCallback
02167 {
02168 public:
02169   UCallbacknotifyend8(const std::string& objname, const std::string& type,
02170                         OBJ* obj,
02171                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 ),
02172                         void (OBJ::*end)(),const std::string& funname,
02173                         UTable &t)
02174     : UGenericCallback(objname, type, funname,8, t),
02175     obj(obj), fun(end)
02176   {
02177   }
02178 
02179   virtual UValue __evalcall(UList &)
02180   {
02181     ((*obj).*fun)();
02182     return UValue();
02183   }
02184 
02185 private:
02186   OBJ* obj;
02187   void (OBJ::*fun) ();
02188 };
02189 
02190 // void non-member function
02191 template <class INU , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
02192 class UFCallbackvoid8 : public UGenericCallback
02193 {
02194  public:
02195   UFCallbackvoid8(const std::string& objname, const std::string& type,
02196                     void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 ),
02197                     const std::string& funname, UTable &t)
02198     : UGenericCallback(objname, type, funname,8, t),  fun(fun)
02199   {
02200   }
02201 
02202   virtual UValue __evalcall(UList &param)
02203   {
02204     // Avoid warnings when we don't use param.
02205     (void) param;
02206     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) );
02207     return UValue();
02208   }
02209 
02210  private:
02211   void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 );
02212 };
02213 
02214 // non void non-member function
02215 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
02216 class UFCallback8 : public UGenericCallback
02217 {
02218  public:
02219   UFCallback8(const std::string& objname, const std::string& type,
02220                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 ),
02221                 const std::string& funname, UTable &t)
02222     : UGenericCallback(objname, type, funname,8, t),  fun(fun)
02223   {
02224   }
02225 
02226   virtual UValue __evalcall(UList& param)
02227   {
02228     // Avoid warnings when we don't use param.
02229     (void) param;
02230     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) ));
02231   }
02232 
02233  private:
02234   R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 );
02235 };
02236 
02237 // callback creation for non-member non void return type
02238 
02239 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
02240 UGenericCallback*
02241 createUCallback(const std::string& objname, const std::string& type,
02242                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 ),
02243                 const std::string& funname, UTable& t)
02244 {
02245   return new UFCallback8<R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 > (objname, type,fun,funname,t);
02246 }
02247 
02248 // callback creation for non-member void return type
02249 // inline required since one of them is not a template
02250 template < class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 > inline
02251 UGenericCallback*
02252 createUCallback(const std::string& objname, const std::string& type,
02253                 void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 ),
02254                 const std::string& funname,UTable &t)
02255 {
02256   return new UFCallbackvoid8<void , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 > (objname, type,fun,funname,t);
02257 }
02258 
02259 // callback creation for non void return type
02260 
02261 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
02262 UGenericCallback*
02263 createUCallback(const std::string& objname, const std::string& type,
02264                 OBJ* obj,
02265                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 ),
02266                 const std::string& funname,UTable &t)
02267 {
02268   return new UCallback8<OBJ,R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 > (objname, type,obj,fun,funname,t);
02269 }
02270 
02271 // callback creation for void return type
02272 
02273 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
02274 UGenericCallback*
02275 createUCallback(const std::string& objname, const std::string& type,
02276                 OBJ* obj,
02277                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 ),
02278                 const std::string& funname,UTable &t)
02279 {
02280   return new UCallbackvoid8<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 > (objname, type,obj,fun,funname,t);
02281 }
02282 
02283 // special case for eventend notification
02284 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
02285 UGenericCallback*
02286 createUCallback(const std::string& objname, const std::string& type,
02287                 OBJ* obj,
02288                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 ),
02289                 void (OBJ::*end)(), const std::string& funname,UTable &t)
02290 {
02291   return new UCallbacknotifyend8<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 > (objname, type,obj,fun,end,funname,t);
02292 }
02293 
02294 
02295        // non void return type
02296 
02297 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 >
02298 class UCallback9 : public UGenericCallback
02299 {
02300  public:
02301   UCallback9(const std::string& objname, const std::string& type,
02302                OBJ* obj,
02303                R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 ),
02304                const std::string& funname, UTable &t)
02305     : UGenericCallback(objname, type, funname, 9, t),
02306       obj(obj), fun(fun)
02307   {
02308   }
02309 
02310   virtual UValue __evalcall(UList& param)
02311   {
02312     // Avoid warnings when we don't use param.
02313     (void) param;
02314     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) , cast(param[5 - 1], (typename utrait<P5>::noref*)0) , cast(param[6 - 1], (typename utrait<P6>::noref*)0) , cast(param[7 - 1], (typename utrait<P7>::noref*)0) , cast(param[8 - 1], (typename utrait<P8>::noref*)0) , cast(param[9 - 1], (typename utrait<P9>::noref*)0) ));
02315   }
02316 
02317  private:
02318   OBJ* obj;
02319   R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 );
02320 };
02321 
02322 // void return type
02323 
02324 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 >
02325 class UCallbackvoid9 : public UGenericCallback
02326 {
02327  public:
02328   UCallbackvoid9(const std::string& objname, const std::string& type,
02329                    OBJ* obj,
02330                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 ),
02331                    const std::string& funname, UTable &t)
02332     : UGenericCallback(objname, type, funname,9, t),
02333     obj(obj), fun(fun)
02334   {
02335   }
02336 
02337   virtual UValue __evalcall(UList &param)
02338   {
02339     // Avoid warnings when we don't use param.
02340     (void) param;
02341     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) );
02342     return UValue();
02343   }
02344  private:
02345   OBJ* obj;
02346   void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 );
02347 };
02348 
02349 // void return type : special case for notifyend event callbacks
02350 
02351 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 >
02352 class UCallbacknotifyend9 : public UGenericCallback
02353 {
02354 public:
02355   UCallbacknotifyend9(const std::string& objname, const std::string& type,
02356                         OBJ* obj,
02357                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 ),
02358                         void (OBJ::*end)(),const std::string& funname,
02359                         UTable &t)
02360     : UGenericCallback(objname, type, funname,9, t),
02361     obj(obj), fun(end)
02362   {
02363   }
02364 
02365   virtual UValue __evalcall(UList &)
02366   {
02367     ((*obj).*fun)();
02368     return UValue();
02369   }
02370 
02371 private:
02372   OBJ* obj;
02373   void (OBJ::*fun) ();
02374 };
02375 
02376 // void non-member function
02377 template <class INU , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 >
02378 class UFCallbackvoid9 : public UGenericCallback
02379 {
02380  public:
02381   UFCallbackvoid9(const std::string& objname, const std::string& type,
02382                     void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 ),
02383                     const std::string& funname, UTable &t)
02384     : UGenericCallback(objname, type, funname,9, t),  fun(fun)
02385   {
02386   }
02387 
02388   virtual UValue __evalcall(UList &param)
02389   {
02390     // Avoid warnings when we don't use param.
02391     (void) param;
02392     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) );
02393     return UValue();
02394   }
02395 
02396  private:
02397   void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 );
02398 };
02399 
02400 // non void non-member function
02401 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 >
02402 class UFCallback9 : public UGenericCallback
02403 {
02404  public:
02405   UFCallback9(const std::string& objname, const std::string& type,
02406                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 ),
02407                 const std::string& funname, UTable &t)
02408     : UGenericCallback(objname, type, funname,9, t),  fun(fun)
02409   {
02410   }
02411 
02412   virtual UValue __evalcall(UList& param)
02413   {
02414     // Avoid warnings when we don't use param.
02415     (void) param;
02416     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) ));
02417   }
02418 
02419  private:
02420   R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 );
02421 };
02422 
02423 // callback creation for non-member non void return type
02424 
02425 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 >
02426 UGenericCallback*
02427 createUCallback(const std::string& objname, const std::string& type,
02428                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 ),
02429                 const std::string& funname, UTable& t)
02430 {
02431   return new UFCallback9<R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 > (objname, type,fun,funname,t);
02432 }
02433 
02434 // callback creation for non-member void return type
02435 // inline required since one of them is not a template
02436 template < class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 > inline
02437 UGenericCallback*
02438 createUCallback(const std::string& objname, const std::string& type,
02439                 void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 ),
02440                 const std::string& funname,UTable &t)
02441 {
02442   return new UFCallbackvoid9<void , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 > (objname, type,fun,funname,t);
02443 }
02444 
02445 // callback creation for non void return type
02446 
02447 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 >
02448 UGenericCallback*
02449 createUCallback(const std::string& objname, const std::string& type,
02450                 OBJ* obj,
02451                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 ),
02452                 const std::string& funname,UTable &t)
02453 {
02454   return new UCallback9<OBJ,R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 > (objname, type,obj,fun,funname,t);
02455 }
02456 
02457 // callback creation for void return type
02458 
02459 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 >
02460 UGenericCallback*
02461 createUCallback(const std::string& objname, const std::string& type,
02462                 OBJ* obj,
02463                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 ),
02464                 const std::string& funname,UTable &t)
02465 {
02466   return new UCallbackvoid9<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 > (objname, type,obj,fun,funname,t);
02467 }
02468 
02469 // special case for eventend notification
02470 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 >
02471 UGenericCallback*
02472 createUCallback(const std::string& objname, const std::string& type,
02473                 OBJ* obj,
02474                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 ),
02475                 void (OBJ::*end)(), const std::string& funname,UTable &t)
02476 {
02477   return new UCallbacknotifyend9<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 > (objname, type,obj,fun,end,funname,t);
02478 }
02479 
02480 
02481        // non void return type
02482 
02483 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 >
02484 class UCallback10 : public UGenericCallback
02485 {
02486  public:
02487   UCallback10(const std::string& objname, const std::string& type,
02488                OBJ* obj,
02489                R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 ),
02490                const std::string& funname, UTable &t)
02491     : UGenericCallback(objname, type, funname, 10, t),
02492       obj(obj), fun(fun)
02493   {
02494   }
02495 
02496   virtual UValue __evalcall(UList& param)
02497   {
02498     // Avoid warnings when we don't use param.
02499     (void) param;
02500     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) , cast(param[5 - 1], (typename utrait<P5>::noref*)0) , cast(param[6 - 1], (typename utrait<P6>::noref*)0) , cast(param[7 - 1], (typename utrait<P7>::noref*)0) , cast(param[8 - 1], (typename utrait<P8>::noref*)0) , cast(param[9 - 1], (typename utrait<P9>::noref*)0) , cast(param[10 - 1], (typename utrait<P10>::noref*)0) ));
02501   }
02502 
02503  private:
02504   OBJ* obj;
02505   R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 );
02506 };
02507 
02508 // void return type
02509 
02510 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 >
02511 class UCallbackvoid10 : public UGenericCallback
02512 {
02513  public:
02514   UCallbackvoid10(const std::string& objname, const std::string& type,
02515                    OBJ* obj,
02516                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 ),
02517                    const std::string& funname, UTable &t)
02518     : UGenericCallback(objname, type, funname,10, t),
02519     obj(obj), fun(fun)
02520   {
02521   }
02522 
02523   virtual UValue __evalcall(UList &param)
02524   {
02525     // Avoid warnings when we don't use param.
02526     (void) param;
02527     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) );
02528     return UValue();
02529   }
02530  private:
02531   OBJ* obj;
02532   void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 );
02533 };
02534 
02535 // void return type : special case for notifyend event callbacks
02536 
02537 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 >
02538 class UCallbacknotifyend10 : public UGenericCallback
02539 {
02540 public:
02541   UCallbacknotifyend10(const std::string& objname, const std::string& type,
02542                         OBJ* obj,
02543                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 ),
02544                         void (OBJ::*end)(),const std::string& funname,
02545                         UTable &t)
02546     : UGenericCallback(objname, type, funname,10, t),
02547     obj(obj), fun(end)
02548   {
02549   }
02550 
02551   virtual UValue __evalcall(UList &)
02552   {
02553     ((*obj).*fun)();
02554     return UValue();
02555   }
02556 
02557 private:
02558   OBJ* obj;
02559   void (OBJ::*fun) ();
02560 };
02561 
02562 // void non-member function
02563 template <class INU , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 >
02564 class UFCallbackvoid10 : public UGenericCallback
02565 {
02566  public:
02567   UFCallbackvoid10(const std::string& objname, const std::string& type,
02568                     void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 ),
02569                     const std::string& funname, UTable &t)
02570     : UGenericCallback(objname, type, funname,10, t),  fun(fun)
02571   {
02572   }
02573 
02574   virtual UValue __evalcall(UList &param)
02575   {
02576     // Avoid warnings when we don't use param.
02577     (void) param;
02578     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) );
02579     return UValue();
02580   }
02581 
02582  private:
02583   void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 );
02584 };
02585 
02586 // non void non-member function
02587 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 >
02588 class UFCallback10 : public UGenericCallback
02589 {
02590  public:
02591   UFCallback10(const std::string& objname, const std::string& type,
02592                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 ),
02593                 const std::string& funname, UTable &t)
02594     : UGenericCallback(objname, type, funname,10, t),  fun(fun)
02595   {
02596   }
02597 
02598   virtual UValue __evalcall(UList& param)
02599   {
02600     // Avoid warnings when we don't use param.
02601     (void) param;
02602     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) ));
02603   }
02604 
02605  private:
02606   R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 );
02607 };
02608 
02609 // callback creation for non-member non void return type
02610 
02611 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 >
02612 UGenericCallback*
02613 createUCallback(const std::string& objname, const std::string& type,
02614                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 ),
02615                 const std::string& funname, UTable& t)
02616 {
02617   return new UFCallback10<R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 > (objname, type,fun,funname,t);
02618 }
02619 
02620 // callback creation for non-member void return type
02621 // inline required since one of them is not a template
02622 template < class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 > inline
02623 UGenericCallback*
02624 createUCallback(const std::string& objname, const std::string& type,
02625                 void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 ),
02626                 const std::string& funname,UTable &t)
02627 {
02628   return new UFCallbackvoid10<void , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 > (objname, type,fun,funname,t);
02629 }
02630 
02631 // callback creation for non void return type
02632 
02633 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 >
02634 UGenericCallback*
02635 createUCallback(const std::string& objname, const std::string& type,
02636                 OBJ* obj,
02637                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 ),
02638                 const std::string& funname,UTable &t)
02639 {
02640   return new UCallback10<OBJ,R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 > (objname, type,obj,fun,funname,t);
02641 }
02642 
02643 // callback creation for void return type
02644 
02645 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 >
02646 UGenericCallback*
02647 createUCallback(const std::string& objname, const std::string& type,
02648                 OBJ* obj,
02649                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 ),
02650                 const std::string& funname,UTable &t)
02651 {
02652   return new UCallbackvoid10<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 > (objname, type,obj,fun,funname,t);
02653 }
02654 
02655 // special case for eventend notification
02656 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 >
02657 UGenericCallback*
02658 createUCallback(const std::string& objname, const std::string& type,
02659                 OBJ* obj,
02660                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 ),
02661                 void (OBJ::*end)(), const std::string& funname,UTable &t)
02662 {
02663   return new UCallbacknotifyend10<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 > (objname, type,obj,fun,end,funname,t);
02664 }
02665 
02666 
02667        // non void return type
02668 
02669 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 >
02670 class UCallback11 : public UGenericCallback
02671 {
02672  public:
02673   UCallback11(const std::string& objname, const std::string& type,
02674                OBJ* obj,
02675                R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 ),
02676                const std::string& funname, UTable &t)
02677     : UGenericCallback(objname, type, funname, 11, t),
02678       obj(obj), fun(fun)
02679   {
02680   }
02681 
02682   virtual UValue __evalcall(UList& param)
02683   {
02684     // Avoid warnings when we don't use param.
02685     (void) param;
02686     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) , cast(param[5 - 1], (typename utrait<P5>::noref*)0) , cast(param[6 - 1], (typename utrait<P6>::noref*)0) , cast(param[7 - 1], (typename utrait<P7>::noref*)0) , cast(param[8 - 1], (typename utrait<P8>::noref*)0) , cast(param[9 - 1], (typename utrait<P9>::noref*)0) , cast(param[10 - 1], (typename utrait<P10>::noref*)0) , cast(param[11 - 1], (typename utrait<P11>::noref*)0) ));
02687   }
02688 
02689  private:
02690   OBJ* obj;
02691   R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 );
02692 };
02693 
02694 // void return type
02695 
02696 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 >
02697 class UCallbackvoid11 : public UGenericCallback
02698 {
02699  public:
02700   UCallbackvoid11(const std::string& objname, const std::string& type,
02701                    OBJ* obj,
02702                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 ),
02703                    const std::string& funname, UTable &t)
02704     : UGenericCallback(objname, type, funname,11, t),
02705     obj(obj), fun(fun)
02706   {
02707   }
02708 
02709   virtual UValue __evalcall(UList &param)
02710   {
02711     // Avoid warnings when we don't use param.
02712     (void) param;
02713     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) );
02714     return UValue();
02715   }
02716  private:
02717   OBJ* obj;
02718   void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 );
02719 };
02720 
02721 // void return type : special case for notifyend event callbacks
02722 
02723 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 >
02724 class UCallbacknotifyend11 : public UGenericCallback
02725 {
02726 public:
02727   UCallbacknotifyend11(const std::string& objname, const std::string& type,
02728                         OBJ* obj,
02729                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 ),
02730                         void (OBJ::*end)(),const std::string& funname,
02731                         UTable &t)
02732     : UGenericCallback(objname, type, funname,11, t),
02733     obj(obj), fun(end)
02734   {
02735   }
02736 
02737   virtual UValue __evalcall(UList &)
02738   {
02739     ((*obj).*fun)();
02740     return UValue();
02741   }
02742 
02743 private:
02744   OBJ* obj;
02745   void (OBJ::*fun) ();
02746 };
02747 
02748 // void non-member function
02749 template <class INU , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 >
02750 class UFCallbackvoid11 : public UGenericCallback
02751 {
02752  public:
02753   UFCallbackvoid11(const std::string& objname, const std::string& type,
02754                     void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 ),
02755                     const std::string& funname, UTable &t)
02756     : UGenericCallback(objname, type, funname,11, t),  fun(fun)
02757   {
02758   }
02759 
02760   virtual UValue __evalcall(UList &param)
02761   {
02762     // Avoid warnings when we don't use param.
02763     (void) param;
02764     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) );
02765     return UValue();
02766   }
02767 
02768  private:
02769   void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 );
02770 };
02771 
02772 // non void non-member function
02773 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 >
02774 class UFCallback11 : public UGenericCallback
02775 {
02776  public:
02777   UFCallback11(const std::string& objname, const std::string& type,
02778                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 ),
02779                 const std::string& funname, UTable &t)
02780     : UGenericCallback(objname, type, funname,11, t),  fun(fun)
02781   {
02782   }
02783 
02784   virtual UValue __evalcall(UList& param)
02785   {
02786     // Avoid warnings when we don't use param.
02787     (void) param;
02788     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) ));
02789   }
02790 
02791  private:
02792   R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 );
02793 };
02794 
02795 // callback creation for non-member non void return type
02796 
02797 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 >
02798 UGenericCallback*
02799 createUCallback(const std::string& objname, const std::string& type,
02800                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 ),
02801                 const std::string& funname, UTable& t)
02802 {
02803   return new UFCallback11<R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 > (objname, type,fun,funname,t);
02804 }
02805 
02806 // callback creation for non-member void return type
02807 // inline required since one of them is not a template
02808 template < class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 > inline
02809 UGenericCallback*
02810 createUCallback(const std::string& objname, const std::string& type,
02811                 void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 ),
02812                 const std::string& funname,UTable &t)
02813 {
02814   return new UFCallbackvoid11<void , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 > (objname, type,fun,funname,t);
02815 }
02816 
02817 // callback creation for non void return type
02818 
02819 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 >
02820 UGenericCallback*
02821 createUCallback(const std::string& objname, const std::string& type,
02822                 OBJ* obj,
02823                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 ),
02824                 const std::string& funname,UTable &t)
02825 {
02826   return new UCallback11<OBJ,R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 > (objname, type,obj,fun,funname,t);
02827 }
02828 
02829 // callback creation for void return type
02830 
02831 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 >
02832 UGenericCallback*
02833 createUCallback(const std::string& objname, const std::string& type,
02834                 OBJ* obj,
02835                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 ),
02836                 const std::string& funname,UTable &t)
02837 {
02838   return new UCallbackvoid11<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 > (objname, type,obj,fun,funname,t);
02839 }
02840 
02841 // special case for eventend notification
02842 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 >
02843 UGenericCallback*
02844 createUCallback(const std::string& objname, const std::string& type,
02845                 OBJ* obj,
02846                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 ),
02847                 void (OBJ::*end)(), const std::string& funname,UTable &t)
02848 {
02849   return new UCallbacknotifyend11<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 > (objname, type,obj,fun,end,funname,t);
02850 }
02851 
02852 
02853        // non void return type
02854 
02855 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 >
02856 class UCallback12 : public UGenericCallback
02857 {
02858  public:
02859   UCallback12(const std::string& objname, const std::string& type,
02860                OBJ* obj,
02861                R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 ),
02862                const std::string& funname, UTable &t)
02863     : UGenericCallback(objname, type, funname, 12, t),
02864       obj(obj), fun(fun)
02865   {
02866   }
02867 
02868   virtual UValue __evalcall(UList& param)
02869   {
02870     // Avoid warnings when we don't use param.
02871     (void) param;
02872     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) , cast(param[5 - 1], (typename utrait<P5>::noref*)0) , cast(param[6 - 1], (typename utrait<P6>::noref*)0) , cast(param[7 - 1], (typename utrait<P7>::noref*)0) , cast(param[8 - 1], (typename utrait<P8>::noref*)0) , cast(param[9 - 1], (typename utrait<P9>::noref*)0) , cast(param[10 - 1], (typename utrait<P10>::noref*)0) , cast(param[11 - 1], (typename utrait<P11>::noref*)0) , cast(param[12 - 1], (typename utrait<P12>::noref*)0) ));
02873   }
02874 
02875  private:
02876   OBJ* obj;
02877   R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 );
02878 };
02879 
02880 // void return type
02881 
02882 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 >
02883 class UCallbackvoid12 : public UGenericCallback
02884 {
02885  public:
02886   UCallbackvoid12(const std::string& objname, const std::string& type,
02887                    OBJ* obj,
02888                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 ),
02889                    const std::string& funname, UTable &t)
02890     : UGenericCallback(objname, type, funname,12, t),
02891     obj(obj), fun(fun)
02892   {
02893   }
02894 
02895   virtual UValue __evalcall(UList &param)
02896   {
02897     // Avoid warnings when we don't use param.
02898     (void) param;
02899     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) );
02900     return UValue();
02901   }
02902  private:
02903   OBJ* obj;
02904   void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 );
02905 };
02906 
02907 // void return type : special case for notifyend event callbacks
02908 
02909 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 >
02910 class UCallbacknotifyend12 : public UGenericCallback
02911 {
02912 public:
02913   UCallbacknotifyend12(const std::string& objname, const std::string& type,
02914                         OBJ* obj,
02915                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 ),
02916                         void (OBJ::*end)(),const std::string& funname,
02917                         UTable &t)
02918     : UGenericCallback(objname, type, funname,12, t),
02919     obj(obj), fun(end)
02920   {
02921   }
02922 
02923   virtual UValue __evalcall(UList &)
02924   {
02925     ((*obj).*fun)();
02926     return UValue();
02927   }
02928 
02929 private:
02930   OBJ* obj;
02931   void (OBJ::*fun) ();
02932 };
02933 
02934 // void non-member function
02935 template <class INU , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 >
02936 class UFCallbackvoid12 : public UGenericCallback
02937 {
02938  public:
02939   UFCallbackvoid12(const std::string& objname, const std::string& type,
02940                     void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 ),
02941                     const std::string& funname, UTable &t)
02942     : UGenericCallback(objname, type, funname,12, t),  fun(fun)
02943   {
02944   }
02945 
02946   virtual UValue __evalcall(UList &param)
02947   {
02948     // Avoid warnings when we don't use param.
02949     (void) param;
02950     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) );
02951     return UValue();
02952   }
02953 
02954  private:
02955   void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 );
02956 };
02957 
02958 // non void non-member function
02959 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 >
02960 class UFCallback12 : public UGenericCallback
02961 {
02962  public:
02963   UFCallback12(const std::string& objname, const std::string& type,
02964                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 ),
02965                 const std::string& funname, UTable &t)
02966     : UGenericCallback(objname, type, funname,12, t),  fun(fun)
02967   {
02968   }
02969 
02970   virtual UValue __evalcall(UList& param)
02971   {
02972     // Avoid warnings when we don't use param.
02973     (void) param;
02974     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) ));
02975   }
02976 
02977  private:
02978   R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 );
02979 };
02980 
02981 // callback creation for non-member non void return type
02982 
02983 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 >
02984 UGenericCallback*
02985 createUCallback(const std::string& objname, const std::string& type,
02986                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 ),
02987                 const std::string& funname, UTable& t)
02988 {
02989   return new UFCallback12<R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 > (objname, type,fun,funname,t);
02990 }
02991 
02992 // callback creation for non-member void return type
02993 // inline required since one of them is not a template
02994 template < class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 > inline
02995 UGenericCallback*
02996 createUCallback(const std::string& objname, const std::string& type,
02997                 void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 ),
02998                 const std::string& funname,UTable &t)
02999 {
03000   return new UFCallbackvoid12<void , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 > (objname, type,fun,funname,t);
03001 }
03002 
03003 // callback creation for non void return type
03004 
03005 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 >
03006 UGenericCallback*
03007 createUCallback(const std::string& objname, const std::string& type,
03008                 OBJ* obj,
03009                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 ),
03010                 const std::string& funname,UTable &t)
03011 {
03012   return new UCallback12<OBJ,R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 > (objname, type,obj,fun,funname,t);
03013 }
03014 
03015 // callback creation for void return type
03016 
03017 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 >
03018 UGenericCallback*
03019 createUCallback(const std::string& objname, const std::string& type,
03020                 OBJ* obj,
03021                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 ),
03022                 const std::string& funname,UTable &t)
03023 {
03024   return new UCallbackvoid12<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 > (objname, type,obj,fun,funname,t);
03025 }
03026 
03027 // special case for eventend notification
03028 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 >
03029 UGenericCallback*
03030 createUCallback(const std::string& objname, const std::string& type,
03031                 OBJ* obj,
03032                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 ),
03033                 void (OBJ::*end)(), const std::string& funname,UTable &t)
03034 {
03035   return new UCallbacknotifyend12<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 > (objname, type,obj,fun,end,funname,t);
03036 }
03037 
03038 
03039        // non void return type
03040 
03041 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 >
03042 class UCallback13 : public UGenericCallback
03043 {
03044  public:
03045   UCallback13(const std::string& objname, const std::string& type,
03046                OBJ* obj,
03047                R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 ),
03048                const std::string& funname, UTable &t)
03049     : UGenericCallback(objname, type, funname, 13, t),
03050       obj(obj), fun(fun)
03051   {
03052   }
03053 
03054   virtual UValue __evalcall(UList& param)
03055   {
03056     // Avoid warnings when we don't use param.
03057     (void) param;
03058     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) , cast(param[5 - 1], (typename utrait<P5>::noref*)0) , cast(param[6 - 1], (typename utrait<P6>::noref*)0) , cast(param[7 - 1], (typename utrait<P7>::noref*)0) , cast(param[8 - 1], (typename utrait<P8>::noref*)0) , cast(param[9 - 1], (typename utrait<P9>::noref*)0) , cast(param[10 - 1], (typename utrait<P10>::noref*)0) , cast(param[11 - 1], (typename utrait<P11>::noref*)0) , cast(param[12 - 1], (typename utrait<P12>::noref*)0) , cast(param[13 - 1], (typename utrait<P13>::noref*)0) ));
03059   }
03060 
03061  private:
03062   OBJ* obj;
03063   R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 );
03064 };
03065 
03066 // void return type
03067 
03068 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 >
03069 class UCallbackvoid13 : public UGenericCallback
03070 {
03071  public:
03072   UCallbackvoid13(const std::string& objname, const std::string& type,
03073                    OBJ* obj,
03074                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 ),
03075                    const std::string& funname, UTable &t)
03076     : UGenericCallback(objname, type, funname,13, t),
03077     obj(obj), fun(fun)
03078   {
03079   }
03080 
03081   virtual UValue __evalcall(UList &param)
03082   {
03083     // Avoid warnings when we don't use param.
03084     (void) param;
03085     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) , cast(param[13 - 1], (typename utrait<P13>::noref *)0) );
03086     return UValue();
03087   }
03088  private:
03089   OBJ* obj;
03090   void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 );
03091 };
03092 
03093 // void return type : special case for notifyend event callbacks
03094 
03095 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 >
03096 class UCallbacknotifyend13 : public UGenericCallback
03097 {
03098 public:
03099   UCallbacknotifyend13(const std::string& objname, const std::string& type,
03100                         OBJ* obj,
03101                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 ),
03102                         void (OBJ::*end)(),const std::string& funname,
03103                         UTable &t)
03104     : UGenericCallback(objname, type, funname,13, t),
03105     obj(obj), fun(end)
03106   {
03107   }
03108 
03109   virtual UValue __evalcall(UList &)
03110   {
03111     ((*obj).*fun)();
03112     return UValue();
03113   }
03114 
03115 private:
03116   OBJ* obj;
03117   void (OBJ::*fun) ();
03118 };
03119 
03120 // void non-member function
03121 template <class INU , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 >
03122 class UFCallbackvoid13 : public UGenericCallback
03123 {
03124  public:
03125   UFCallbackvoid13(const std::string& objname, const std::string& type,
03126                     void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 ),
03127                     const std::string& funname, UTable &t)
03128     : UGenericCallback(objname, type, funname,13, t),  fun(fun)
03129   {
03130   }
03131 
03132   virtual UValue __evalcall(UList &param)
03133   {
03134     // Avoid warnings when we don't use param.
03135     (void) param;
03136     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) , cast(param[13 - 1], (typename utrait<P13>::noref *)0) );
03137     return UValue();
03138   }
03139 
03140  private:
03141   void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 );
03142 };
03143 
03144 // non void non-member function
03145 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 >
03146 class UFCallback13 : public UGenericCallback
03147 {
03148  public:
03149   UFCallback13(const std::string& objname, const std::string& type,
03150                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 ),
03151                 const std::string& funname, UTable &t)
03152     : UGenericCallback(objname, type, funname,13, t),  fun(fun)
03153   {
03154   }
03155 
03156   virtual UValue __evalcall(UList& param)
03157   {
03158     // Avoid warnings when we don't use param.
03159     (void) param;
03160     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) , cast(param[13 - 1], (typename utrait<P13>::noref *)0) ));
03161   }
03162 
03163  private:
03164   R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 );
03165 };
03166 
03167 // callback creation for non-member non void return type
03168 
03169 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 >
03170 UGenericCallback*
03171 createUCallback(const std::string& objname, const std::string& type,
03172                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 ),
03173                 const std::string& funname, UTable& t)
03174 {
03175   return new UFCallback13<R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 > (objname, type,fun,funname,t);
03176 }
03177 
03178 // callback creation for non-member void return type
03179 // inline required since one of them is not a template
03180 template < class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 > inline
03181 UGenericCallback*
03182 createUCallback(const std::string& objname, const std::string& type,
03183                 void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 ),
03184                 const std::string& funname,UTable &t)
03185 {
03186   return new UFCallbackvoid13<void , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 > (objname, type,fun,funname,t);
03187 }
03188 
03189 // callback creation for non void return type
03190 
03191 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 >
03192 UGenericCallback*
03193 createUCallback(const std::string& objname, const std::string& type,
03194                 OBJ* obj,
03195                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 ),
03196                 const std::string& funname,UTable &t)
03197 {
03198   return new UCallback13<OBJ,R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 > (objname, type,obj,fun,funname,t);
03199 }
03200 
03201 // callback creation for void return type
03202 
03203 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 >
03204 UGenericCallback*
03205 createUCallback(const std::string& objname, const std::string& type,
03206                 OBJ* obj,
03207                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 ),
03208                 const std::string& funname,UTable &t)
03209 {
03210   return new UCallbackvoid13<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 > (objname, type,obj,fun,funname,t);
03211 }
03212 
03213 // special case for eventend notification
03214 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 >
03215 UGenericCallback*
03216 createUCallback(const std::string& objname, const std::string& type,
03217                 OBJ* obj,
03218                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 ),
03219                 void (OBJ::*end)(), const std::string& funname,UTable &t)
03220 {
03221   return new UCallbacknotifyend13<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 > (objname, type,obj,fun,end,funname,t);
03222 }
03223 
03224 
03225        // non void return type
03226 
03227 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 >
03228 class UCallback14 : public UGenericCallback
03229 {
03230  public:
03231   UCallback14(const std::string& objname, const std::string& type,
03232                OBJ* obj,
03233                R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 ),
03234                const std::string& funname, UTable &t)
03235     : UGenericCallback(objname, type, funname, 14, t),
03236       obj(obj), fun(fun)
03237   {
03238   }
03239 
03240   virtual UValue __evalcall(UList& param)
03241   {
03242     // Avoid warnings when we don't use param.
03243     (void) param;
03244     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) , cast(param[5 - 1], (typename utrait<P5>::noref*)0) , cast(param[6 - 1], (typename utrait<P6>::noref*)0) , cast(param[7 - 1], (typename utrait<P7>::noref*)0) , cast(param[8 - 1], (typename utrait<P8>::noref*)0) , cast(param[9 - 1], (typename utrait<P9>::noref*)0) , cast(param[10 - 1], (typename utrait<P10>::noref*)0) , cast(param[11 - 1], (typename utrait<P11>::noref*)0) , cast(param[12 - 1], (typename utrait<P12>::noref*)0) , cast(param[13 - 1], (typename utrait<P13>::noref*)0) , cast(param[14 - 1], (typename utrait<P14>::noref*)0) ));
03245   }
03246 
03247  private:
03248   OBJ* obj;
03249   R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 );
03250 };
03251 
03252 // void return type
03253 
03254 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 >
03255 class UCallbackvoid14 : public UGenericCallback
03256 {
03257  public:
03258   UCallbackvoid14(const std::string& objname, const std::string& type,
03259                    OBJ* obj,
03260                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 ),
03261                    const std::string& funname, UTable &t)
03262     : UGenericCallback(objname, type, funname,14, t),
03263     obj(obj), fun(fun)
03264   {
03265   }
03266 
03267   virtual UValue __evalcall(UList &param)
03268   {
03269     // Avoid warnings when we don't use param.
03270     (void) param;
03271     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) , cast(param[13 - 1], (typename utrait<P13>::noref *)0) , cast(param[14 - 1], (typename utrait<P14>::noref *)0) );
03272     return UValue();
03273   }
03274  private:
03275   OBJ* obj;
03276   void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 );
03277 };
03278 
03279 // void return type : special case for notifyend event callbacks
03280 
03281 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 >
03282 class UCallbacknotifyend14 : public UGenericCallback
03283 {
03284 public:
03285   UCallbacknotifyend14(const std::string& objname, const std::string& type,
03286                         OBJ* obj,
03287                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 ),
03288                         void (OBJ::*end)(),const std::string& funname,
03289                         UTable &t)
03290     : UGenericCallback(objname, type, funname,14, t),
03291     obj(obj), fun(end)
03292   {
03293   }
03294 
03295   virtual UValue __evalcall(UList &)
03296   {
03297     ((*obj).*fun)();
03298     return UValue();
03299   }
03300 
03301 private:
03302   OBJ* obj;
03303   void (OBJ::*fun) ();
03304 };
03305 
03306 // void non-member function
03307 template <class INU , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 >
03308 class UFCallbackvoid14 : public UGenericCallback
03309 {
03310  public:
03311   UFCallbackvoid14(const std::string& objname, const std::string& type,
03312                     void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 ),
03313                     const std::string& funname, UTable &t)
03314     : UGenericCallback(objname, type, funname,14, t),  fun(fun)
03315   {
03316   }
03317 
03318   virtual UValue __evalcall(UList &param)
03319   {
03320     // Avoid warnings when we don't use param.
03321     (void) param;
03322     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) , cast(param[13 - 1], (typename utrait<P13>::noref *)0) , cast(param[14 - 1], (typename utrait<P14>::noref *)0) );
03323     return UValue();
03324   }
03325 
03326  private:
03327   void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 );
03328 };
03329 
03330 // non void non-member function
03331 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 >
03332 class UFCallback14 : public UGenericCallback
03333 {
03334  public:
03335   UFCallback14(const std::string& objname, const std::string& type,
03336                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 ),
03337                 const std::string& funname, UTable &t)
03338     : UGenericCallback(objname, type, funname,14, t),  fun(fun)
03339   {
03340   }
03341 
03342   virtual UValue __evalcall(UList& param)
03343   {
03344     // Avoid warnings when we don't use param.
03345     (void) param;
03346     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) , cast(param[13 - 1], (typename utrait<P13>::noref *)0) , cast(param[14 - 1], (typename utrait<P14>::noref *)0) ));
03347   }
03348 
03349  private:
03350   R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 );
03351 };
03352 
03353 // callback creation for non-member non void return type
03354 
03355 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 >
03356 UGenericCallback*
03357 createUCallback(const std::string& objname, const std::string& type,
03358                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 ),
03359                 const std::string& funname, UTable& t)
03360 {
03361   return new UFCallback14<R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 > (objname, type,fun,funname,t);
03362 }
03363 
03364 // callback creation for non-member void return type
03365 // inline required since one of them is not a template
03366 template < class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 > inline
03367 UGenericCallback*
03368 createUCallback(const std::string& objname, const std::string& type,
03369                 void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 ),
03370                 const std::string& funname,UTable &t)
03371 {
03372   return new UFCallbackvoid14<void , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 > (objname, type,fun,funname,t);
03373 }
03374 
03375 // callback creation for non void return type
03376 
03377 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 >
03378 UGenericCallback*
03379 createUCallback(const std::string& objname, const std::string& type,
03380                 OBJ* obj,
03381                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 ),
03382                 const std::string& funname,UTable &t)
03383 {
03384   return new UCallback14<OBJ,R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 > (objname, type,obj,fun,funname,t);
03385 }
03386 
03387 // callback creation for void return type
03388 
03389 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 >
03390 UGenericCallback*
03391 createUCallback(const std::string& objname, const std::string& type,
03392                 OBJ* obj,
03393                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 ),
03394                 const std::string& funname,UTable &t)
03395 {
03396   return new UCallbackvoid14<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 > (objname, type,obj,fun,funname,t);
03397 }
03398 
03399 // special case for eventend notification
03400 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 >
03401 UGenericCallback*
03402 createUCallback(const std::string& objname, const std::string& type,
03403                 OBJ* obj,
03404                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 ),
03405                 void (OBJ::*end)(), const std::string& funname,UTable &t)
03406 {
03407   return new UCallbacknotifyend14<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 > (objname, type,obj,fun,end,funname,t);
03408 }
03409 
03410 
03411        // non void return type
03412 
03413 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 >
03414 class UCallback15 : public UGenericCallback
03415 {
03416  public:
03417   UCallback15(const std::string& objname, const std::string& type,
03418                OBJ* obj,
03419                R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 ),
03420                const std::string& funname, UTable &t)
03421     : UGenericCallback(objname, type, funname, 15, t),
03422       obj(obj), fun(fun)
03423   {
03424   }
03425 
03426   virtual UValue __evalcall(UList& param)
03427   {
03428     // Avoid warnings when we don't use param.
03429     (void) param;
03430     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) , cast(param[5 - 1], (typename utrait<P5>::noref*)0) , cast(param[6 - 1], (typename utrait<P6>::noref*)0) , cast(param[7 - 1], (typename utrait<P7>::noref*)0) , cast(param[8 - 1], (typename utrait<P8>::noref*)0) , cast(param[9 - 1], (typename utrait<P9>::noref*)0) , cast(param[10 - 1], (typename utrait<P10>::noref*)0) , cast(param[11 - 1], (typename utrait<P11>::noref*)0) , cast(param[12 - 1], (typename utrait<P12>::noref*)0) , cast(param[13 - 1], (typename utrait<P13>::noref*)0) , cast(param[14 - 1], (typename utrait<P14>::noref*)0) , cast(param[15 - 1], (typename utrait<P15>::noref*)0) ));
03431   }
03432 
03433  private:
03434   OBJ* obj;
03435   R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 );
03436 };
03437 
03438 // void return type
03439 
03440 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 >
03441 class UCallbackvoid15 : public UGenericCallback
03442 {
03443  public:
03444   UCallbackvoid15(const std::string& objname, const std::string& type,
03445                    OBJ* obj,
03446                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 ),
03447                    const std::string& funname, UTable &t)
03448     : UGenericCallback(objname, type, funname,15, t),
03449     obj(obj), fun(fun)
03450   {
03451   }
03452 
03453   virtual UValue __evalcall(UList &param)
03454   {
03455     // Avoid warnings when we don't use param.
03456     (void) param;
03457     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) , cast(param[13 - 1], (typename utrait<P13>::noref *)0) , cast(param[14 - 1], (typename utrait<P14>::noref *)0) , cast(param[15 - 1], (typename utrait<P15>::noref *)0) );
03458     return UValue();
03459   }
03460  private:
03461   OBJ* obj;
03462   void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 );
03463 };
03464 
03465 // void return type : special case for notifyend event callbacks
03466 
03467 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 >
03468 class UCallbacknotifyend15 : public UGenericCallback
03469 {
03470 public:
03471   UCallbacknotifyend15(const std::string& objname, const std::string& type,
03472                         OBJ* obj,
03473                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 ),
03474                         void (OBJ::*end)(),const std::string& funname,
03475                         UTable &t)
03476     : UGenericCallback(objname, type, funname,15, t),
03477     obj(obj), fun(end)
03478   {
03479   }
03480 
03481   virtual UValue __evalcall(UList &)
03482   {
03483     ((*obj).*fun)();
03484     return UValue();
03485   }
03486 
03487 private:
03488   OBJ* obj;
03489   void (OBJ::*fun) ();
03490 };
03491 
03492 // void non-member function
03493 template <class INU , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 >
03494 class UFCallbackvoid15 : public UGenericCallback
03495 {
03496  public:
03497   UFCallbackvoid15(const std::string& objname, const std::string& type,
03498                     void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 ),
03499                     const std::string& funname, UTable &t)
03500     : UGenericCallback(objname, type, funname,15, t),  fun(fun)
03501   {
03502   }
03503 
03504   virtual UValue __evalcall(UList &param)
03505   {
03506     // Avoid warnings when we don't use param.
03507     (void) param;
03508     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) , cast(param[13 - 1], (typename utrait<P13>::noref *)0) , cast(param[14 - 1], (typename utrait<P14>::noref *)0) , cast(param[15 - 1], (typename utrait<P15>::noref *)0) );
03509     return UValue();
03510   }
03511 
03512  private:
03513   void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 );
03514 };
03515 
03516 // non void non-member function
03517 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 >
03518 class UFCallback15 : public UGenericCallback
03519 {
03520  public:
03521   UFCallback15(const std::string& objname, const std::string& type,
03522                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 ),
03523                 const std::string& funname, UTable &t)
03524     : UGenericCallback(objname, type, funname,15, t),  fun(fun)
03525   {
03526   }
03527 
03528   virtual UValue __evalcall(UList& param)
03529   {
03530     // Avoid warnings when we don't use param.
03531     (void) param;
03532     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) , cast(param[13 - 1], (typename utrait<P13>::noref *)0) , cast(param[14 - 1], (typename utrait<P14>::noref *)0) , cast(param[15 - 1], (typename utrait<P15>::noref *)0) ));
03533   }
03534 
03535  private:
03536   R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 );
03537 };
03538 
03539 // callback creation for non-member non void return type
03540 
03541 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 >
03542 UGenericCallback*
03543 createUCallback(const std::string& objname, const std::string& type,
03544                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 ),
03545                 const std::string& funname, UTable& t)
03546 {
03547   return new UFCallback15<R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 > (objname, type,fun,funname,t);
03548 }
03549 
03550 // callback creation for non-member void return type
03551 // inline required since one of them is not a template
03552 template < class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 > inline
03553 UGenericCallback*
03554 createUCallback(const std::string& objname, const std::string& type,
03555                 void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 ),
03556                 const std::string& funname,UTable &t)
03557 {
03558   return new UFCallbackvoid15<void , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 > (objname, type,fun,funname,t);
03559 }
03560 
03561 // callback creation for non void return type
03562 
03563 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 >
03564 UGenericCallback*
03565 createUCallback(const std::string& objname, const std::string& type,
03566                 OBJ* obj,
03567                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 ),
03568                 const std::string& funname,UTable &t)
03569 {
03570   return new UCallback15<OBJ,R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 > (objname, type,obj,fun,funname,t);
03571 }
03572 
03573 // callback creation for void return type
03574 
03575 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 >
03576 UGenericCallback*
03577 createUCallback(const std::string& objname, const std::string& type,
03578                 OBJ* obj,
03579                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 ),
03580                 const std::string& funname,UTable &t)
03581 {
03582   return new UCallbackvoid15<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 > (objname, type,obj,fun,funname,t);
03583 }
03584 
03585 // special case for eventend notification
03586 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 >
03587 UGenericCallback*
03588 createUCallback(const std::string& objname, const std::string& type,
03589                 OBJ* obj,
03590                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 ),
03591                 void (OBJ::*end)(), const std::string& funname,UTable &t)
03592 {
03593   return new UCallbacknotifyend15<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 > (objname, type,obj,fun,end,funname,t);
03594 }
03595 
03596 
03597        // non void return type
03598 
03599 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 >
03600 class UCallback16 : public UGenericCallback
03601 {
03602  public:
03603   UCallback16(const std::string& objname, const std::string& type,
03604                OBJ* obj,
03605                R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 ),
03606                const std::string& funname, UTable &t)
03607     : UGenericCallback(objname, type, funname, 16, t),
03608       obj(obj), fun(fun)
03609   {
03610   }
03611 
03612   virtual UValue __evalcall(UList& param)
03613   {
03614     // Avoid warnings when we don't use param.
03615     (void) param;
03616     return UValue(((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref*)0) , cast(param[2 - 1], (typename utrait<P2>::noref*)0) , cast(param[3 - 1], (typename utrait<P3>::noref*)0) , cast(param[4 - 1], (typename utrait<P4>::noref*)0) , cast(param[5 - 1], (typename utrait<P5>::noref*)0) , cast(param[6 - 1], (typename utrait<P6>::noref*)0) , cast(param[7 - 1], (typename utrait<P7>::noref*)0) , cast(param[8 - 1], (typename utrait<P8>::noref*)0) , cast(param[9 - 1], (typename utrait<P9>::noref*)0) , cast(param[10 - 1], (typename utrait<P10>::noref*)0) , cast(param[11 - 1], (typename utrait<P11>::noref*)0) , cast(param[12 - 1], (typename utrait<P12>::noref*)0) , cast(param[13 - 1], (typename utrait<P13>::noref*)0) , cast(param[14 - 1], (typename utrait<P14>::noref*)0) , cast(param[15 - 1], (typename utrait<P15>::noref*)0) , cast(param[16 - 1], (typename utrait<P16>::noref*)0) ));
03617   }
03618 
03619  private:
03620   OBJ* obj;
03621   R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 );
03622 };
03623 
03624 // void return type
03625 
03626 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 >
03627 class UCallbackvoid16 : public UGenericCallback
03628 {
03629  public:
03630   UCallbackvoid16(const std::string& objname, const std::string& type,
03631                    OBJ* obj,
03632                    void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 ),
03633                    const std::string& funname, UTable &t)
03634     : UGenericCallback(objname, type, funname,16, t),
03635     obj(obj), fun(fun)
03636   {
03637   }
03638 
03639   virtual UValue __evalcall(UList &param)
03640   {
03641     // Avoid warnings when we don't use param.
03642     (void) param;
03643     ((*obj).*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) , cast(param[13 - 1], (typename utrait<P13>::noref *)0) , cast(param[14 - 1], (typename utrait<P14>::noref *)0) , cast(param[15 - 1], (typename utrait<P15>::noref *)0) , cast(param[16 - 1], (typename utrait<P16>::noref *)0) );
03644     return UValue();
03645   }
03646  private:
03647   OBJ* obj;
03648   void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 );
03649 };
03650 
03651 // void return type : special case for notifyend event callbacks
03652 
03653 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 >
03654 class UCallbacknotifyend16 : public UGenericCallback
03655 {
03656 public:
03657   UCallbacknotifyend16(const std::string& objname, const std::string& type,
03658                         OBJ* obj,
03659                         void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 ),
03660                         void (OBJ::*end)(),const std::string& funname,
03661                         UTable &t)
03662     : UGenericCallback(objname, type, funname,16, t),
03663     obj(obj), fun(end)
03664   {
03665   }
03666 
03667   virtual UValue __evalcall(UList &)
03668   {
03669     ((*obj).*fun)();
03670     return UValue();
03671   }
03672 
03673 private:
03674   OBJ* obj;
03675   void (OBJ::*fun) ();
03676 };
03677 
03678 // void non-member function
03679 template <class INU , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 >
03680 class UFCallbackvoid16 : public UGenericCallback
03681 {
03682  public:
03683   UFCallbackvoid16(const std::string& objname, const std::string& type,
03684                     void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 ),
03685                     const std::string& funname, UTable &t)
03686     : UGenericCallback(objname, type, funname,16, t),  fun(fun)
03687   {
03688   }
03689 
03690   virtual UValue __evalcall(UList &param)
03691   {
03692     // Avoid warnings when we don't use param.
03693     (void) param;
03694     (*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) , cast(param[13 - 1], (typename utrait<P13>::noref *)0) , cast(param[14 - 1], (typename utrait<P14>::noref *)0) , cast(param[15 - 1], (typename utrait<P15>::noref *)0) , cast(param[16 - 1], (typename utrait<P16>::noref *)0) );
03695     return UValue();
03696   }
03697 
03698  private:
03699   void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 );
03700 };
03701 
03702 // non void non-member function
03703 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 >
03704 class UFCallback16 : public UGenericCallback
03705 {
03706  public:
03707   UFCallback16(const std::string& objname, const std::string& type,
03708                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 ),
03709                 const std::string& funname, UTable &t)
03710     : UGenericCallback(objname, type, funname,16, t),  fun(fun)
03711   {
03712   }
03713 
03714   virtual UValue __evalcall(UList& param)
03715   {
03716     // Avoid warnings when we don't use param.
03717     (void) param;
03718     return UValue((*fun)( cast(param[1 - 1], (typename utrait<P1>::noref *)0) , cast(param[2 - 1], (typename utrait<P2>::noref *)0) , cast(param[3 - 1], (typename utrait<P3>::noref *)0) , cast(param[4 - 1], (typename utrait<P4>::noref *)0) , cast(param[5 - 1], (typename utrait<P5>::noref *)0) , cast(param[6 - 1], (typename utrait<P6>::noref *)0) , cast(param[7 - 1], (typename utrait<P7>::noref *)0) , cast(param[8 - 1], (typename utrait<P8>::noref *)0) , cast(param[9 - 1], (typename utrait<P9>::noref *)0) , cast(param[10 - 1], (typename utrait<P10>::noref *)0) , cast(param[11 - 1], (typename utrait<P11>::noref *)0) , cast(param[12 - 1], (typename utrait<P12>::noref *)0) , cast(param[13 - 1], (typename utrait<P13>::noref *)0) , cast(param[14 - 1], (typename utrait<P14>::noref *)0) , cast(param[15 - 1], (typename utrait<P15>::noref *)0) , cast(param[16 - 1], (typename utrait<P16>::noref *)0) ));
03719   }
03720 
03721  private:
03722   R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 );
03723 };
03724 
03725 // callback creation for non-member non void return type
03726 
03727 template <class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 >
03728 UGenericCallback*
03729 createUCallback(const std::string& objname, const std::string& type,
03730                 R (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 ),
03731                 const std::string& funname, UTable& t)
03732 {
03733   return new UFCallback16<R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 > (objname, type,fun,funname,t);
03734 }
03735 
03736 // callback creation for non-member void return type
03737 // inline required since one of them is not a template
03738 template < class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 > inline
03739 UGenericCallback*
03740 createUCallback(const std::string& objname, const std::string& type,
03741                 void (*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 ),
03742                 const std::string& funname,UTable &t)
03743 {
03744   return new UFCallbackvoid16<void , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 > (objname, type,fun,funname,t);
03745 }
03746 
03747 // callback creation for non void return type
03748 
03749 template <class OBJ, class R, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 >
03750 UGenericCallback*
03751 createUCallback(const std::string& objname, const std::string& type,
03752                 OBJ* obj,
03753                 R (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 ),
03754                 const std::string& funname,UTable &t)
03755 {
03756   return new UCallback16<OBJ,R, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 > (objname, type,obj,fun,funname,t);
03757 }
03758 
03759 // callback creation for void return type
03760 
03761 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 >
03762 UGenericCallback*
03763 createUCallback(const std::string& objname, const std::string& type,
03764                 OBJ* obj,
03765                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 ),
03766                 const std::string& funname,UTable &t)
03767 {
03768   return new UCallbackvoid16<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 > (objname, type,obj,fun,funname,t);
03769 }
03770 
03771 // special case for eventend notification
03772 template <class OBJ, class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 >
03773 UGenericCallback*
03774 createUCallback(const std::string& objname, const std::string& type,
03775                 OBJ* obj,
03776                 void (OBJ::*fun) ( P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 ),
03777                 void (OBJ::*end)(), const std::string& funname,UTable &t)
03778 {
03779   return new UCallbacknotifyend16<OBJ, P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 > (objname, type,obj,fun,end,funname,t);
03780 }
03781 
03782 
03783 } // end namespace urbi
03784 
03785 #endif // ! URBI_UOBJECT_HH
03786 

Generated on Tue Apr 10 17:45:45 2007 for URBISDK by  doxygen 1.5.1