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

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

#include <nodes_observer.h>

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

Public Types

using NodeSubjectPtr = NodesVariables *
 

Public Member Functions

 NodesObserver (NodeSubjectPtr node_values)
 Registers this observer with the subject class to receive updates. More...
 
virtual void UpdateNodes ()=0
 Callback method called every time the subject changes. More...
 
virtual ~NodesObserver ()=default
 

Protected Attributes

NodeSubjectPtr node_values_
 

Detailed Description

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

This class registers with the node variables and everytime the positions or velocities of a node change, the subject updates this class by calling the UpdatePolynomials() method.

Used by spline.h

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

Definition at line 50 of file nodes_observer.h.

Member Typedef Documentation

◆ NodeSubjectPtr

Definition at line 52 of file nodes_observer.h.

Constructor & Destructor Documentation

◆ NodesObserver()

towr::NodesObserver::NodesObserver ( NodeSubjectPtr  node_values)

Registers this observer with the subject class to receive updates.

Parameters
node_valuesThe subject holding the Hermite node values.

Definition at line 35 of file nodes_observer.cc.

◆ ~NodesObserver()

virtual towr::NodesObserver::~NodesObserver ( )
virtualdefault

Member Function Documentation

◆ UpdateNodes()

virtual void towr::NodesObserver::UpdateNodes ( )
pure virtual

Callback method called every time the subject changes.

Implemented in towr::NodeSpline.

Member Data Documentation

◆ node_values_

NodeSubjectPtr towr::NodesObserver::node_values_
protected

Definition at line 67 of file nodes_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