In myFireInter.h, we extend the API provided by the DtFireInteraction class, to add accessor functions for the concept of temperature.
Again, we override printData(), and provide a static create() function:
#pragma once
#if DtHLA
#include <stdio.h>
{
public:
virtual void setTemperature(float temp);
virtual float temperature() const;
public:
protected:
float myTemperature;
};
inline void MyFireInteraction::setTemperature(float temp)
{
myTemperature = temp;
}
inline float MyFireInteraction::temperature() const
{
return myTemperature;
}
{
printf("Temperature: %lf\n", temperature());
}
{
return new MyFireInteraction();
}
#endif