Public Types | Public Member Functions | Protected Attributes | List of all members
towr::PhaseDurationsObserver Class Referenceabstract

Base class to receive up-to-date values of the ContactSchedule. More...

#include <phase_durations_observer.h>

Inheritance diagram for towr::PhaseDurationsObserver:
Inheritance graph
[legend]

Public Types

using PhaseDurationsSubjectPtr = PhaseDurations *
 

Public Member Functions

 PhaseDurationsObserver ()=default
 
 PhaseDurationsObserver (PhaseDurationsSubjectPtr phase_durations)
 Registers this observer with the subject class to receive updates. More...
 
virtual void UpdatePolynomialDurations ()=0
 Callback method called every time the subject changes. More...
 
virtual ~PhaseDurationsObserver ()=default
 

Protected Attributes

PhaseDurationsSubjectPtr phase_durations_
 

Detailed Description

Base class to receive up-to-date values of the ContactSchedule.

This class registers with the contact schedule and everytime those durations change, the contact schedule updates this class by calling the UpdatePhaseDurations() method.

Used by spline.h

This class implements the observer pattern: https://sourcemaking.com/design_patterns/observer

Definition at line 50 of file phase_durations_observer.h.

Member Typedef Documentation

◆ PhaseDurationsSubjectPtr

Definition at line 52 of file phase_durations_observer.h.

Constructor & Destructor Documentation

◆ PhaseDurationsObserver() [1/2]

towr::PhaseDurationsObserver::PhaseDurationsObserver ( )
default

◆ PhaseDurationsObserver() [2/2]

towr::PhaseDurationsObserver::PhaseDurationsObserver ( PhaseDurationsSubjectPtr  phase_durations)

Registers this observer with the subject class to receive updates.

Parameters
phase_durationsA pointer to the hase durations subject.

Definition at line 37 of file phase_durations_observer.cc.

◆ ~PhaseDurationsObserver()

virtual towr::PhaseDurationsObserver::~PhaseDurationsObserver ( )
virtualdefault

Member Function Documentation

◆ UpdatePolynomialDurations()

virtual void towr::PhaseDurationsObserver::UpdatePolynomialDurations ( )
pure virtual

Callback method called every time the subject changes.

Implemented in towr::PhaseSpline.

Member Data Documentation

◆ phase_durations_

PhaseDurationsSubjectPtr towr::PhaseDurationsObserver::phase_durations_
protected

Definition at line 69 of file phase_durations_observer.h.


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


towr
Author(s): Alexander W. Winkler
autogenerated on Mon Feb 28 2022 23:54:22