RType
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Timer Class Reference

#include <Timer.hpp>

Inheritance diagram for Timer:
Inheritance graph
[legend]
Collaboration diagram for Timer:
Collaboration graph
[legend]

Public Member Functions

 Timer ()
 Construct a new Timer:: Timer object. More...
 
char * getAttribute () const override
 getAttribute, get the attribute More...
 
void setAttribute (std::string attribute) override
 setAttribute, set the attribute More...
 
void setTarget (std::shared_ptr< Drawable > target)
 setTarget, set the target More...
 
std::shared_ptr< DrawablegetTarget ()
 getTarget, get the target More...
 
void setActive (bool active)
 setActive, set the timer active More...
 
bool isActive () const
 getActive, get the timer active More...
 
void setDirection (int direction)
 
int getDirection () const
 
- Public Member Functions inherited from IComponentRType
virtual ~IComponentRType ()=default
 Construct a new IComponentRType object. More...
 

Public Attributes

timeval _startTime {}
 
timeval _now {}
 
timeval _targetTime {}
 
timeval _diff {}
 

Protected Attributes

std::shared_ptr< Drawable_target
 
bool _active
 
int _direction
 
- Protected Attributes inherited from IComponentRType
char * _attribute
 

Detailed Description

Definition at line 11 of file Timer.hpp.

Constructor & Destructor Documentation

◆ Timer()

Timer::Timer ( )

Construct a new Timer:: Timer object.

Definition at line 13 of file Timer.cpp.

References _active, IComponentRType::_attribute, _diff, _direction, _now, _startTime, and _targetTime.

Member Function Documentation

◆ getAttribute()

char * Timer::getAttribute ( ) const
overridevirtual

getAttribute, get the attribute

Returns
attribute (char *)

Implements IComponentRType.

Definition at line 29 of file Timer.cpp.

References IComponentRType::_attribute.

◆ getDirection()

int Timer::getDirection ( ) const

Definition at line 85 of file Timer.cpp.

References _direction.

◆ getTarget()

std::shared_ptr< Drawable > Timer::getTarget ( )

getTarget, get the target

setTarget, set the target

Returns
target (std::shared_ptr<Drawable>)
target

Definition at line 58 of file Timer.cpp.

◆ isActive()

bool Timer::isActive ( ) const

getActive, get the timer active

isActive, check if the timer is active

Returns
active (bool)

Definition at line 76 of file Timer.cpp.

References _active.

◆ setActive()

void Timer::setActive ( bool  active)

setActive, set the timer active

Parameters
active

Definition at line 67 of file Timer.cpp.

References _active.

◆ setAttribute()

void Timer::setAttribute ( std::string  attribute)
overridevirtual

setAttribute, set the attribute

Parameters
attribute

Implements IComponentRType.

Definition at line 38 of file Timer.cpp.

References IComponentRType::_attribute.

◆ setDirection()

void Timer::setDirection ( int  direction)

Definition at line 81 of file Timer.cpp.

References _direction.

◆ setTarget()

void Timer::setTarget ( std::shared_ptr< Drawable target)

setTarget, set the target

Parameters
target

Definition at line 49 of file Timer.cpp.

Member Data Documentation

◆ _active

bool Timer::_active
protected

Definition at line 75 of file Timer.hpp.

Referenced by isActive(), setActive(), and Timer().

◆ _diff

timeval Timer::_diff {}

Definition at line 71 of file Timer.hpp.

Referenced by Timer().

◆ _direction

int Timer::_direction
protected

Definition at line 76 of file Timer.hpp.

Referenced by getDirection(), setDirection(), and Timer().

◆ _now

timeval Timer::_now {}

Definition at line 69 of file Timer.hpp.

Referenced by Timer().

◆ _startTime

timeval Timer::_startTime {}

Definition at line 68 of file Timer.hpp.

Referenced by Timer().

◆ _target

std::shared_ptr<Drawable> Timer::_target
protected

Definition at line 74 of file Timer.hpp.

◆ _targetTime

timeval Timer::_targetTime {}

Definition at line 70 of file Timer.hpp.

Referenced by Timer().


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