52 return do_is_finished();
64 const double result = do_update(dt);
80 m_on_finished.push_back(f);
86void claw::tween::base_tweener::notify_finished()
const
91 const std::list<finish_callback> callbacks(m_on_finished);
93 for(std::list<finish_callback>::const_iterator it = callbacks.begin();
94 it != callbacks.end(); ++it)
Some assert macros to strengthen you code.
#define CLAW_PRECOND(b)
Abort the program if a precondition is not true.
#define CLAW_POSTCOND(b)
Abort the program if a postcondition is not true.
Common interface for all tweeners.
Common interface for all tweeners.
std::function< void()> finish_callback
The type of the function called to notify the end of the tweener.
double update(double dt)
Update the base_tweener of a given amount of time.
base_tweener * clone() const
Create a copy of this allocated with new.
virtual ~base_tweener()
Destructor.
void on_finished(finish_callback f)
Execute the callbacks notifying about the finish of the tweener.
bool is_finished() const
Tell if the tweener has reached his total duration.