VirtBases for three classes. More...
Public Types | |
typedef ::boost::is_same < typename DataVector< B1 > ::PtrVector, typename DataVector< B2 >::PtrVector > | check1 |
typedef ::boost::is_same < typename DataVector< B1 > ::PtrVector, typename DataVector< B3 >::PtrVector > | check2 |
typedef DataVector< B1 >::PtrVector | PtrVector |
typedef DataVector< B1 >::size_type | size_type |
typedef DataVector< B1 > ::difference_type | difference_type |
typedef DataVector< B1 > ::allocator_type | allocator_type |
typedef DataVector_detail::VirtBases < B1, B2, B3 > | self |
A helper typedef. | |
Public Member Functions | |
BOOST_STATIC_ASSERT (check1::value) | |
BOOST_STATIC_ASSERT (check2::value) | |
Static Public Attributes | |
static const bool | has_virtual = true |
Protected Member Functions | |
void | clearMostDerived () |
Clear m_isMostDerived for this instance and for all bases. | |
virtual const std::type_info & | dv_typeid () const |
Find the most-derived DataVector class in the hierarchy. | |
virtual const DataModel_detail::DVLInfoBase & | dvlinfo_v () const |
Return the DV/DL info struct for this class. | |
virtual void | setMostDerived () |
Set m_isMostDerived for this instance and clear it for all bases. | |
Static Protected Member Functions | |
static int | baseOffset1 (const char *p, const VirtBases &dv, const std::type_info &ti) |
VirtBases for three classes.
DataVector<T>
derives from this for the case of T
deriving from three classes. It in turn derives from B1
, B2
, and B3
.
typedef DataVector<B1>::PtrVector DataVector_detail::VirtBases< B1, B2, B3 >::PtrVector |
This is the type of the underlying std::vector
(what stdcont
returns).
Reimplemented from DataVector< B1 >.
void DataVector_detail::VirtBases< B1, B2, B3 >::clearMostDerived | ( | ) | [inline, protected] |
Clear m_isMostDerived
for this instance and for all bases.
Called from the constructor after setting m_isMostDerived
.
Reimplemented from DataVector< B1 >.
virtual const std::type_info& DataVector_detail::VirtBases< B1, B2, B3 >::dv_typeid | ( | ) | const [inline, protected, virtual] |
Find the most-derived DataVector
class in the hierarchy.
type_info
for the class for which this method gets run.This is used to generate a nice error message when the most-derived check for insertions fails. Every DataVector
defines this virtual method, so when it's called, the one corresponding to the most-derived DataVector
gets run.
Reimplemented from DataVector< B1 >.
virtual const DataModel_detail::DVLInfoBase& DataVector_detail::VirtBases< B1, B2, B3 >::dvlinfo_v | ( | ) | const [inline, protected, virtual] |
Return the DV/DL info struct for this class.
This can be used to make sure that it's instantiated.
Reimplemented from DataVector< B1 >.
virtual void DataVector_detail::VirtBases< B1, B2, B3 >::setMostDerived | ( | ) | [inline, protected, virtual] |
Set m_isMostDerived
for this instance and clear it for all bases.
Called from testInsert
if the test fails. The flag may not have been set if this container was made via copy construction, so set it appropriately now so we can test again.
Reimplemented from DataVector< B1 >.
const bool DataVector_detail::VirtBases< B1, B2, B3 >::has_virtual = true [static] |
This is true for any DataVector
class if we need to use virtual derivation to get to the base DataVector
class.
Reimplemented from DataVector< B1 >.