claw::tween::base_tweener Class Referenceabstract

Common interface for all tweeners. More...

`#include <base_tweener.hpp>`

Inheritance diagram for claw::tween::base_tweener:

## Public Types

typedef boost::function< void()> | finish_callback
| The type of the function called to notify the end of the tweener.

## Public Member Functions

virtual | ~base_tweener ()
| Destructor.
base_tweener * | clone () const
| Create a copy of this allocated with new.
bool | is_finished () const
| Tell if the tweener has reached his total duration.
double | update (double dt)
| Update the base_tweener of a given amount of time.
void | on_finished (finish_callback f)
| Execute the callbacks notifying about the finish of the tweener.

## Detailed Description

Common interface for all tweeners.

Author
  Julien Jorge

See also
  tweeners

Definition at line 44 of file base_tweener.hpp.

## Member Typedef Documentation

## finish_callback

typedef boost::function<void ()> claw::tween::base_tweener::finish_callback

The type of the function called to notify the end of the tweener.

Definition at line 51 of file base_tweener.hpp.

## Constructor & Destructor Documentation

## ~base_tweener()

claw::tween::base_tweener::~base_tweener | ( |  | ) |

virtual

Destructor.

Definition at line 37 of file base_tweener.cpp.

## Member Function Documentation

## clone()

claw::tween::base_tweener * claw::tween::base_tweener::clone | ( |  | ) | const

Create a copy of this allocated with new.

Definition at line 46 of file base_tweener.cpp.

## is_finished()

bool claw::tween::base_tweener::is_finished | ( |  | ) | const

Tell if the tweener has reached his total duration.

Definition at line 55 of file base_tweener.cpp.

Referenced by update().

## on_finished()

void claw::tween::base_tweener::on_finished | ( | finish_callback | f | ) |

Execute the callbacks notifying about the finish of the tweener.

Definition at line 85 of file base_tweener.cpp.

## update()

double claw::tween::base_tweener::update | ( | double | dt | ) |

Update the base_tweener of a given amount of time.

Parameters

  dt | The duration of the update in time units since the last call.

Returns
  The amount of extra time in dt after the end of the update.

Definition at line 66 of file base_tweener.cpp.

References CLAW_POSTCOND, CLAW_PRECOND, and is_finished().

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

- tween/base_tweener.hpp
- code/tween/base_tweener.cpp