Now builds.
* Cut out all extraneous includes.
This commit is contained in:
+4
-2
@@ -1,2 +1,4 @@
|
||||
noinst_LIBRARIES = libcorelogic.a
|
||||
libcorelogic_a_SOURCES = painfulQuale.cpp mind.cpp
|
||||
AM_CPPFLAGS+= -I"$(abs_top_srcdir)/hcore/include"
|
||||
|
||||
noinst_LIBRARIES = libhcore.a
|
||||
libhcore_a_SOURCES = mind.cpp
|
||||
|
||||
@@ -43,7 +43,12 @@ public:
|
||||
|
||||
void reset() { iter = commandList.commands.begin(); }
|
||||
bool hasNext() const { return iter != commandList.commands.end(); }
|
||||
Cursor next() { return Cursor(commandList, ++iter); }
|
||||
Cursor next() { return ++(*this); }
|
||||
|
||||
Cursor& operator++() {
|
||||
++iter;
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
Cursor(
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef DIRECTOR_H
|
||||
#define DIRECTOR_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
namespace director {
|
||||
|
||||
class Director {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
class MentalEntity
|
||||
{
|
||||
public:
|
||||
using Id = uint32_t;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+9
-20
@@ -1,32 +1,21 @@
|
||||
#ifndef _MIND_H
|
||||
#define _MIND_H
|
||||
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
#include <config.h>
|
||||
#include <thread>
|
||||
|
||||
#include <thought.h>
|
||||
#include <concept.h>
|
||||
#include <attentionGrabber.h>
|
||||
#include <director/director.h>
|
||||
#include <simulator/simulator.h>
|
||||
|
||||
class Mind
|
||||
{
|
||||
public:
|
||||
AttentionGrabber poll(void);
|
||||
void focusOn(std::shared_ptr<Thought> thought)
|
||||
{
|
||||
currentThought = thought;
|
||||
}
|
||||
std::thread directorThread;
|
||||
std::thread simulatorThread;
|
||||
std::thread subconsciousThread;
|
||||
|
||||
void execute(void)
|
||||
{};
|
||||
|
||||
bool recognizes(AttentionTrigger intrin)
|
||||
{ return !!(std::rand() / 2); };
|
||||
|
||||
public:
|
||||
std::shared_ptr<Thought> currentThought;
|
||||
Concept Desirables,
|
||||
Undesirables;
|
||||
director::Director director;
|
||||
simulator::Simulator simulator;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -43,7 +43,12 @@ public:
|
||||
|
||||
void reset() { iter = commandList.commands.begin(); }
|
||||
bool hasNext() const { return iter != commandList.commands.end(); }
|
||||
Cursor next() { return Cursor(commandList, ++iter); }
|
||||
Cursor next() { return ++(*this); }
|
||||
|
||||
Cursor& operator++() {
|
||||
++iter;
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
Cursor(
|
||||
|
||||
@@ -13,8 +13,10 @@ class Scene
|
||||
public:
|
||||
using Id = uint32_t;
|
||||
|
||||
Scene();
|
||||
~Scene();
|
||||
Scene() :
|
||||
cursor(commands)
|
||||
{}
|
||||
~Scene() = default;
|
||||
|
||||
bool hasMentalEntity(const MentalEntity::Id menty) const;
|
||||
MentalEntity::Id addMentalEntity(const MentalEntity& menty);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef SIMULATOR_H
|
||||
#define SIMULATOR_H
|
||||
|
||||
#include <config.h>
|
||||
#include <simulator/scene.h>
|
||||
|
||||
namespace simulator {
|
||||
|
||||
@@ -1,10 +1,2 @@
|
||||
|
||||
#include <mind.h>
|
||||
|
||||
AttentionGrabber Mind::poll(void)
|
||||
{
|
||||
AttentionTrigger tmpAt;
|
||||
Chronomenon tmpChron;
|
||||
|
||||
return AttentionGrabber(tmpAt, tmpChron);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user