Orxonox  0.0.5 Codename: Arcturus
Super.h
Go to the documentation of this file.
1 /*
2  * ORXONOX - the hottest 3D action shooter ever to exist
3  * > www.orxonox.net <
4  *
5  *
6  * License notice:
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * Author:
23  * Fabian 'x3n' Landau
24  * Co-authors:
25  * ...
26  *
27  */
28 
71 #ifndef _Super_H__
72 #define _Super_H__
73 
74 #include "core/CorePrereqs.h"
75 #include "util/Output.h"
76 
78 // Macro definitions //
80 
82 
90  #define SUPER_FUNCTION(functionnumber, baseclass, functionname, purevirtualbase) \
91  template <class T, int templatehack2> \
92  struct SuperFunctionCondition<functionnumber, T, 0, templatehack2> \
93  { \
94  static void superCheck() \
95  { \
96  SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(nullptr)); \
97  SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::superCheck(); \
98  } \
99  \
100  static void apply(void*) {} \
101  \
102  static void apply(baseclass*) \
103  { \
104  ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier(); \
105  for (const Identifier* child : identifier->getDirectChildren()) \
106  { \
107  if (((ClassIdentifier<T>*)child)->bSuperFunctionCaller_##functionname##_isFallback_ && ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_) \
108  { \
109  delete ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_; \
110  ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_ = nullptr; \
111  ((ClassIdentifier<T>*)child)->bSuperFunctionCaller_##functionname##_isFallback_ = false; \
112  } \
113  \
114  if (!((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_) \
115  { \
116  orxout(verbose, context::super) << "Added SuperFunctionCaller for " << #functionname << ": " << ClassIdentifier<T>::getIdentifier()->getName() << " <- " << ((ClassIdentifier<T>*)child)->getName() << endl; \
117  ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>; \
118  } \
119  else if (((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_->getParentIdentifier() != ClassIdentifier<T>::getIdentifier()) \
120  orxout(internal_warning, context::super) << "SuperFunctionCaller for " << #functionname << " in " << ((ClassIdentifier<T>*)child)->getName() << " calls function of " << ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_->getParentIdentifier()->getName() << " but " << ClassIdentifier<T>::getIdentifier()->getName() << " is also possible (do you use multiple inheritance?)" << endl; \
121  } \
122  } \
123  }; \
124  \
125  SUPER_FUNCTION_PUREVIRTUAL_WORKAROUND##purevirtualbase(functionnumber, baseclass)
126 
127  #define SUPER_FUNCTION_PUREVIRTUAL_WORKAROUND0(functionnumber, baseclass) SUPER_FUNCTION_PUREVIRTUAL_WORKAROUNDfalse(functionnumber, baseclass)
128  #define SUPER_FUNCTION_PUREVIRTUAL_WORKAROUND1(functionnumber, baseclass) SUPER_FUNCTION_PUREVIRTUAL_WORKAROUNDtrue(functionnumber, baseclass)
129  #define SUPER_FUNCTION_PUREVIRTUAL_WORKAROUNDfalse(functionnumber, baseclass)
130  #define SUPER_FUNCTION_PUREVIRTUAL_WORKAROUNDtrue(functionnumber, baseclass) \
131  template <int templatehack2> \
132  struct SuperFunctionCondition<functionnumber, baseclass, 0, templatehack2> \
133  { \
134  static void superCheck() \
135  { \
136  SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::superCheck(); \
137  } \
138  };
139 
140 
141  /*
143 
144  // Partially specialized template (templatehack is now specialized too).
145  //
146  // This ensures the compiler takes THIS template if the header-file of the super-function
147  // is included. In any other case, the compiler just uses the fallback template which is
148  // defined in this file.
149  template <class T, templatehack2>
150  struct SuperFunctionCondition<functionnumber, T, 0, templatehack2>
151  {
152  static void superCheck()
153  {
154  // This call to the apply-function is the whole check. By calling the function with
155  // a T* pointer, the right function get's called.
156  SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(nullptr));
157 
158  // Go go the superCheck for of next super-function (functionnumber + 1)
159  SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::superCheck();
160  }
161 
162  // This function gets called if T is not a child of the baseclass.
163  // The function does nothing.
164  static void apply(void* temp) {}
165 
166  // This function gets called if T is a child of the baseclass and can therefore be converted.
167  // The function adds a SuperFunctionCaller to the Identifier of all subclasses of T.
168  static void apply(baseclass* temp)
169  {
170  ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier();
171 
172  // Iterate through all children
173  for (const Identifier* child : identifier->getDirectChildren())
174  {
175  // Check if the caller is a fallback-caller
176  if (((ClassIdentifier<T>*)child)->bSuperFunctionCaller_##functionname##_isFallback_ && ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_)
177  {
178  // Delete the fallback caller an prepare to get a real caller
179  delete ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_;
180  ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_ = nullptr;
181  ((ClassIdentifier<T>*)child)->bSuperFunctionCaller_##functionname##_isFallback_ = false;
182  }
183 
184  // Check if there's not already a caller
185  if (!((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_)
186  {
187  // Add the SuperFunctionCaller
188  orxout(verbose, context::super) << "adding functionpointer to " << ((ClassIdentifier<T>*)child)->getName() << endl;
189  ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_##functionname <T>;
190  }
191 
192  // If there is already a caller, but for another parent, print a warning
193  else if (((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_->getParentIdentifier() != ClassIdentifier<T>::getIdentifier())
194  orxout(internal_warning, context::super) << "SuperFunctionCaller for " << #functionname << " in " << ((ClassIdentifier<T>*)child)->getName() << " calls function of " << ((ClassIdentifier<T>*)child)->superFunctionCaller_##functionname##_->getParentIdentifier()->getName() << " but " << ClassIdentifier<T>::getIdentifier()->getName() << " is also possible (do you use multiple inheritance?)" << endl;
195  }
196  }
197  };
198  SUPER_FUNCTION_PUREVIRTUAL_WORKAROUND##purevirtualbase
199 
200 
201  // The following piece of code is only added if purevirtualbase = true
202 
203  // Explicit specialization of the Condition template for the baseclass to avoid
204  // errors if the function is pure virtual in the baseclass.
205  template <int templatehack2> \
206  struct SuperFunctionCondition<functionnumber, baseclass, 0, templatehack2> \
207  { \
208  // The superCheck function acts like the fallback - it advances to the check for the next super-function (functionnumber + 1)
209  static void superCheck() \
210  { \
211  SuperFunctionCondition<functionnumber + 1, baseclass, 0, templatehack2>::superCheck(); \
212  } \
213  };
214  */
215 
217  #ifdef ORXONOX_COMPILER_MSVC
218  #define SUPER(classname, functionname, ...) \
219  __super::functionname(__VA_ARGS__)
220  #else
221  #define SUPER(classname, functionname, ...) \
222  SUPER_##functionname(classname, functionname, __VA_ARGS__)
223  #endif
224 
225  // helper macro: for functions without arguments
226  #define SUPER_NOARGS(classname, functionname) \
227  (*ClassIdentifier<classname>::getIdentifier()->superFunctionCaller_##functionname##_)(this)
228 
229  // helper macro: for functions with arguments
230  #define SUPER_ARGS(classname, functionname, ...) \
231  (*ClassIdentifier<classname>::getIdentifier()->superFunctionCaller_##functionname##_)(this, __VA_ARGS__)
232 
233 
235 
236  /*
237  Add a macro for each super-function
238 
239  Example (no arguments):
240  #define SUPER_myfunction(classname, functionname, ...) \
241  SUPER_NOARGS(classname, functionname)
242 
243  Example (with arguments):
244  #define SUPER_myfunction(classname, functionname, ...) \
245  SUPER_ARGS(classname, functionname, __VA_ARGS__)
246  */
247 
248  // (1/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
249  #define SUPER_XMLPort(classname, functionname, ...) \
250  SUPER_ARGS(classname, functionname, __VA_ARGS__)
251 
252  #define SUPER_tick(classname, functionname, ...) \
253  SUPER_ARGS(classname, functionname, __VA_ARGS__)
254 
255  #define SUPER_changedActivity(classname, functionname, ...) \
256  SUPER_NOARGS(classname, functionname)
257 
258  #define SUPER_changedVisibility(classname, functionname, ...) \
259  SUPER_NOARGS(classname, functionname)
260 
261  #define SUPER_XMLEventPort(classname, functionname, ...) \
262  SUPER_ARGS(classname, functionname, __VA_ARGS__)
263 
264  #define SUPER_changedScale(classname, functionname, ...) \
265  SUPER_NOARGS(classname, functionname)
266 
267  #define SUPER_changedOwner(classname, functionname, ...) \
268  SUPER_NOARGS(classname, functionname)
269 
270  #define SUPER_changedOverlayGroup(classname, functionname, ...) \
271  SUPER_NOARGS(classname, functionname)
272 
273  #define SUPER_changedName(classname, functionname, ...) \
274  SUPER_NOARGS(classname, functionname)
275 
276  #define SUPER_changedUsed(classname, functionname, ...) \
277  SUPER_NOARGS(classname, functionname)
278 
279  #define SUPER_changedCarrier(classname, functionname, ...) \
280  SUPER_NOARGS(classname, functionname)
281 
282  #define SUPER_changedPickedUp(classname, functionname, ...) \
283  SUPER_NOARGS(classname, functionname)
284 
285  // (1/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
286 
287 
288 namespace orxonox
289 {
291  // This code gets included by Identifier.h and every other header file that needs a super-function //
293 
295 
296  // Base templates
300  template <int functionnumber, class T, int templatehack1, int templatehack2>
302  {
303  static void superCheck() {}
304  };
305 
309  template <int functionnumber, class T>
311  {
313  };
314 
318  template <int functionnumber, class T>
320  {
321  static void destroy(ClassIdentifier<T>*) {}
322  };
323 
324 
326 
334  #define SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(functionnumber, functionname, hasarguments, ...) \
335  template <class T, int templatehack1, int templatehack2> \
336  struct SuperFunctionCondition<functionnumber, T, templatehack1, templatehack2> \
337  { \
338  static void superCheck() \
339  { \
340  SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::superCheck(); \
341  } \
342  }; \
343  \
344  class _CoreExport SuperFunctionCaller_##functionname \
345  { \
346  public: \
347  virtual void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) = 0; \
348  virtual ~SuperFunctionCaller_##functionname () {} \
349  virtual Identifier* getParentIdentifier() const = 0; \
350  }; \
351  \
352  template <class T> \
353  class SuperFunctionClassCaller_purevirtualfallback_##functionname : public SuperFunctionCaller_##functionname \
354  { \
355  public: \
356  inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) \
357  { \
358  } \
359  \
360  Identifier* getParentIdentifier() const \
361  { \
362  return ClassIdentifier<T>::getIdentifier(); \
363  } \
364  }; \
365  \
366  template <class T> \
367  struct SuperFunctionInitialization<functionnumber, T> \
368  { \
369  static void initialize(ClassIdentifier<T>* identifier) \
370  { \
371  identifier->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_purevirtualfallback_##functionname <T>; \
372  identifier->bSuperFunctionCaller_##functionname##_isFallback_ = true; \
373  SuperFunctionInitialization<functionnumber + 1, T>::initialize(identifier); \
374  } \
375  }; \
376  \
377  template <class T> \
378  struct SuperFunctionDestruction<functionnumber, T> \
379  { \
380  static void destroy(ClassIdentifier<T>* identifier) \
381  { \
382  if (identifier->superFunctionCaller_##functionname##_) \
383  delete identifier->superFunctionCaller_##functionname##_; \
384  SuperFunctionDestruction<functionnumber + 1, T>::destroy(identifier); \
385  } \
386  }; \
387  \
388  template <class T> \
389  class SuperFunctionClassCaller_##functionname : public SuperFunctionCaller_##functionname \
390  { \
391  public: \
392  inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) \
393  { \
394  (orxonox_cast<T*>(object))->T:: functionname
395 
396  /*
397  JUST ADD THE FUNCTION ARGUMENTS BETWEEN BOTH MACROS, ENCLOSED BY BRACKETS
398  EXAMPLE:
399 
400  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(0, myfunction, true, int myvalue, float myothervalue) <-- !!! DONT ADD A SEMICOLON HERE !!!
401  (myvalue, myothervalue)
402  SUPER_FUNCTION_GLOBAL_DECLARATION_PART2
403  */
404 
405  #define SUPER_FUNCTION_GLOBAL_DECLARATION_PART2 \
406  ; \
407  } \
408  \
409  Identifier* getParentIdentifier() const \
410  { \
411  return ClassIdentifier<T>::getIdentifier(); \
412  } \
413  };
414 
415  #define SUPER_CALL_ARGUMENTSfalse(...) Identifiable* object
416  #define SUPER_CALL_ARGUMENTS0(...) Identifiable* object
417  #define SUPER_CALL_ARGUMENTStrue(...) Identifiable* object, __VA_ARGS__
418  #define SUPER_CALL_ARGUMENTS1(...) Identifiable* object, __VA_ARGS__
419 
420 
421  /*
423 
424  // Partially specialized template (templatehack not yet specialized, this
425  // will be done by the real condition in the header-file of the super-function)
426  // Only used as fallback
427  template <class T, int templatehack1, int templatehack2>
428  struct SuperFunctionCondition<functionnumber, T, templatehack1, templatehack2>
429  {
430  // If this function gets called, the header-file of the super function is not
431  // included, so this fallback template (templatehack not specialized) is used
432  static void superCheck()
433  {
434  // Calls the condition-check of the next super-function (functionnumber + 1)
435  SuperFunctionCondition<functionnumber + 1, T, templatehack1, templatehack2>::superCheck();
436  }
437  };
438 
439  // Baseclass of the super-function caller. The real call will be done by a
440  // templatized subclass through the virtual () operator.
441  class _CoreExport SuperFunctionCaller_##functionname
442  {
443  public:
444  virtual void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) = 0;
445  virtual ~SuperFunctionCaller_##functionname () {}
446  virtual Identifier* getParentIdentifier() const = 0;
447  };
448 
449  // Fallback if the base is pure virtual
450  template <class T>
451  class SuperFunctionClassCaller_purevirtualfallback_##functionname : public SuperFunctionCaller_##functionname
452  {
453  public:
454  // Fallback does nothing
455  inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) )
456  {
457  }
458 
459  Identifier* getParentIdentifier() const
460  {
461  return ClassIdentifier<T>::getIdentifier();
462  }
463  };
464 
465  // Initializes the SuperFunctionCaller-pointer with a fallback caller in case the base function is pure virtual
466  template <class T>
467  struct SuperFunctionInitialization<functionnumber, T>
468  {
469  static void initialize(ClassIdentifier<T>* identifier)
470  {
471  identifier->superFunctionCaller_##functionname##_ = new SuperFunctionClassCaller_purevirtualfallback_##functionname <T>;
472  identifier->bSuperFunctionCaller_##functionname##_isFallback_ = true;
473 
474  // Calls the initialization of the next super-function (functionnumber + 1)
475  SuperFunctionInitialization<functionnumber + 1, T>::initialize(identifier);
476  }
477  };
478 
479  // Deletes the SuperFunctionCaller.
480  template <class T>
481  struct SuperFunctionDestruction<functionnumber, T>
482  {
483  static void destroy(ClassIdentifier<T>* identifier)
484  {
485  if (identifier->superFunctionCaller_##functionname##_)
486  delete identifier->superFunctionCaller_##functionname##_;
487 
488  // Calls the destruction of the next super-function (functionnumber + 1)
489  SuperFunctionDestruction<functionnumber + 1, T>::destroy(identifier);
490  }
491  };
492 
493  // The real super-function caller: Calls T::functionname()
494  // T should be the parent, but this will be done by the spezialized condition template
495  template <class T>
496  class SuperFunctionClassCaller_##functionname : public SuperFunctionCaller_##functionname
497  {
498  public:
499  // @brief Calls the function.
500  // @param object The object to call the function on
501  // @param ... The arguments of the function
502  inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) )
503  {
504  (orxonox_cast<T*>(object))->T:: functionname ( Call the function with it's arguments );
505  }
506 
507  Identifier* getParentIdentifier() const
508  {
509  return ClassIdentifier<T>::getIdentifier();
510  }
511  }
512  */
513 
514 
516 
517  // (2/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
518  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(0, XMLPort, true, Element& xmlelement, XMLPort::Mode mode)
519  (xmlelement, mode)
521 
522  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(1, tick, true, float dt)
523  (dt)
525 
526  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(2, changedActivity, false)
527  ()
529 
530  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(3, changedVisibility, false)
531  ()
533 
534  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(4, XMLEventPort, true, Element& xmlelement, XMLPort::Mode mode)
535  (xmlelement, mode)
537 
538  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(5, changedScale, false)
539  ()
541 
542  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(6, changedOwner, false)
543  ()
545 
546  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(7, changedOverlayGroup, false)
547  ()
549 
550  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(8, changedName, false)
551  ()
553 
554  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(9, changedUsed, false)
555  ()
557 
558  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(10, changedCarrier, false)
559  ()
561 
562  SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(11, changedPickedUp, false)
563  ()
565 
566  // (2/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
567 
568 }
569 
570 #else /* _Super_H__ */
571  #ifdef SUPER_INTRUSIVE_DECLARATION_INCLUDE
572 
574 // This code gets included within the declaration of ClassIdentifier<T> //
576 
578 
579  private:
580 
581  template <int functionnumber, class TT, int templatehack1, int templatehack2>
582  friend struct SuperFunctionCondition;
583 
584  // Creates the super-function-callers by calling the first SuperFunctionCondition check
585  // This get's called within the initialization of an Identifier
586  virtual void createSuperFunctionCaller() const override
587  {
589  }
590 
591 
593 
594  public:
599  #ifndef SUPER_INTRUSIVE_DECLARATION
600  #define SUPER_INTRUSIVE_DECLARATION(functionname) \
601  SuperFunctionCaller_##functionname * superFunctionCaller_##functionname##_; \
602  bool bSuperFunctionCaller_##functionname##_isFallback_
603  #endif
604 
605 
607 
608  // (3/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
609  SUPER_INTRUSIVE_DECLARATION(XMLPort);
610  SUPER_INTRUSIVE_DECLARATION(tick);
611  SUPER_INTRUSIVE_DECLARATION(changedActivity);
612  SUPER_INTRUSIVE_DECLARATION(changedVisibility);
613  SUPER_INTRUSIVE_DECLARATION(XMLEventPort);
614  SUPER_INTRUSIVE_DECLARATION(changedScale);
615  SUPER_INTRUSIVE_DECLARATION(changedOwner);
616  SUPER_INTRUSIVE_DECLARATION(changedOverlayGroup);
617  SUPER_INTRUSIVE_DECLARATION(changedName);
618  SUPER_INTRUSIVE_DECLARATION(changedUsed);
619  SUPER_INTRUSIVE_DECLARATION(changedCarrier);
620  SUPER_INTRUSIVE_DECLARATION(changedPickedUp);
621  // (3/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <--
622 
623 
624  #undef SUPER_INTRUSIVE_DECLARATION_INCLUDE
625  #endif /* SUPER_INTRUSIVE_DECLARATION_INCLUDE */
626 #endif /* _Super_H__ */
static void destroy(ClassIdentifier< T > *)
Definition: Super.h:321
The ClassIdentifier is derived from Identifier and holds all class-specific functions and variables t...
Definition: Identifier.h:262
mode SUPER_FUNCTION_GLOBAL_DECLARATION_PART2
Definition: Super.h:519
static void initialize(ClassIdentifier< T > *)
Definition: Super.h:312
Creates the SuperFunctionCaller if T is a child of the super-functions baseclass. ...
Definition: Super.h:301
Shared library macros, enums, constants and forward declarations for the core library ...
Initializes the SuperFunctionCaller-pointer with zero.
Definition: Super.h:310
xmlelement
Definition: Super.h:519
static void superCheck()
Definition: Super.h:303
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Mode
Definition: CorePrereqs.h:102
Defines the helper function orxout() and includes all necessary headers to use the output system...
Deletes the SuperFunctionCaller.
Definition: Super.h:319
#define SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(functionnumber, functionname, hasarguments,...)
Creates the needed objects and templates to call a super-function.
Definition: Super.h:334