38#ifndef STK_IRECURSIVETEMPLATE_H
39#define STK_IRECURSIVETEMPLATE_H
54template<
class Derived>
69 {
return static_cast<Derived&
>(*this); }
75 {
return static_cast<Derived const&
>(*this); }
81 {
return static_cast<Derived*
>(
this); }
87 {
return static_cast<Derived const*
>(
this); }
99 inline Derived*
clone(
bool isRef)
const
100 {
return new Derived(this->
asDerived(), isRef);}
Derived * clone(bool isRef) const
create a leaf using the copy constructor of the Derived class and a flag determining if the clone is ...
Derived * clone() const
create a leaf using the copy constructor of the Derived class.
~IRecursiveTemplate()
destructor.
Derived const * asPtrDerived() const
static cast : return a ptr on a constant Derived of this with a cast to the derived class.
IRecursiveTemplate()
constructor.
Derived * asPtrDerived()
static cast : return a ptr on a Derived of this with a cast to the derived class.
Derived & asDerived()
static cast : return a reference of this with a cast to the derived class.
Derived const & asDerived() const
static cast : return a const reference of this with a cast to the derived class.
The namespace STK is the main domain space of the Statistical ToolKit project.