STK++ 1.0

STK::ISerie< Serie > Class Template Reference

Interface base class for Series. More...

#include <STK_ISerie.h>

List of all members.

Public Member Functions

virtual ~ISerie ()
 Virtual destructor.
Serie & asLeaf ()
 static cast : return a reference of this with a cast to the derived class.
const Serie & asLeaf () const
 static cast : return a const reference of this with a cast to the derived class.
Real first () const
 return the first coefficient
Real next () const
 return the next coefficient: first() have to be called before any use of next()

Protected Member Functions

 ISerie ()
 Default Constructor.

Detailed Description

template<class Serie>
class STK::ISerie< Serie >

Interface base class for Series.

The ISerie class is the templated base class for all Series.

ISerie takes a Serie template parameter. This parameter is the type of the class which derives from it. For exemple

 class Serie : public ISerie<Serie>
 {...}

The pseudo virtual function defined in this interface have the following definition:

    // return the first coefficient
    inline Real first() const;
    // return the next coefficient: first() have to be called before
    //  any use of next()
    inline Real next() const;

Definition at line 67 of file STK_ISerie.h.


Constructor & Destructor Documentation

template<class Serie>
STK::ISerie< Serie >::ISerie ( ) [inline, protected]

Default Constructor.

Definition at line 72 of file STK_ISerie.h.

{ ;}
template<class Serie>
virtual STK::ISerie< Serie >::~ISerie ( ) [inline, virtual]

Virtual destructor.

Definition at line 77 of file STK_ISerie.h.

{ ;}

Member Function Documentation

template<class Serie>
Serie& STK::ISerie< Serie >::asLeaf ( ) [inline]

static cast : return a reference of this with a cast to the derived class.

This allow to delegate public methods to derived classes.

Definition at line 83 of file STK_ISerie.h.

Referenced by STK::ISerie< SeriePi >::first(), and STK::ISerie< SeriePi >::next().

    { return static_cast<Serie&>(*this); }
template<class Serie>
const Serie& STK::ISerie< Serie >::asLeaf ( ) const [inline]

static cast : return a const reference of this with a cast to the derived class.

This allow to delegate public method to derived classes.

Definition at line 90 of file STK_ISerie.h.

    { return static_cast<Serie const &>(*this); }
template<class Serie>
Real STK::ISerie< Serie >::first ( ) const [inline]

return the first coefficient

Definition at line 95 of file STK_ISerie.h.

Referenced by STK::continuedFraction().

    { return asLeaf().first();}
template<class Serie>
Real STK::ISerie< Serie >::next ( ) const [inline]

return the next coefficient: first() have to be called before any use of next()

Definition at line 101 of file STK_ISerie.h.

Referenced by STK::continuedFraction().

    { return asLeaf().next();}

The documentation for this class was generated from the following file: