OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
EngineCallObserver Class Referenceabstract

#include <EngineCallObserver.h>

Inheritance diagram for EngineCallObserver:
TestCallObserver

Public Member Functions

virtual ~EngineCallObserver ()=default
 
template<class T >
void notify (EngineCall call, const T &data)
 

Protected Member Functions

virtual void notify (EngineCall call, const std::type_info &type, const void *data)=0
 

Detailed Description

An interface that's used to implement poor man's gmock for recording calls into different engine functions. Currently it's used by the testing framework to check that the calls that the testing framework expects to be made are actually made.

When adding new calls to EngineCall, please make sure you don't add any complex logic around them. Otherwise we'll end up with test code spilling over into the engine, and we generally want to avoid that. See how existing calls are handled for examples.

See also
TestCallObserver
CommonTapeRecorder::sounds

Constructor & Destructor Documentation

◆ ~EngineCallObserver()

virtual EngineCallObserver::~EngineCallObserver ( )
virtualdefault

Member Function Documentation

◆ notify() [1/2]

virtual void EngineCallObserver::notify ( EngineCall  call,
const std::type_info &  type,
const void *  data 
)
protectedpure virtual

Implemented in TestCallObserver.

◆ notify() [2/2]

template<class T >
void EngineCallObserver::notify ( EngineCall  call,
const T &  data 
)
inline

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