DataModel_detail::DVLCast< DVL, has_virtual > Struct Template Reference

casting operations for DataVector/DataList. More...

#include <DVLCast.h>


Detailed Description

template<class DVL, bool has_virtual = DVL::has_virtual>
struct DataModel_detail::DVLCast< DVL, has_virtual >

casting operations for DataVector/DataList.

When inheritance is used with DataVector/List, we need to be able to cast from the pointers actually stored in the container to the T* pointers which the derived DataVector/List uses. We want this to use a static_cast if at all possible, and dynamic_cast otherwise.

This is handled by this template. The operation

   DVLCast<DVL>::cast (p)

will cast the pointer p to DVL's T* type. This is done either by static_cast or dynamic_cast, depending on the value of DVL::has_virtual.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1