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 = Nodes *
 

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

Definition at line 52 of file nodes_observer.h.

Constructor & Destructor Documentation

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 36 of file nodes_observer.cc.

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

Member Function Documentation

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

Callback method called every time the subject changes.

Implemented in towr::NodeSpline.

Member Data Documentation

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_core
Author(s): Alexander W. Winkler
autogenerated on Sun Apr 8 2018 02:18:53