vtable.h File Reference
#include <vector>
#include <cstddef>
#include <argos3/core/utility/logging/argos_log.h>
Include dependency graph for vtable.h:

Go to the source code of this file.

Classes

struct  argos::STagCounter< BASE >
 Holds the value of the last used tag. More...
 
struct  argos::STagHolder< DERIVED, BASE >
 Holds the value of the tag associated to DERIVED More...
 
struct  argos::EnableVTableFor< BASE >
 Helper to make a class hierarchy vtable-enabled. More...
 
class  argos::CVTable< CONTEXT, BASE, FUNCTION >
 The actual vtable. More...
 

Namespaces

 argos
 The namespace containing all the ARGoS related code.
 

Macros

#define ENABLE_VTABLE()
 This macro enables the vtable for a specific class. More...
 
#define INIT_VTABLE_FOR(BASE)
 

Functions

template<typename DERIVED , typename BASE >
size_t argos::GetTag ()
 Returns the value of the tag associated to DERIVED More...
 
template<typename CONTEXT , typename BASE , typename FUNCTION >
CVTable< CONTEXT, BASE, FUNCTION > & argos::GetVTable ()
 Function that returns a reference to the static vtable. More...
 

Macro Definition Documentation

◆ ENABLE_VTABLE

#define ENABLE_VTABLE ( )
Value:
virtual size_t GetTag() { \
return GetTagHelper(this); \
}
size_t GetTag()
Returns the value of the tag associated to DERIVED
Definition: vtable.h:116

This macro enables the vtable for a specific class.

Definition at line 146 of file vtable.h.

◆ INIT_VTABLE_FOR

#define INIT_VTABLE_FOR (   BASE)
Value:
struct SVTableInitializerFor ## BASE { \
SVTableInitializerFor ## BASE() { \
GetTag<BASE, BASE>(); \
} \
} sVTableInitializerFor ## BASE;

Definition at line 204 of file vtable.h.