Base, using the CRTP, providing some basic functionality for path elements. More...
#include <osvr/Common/PathElementTypes.h>
Public Types | |
typedef Type | type |
typedef ElementBase< Type > | base_type |
Public Member Functions | |
const char * | getTypeName () const |
Protected Member Functions | |
ElementBase () | |
Protected constructor to force subclassing. More... | |
Base, using the CRTP, providing some basic functionality for path elements.
Definition at line 65 of file PathElementTypes.h.
|
inlineprotected |
Protected constructor to force subclassing.
Inline implementation at the bottom of the file contains static assertions.
This inline implementation MUST remain at the bottom of this file, after all full declarations of types to be included in PathElement. It consists entirely of compile time checks, so it is effectively removed from the code once the conditions are verified.
Partially enforce the Curiously-Recurring Template Pattern. The assertion here is that for some ElementBase<X>
, there exists a class X : public ElementBase<X> {};
Doesn't prevent inheriting from the wrong base (class X : public ElementBase<Y> {};
where there is already a class Y : public ElementBase<Y> {};
- we have a static assert in the .cpp file to handle that for the types in the PathElement type list.
Enforce that every element type (that gets instantiated) has to be holdable by the PathElement variant
Definition at line 246 of file PathElementTypes.h.