#ifndef DIRECTOR_H
#define DIRECTOR_H

#include <config.h>
#include <spinscale/puppetApplication.h>
#include <spinscale/component.h>
#include <mindComponent.h>
#include <goal.h>
#include <lruLifo.h>

namespace smo {

class Mind;

namespace director {

class Director
:	public MindComponent
{
public:
    Director(Mind &parent, const std::shared_ptr<sscl::PuppetThread> &thread);
	~Director() = default;

	void negtrinEventInd(void);
	void intrinEventInd(void);
	void postrinEventInd(void);

	/** 		EXPLANATION:
	 * We allow SMO to prioritize negtrins over injected goals, so that it can
	 * prioritize pain mitigation. We may decide to change this in the future.
	 *
	 * NB: Prioritizing negtrins is not the same as priortizing
	 * self-preservation...at least we don't think so at the moment of writing.
	 * It is definitely not desirable for SMO to prioritize self-preservation
	 * over our injected goals.
	 */
	LruLifo negtrins;
	/** 		EXPLANATION:
	 * These are goals injected by Mrntt. This is how Mrntt is able to inject
	 * goals into the director.
	 */
	LruLifo injectedGoals;
	/** 		EXPLANATION:
	 * These are goals chosen by the running mind. Director will always
	 * prioritize injected goals over chosen goals.
	 */
	LruLifo chosenGoals;
	LruLifo postrins;
	LruLifo nontrins;
};

} // namespace director
} // namespace smo

#endif // DIRECTOR_H
