Extract comparator core types into include/user/comparator.h.

Move Comparator and ComparatorExpression out of cologex.h so comparator
types can be shared by loadable comparator libraries without pulling in
the full cologex surface.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-10 21:12:54 -04:00
parent cda9d432f4
commit f118947b5e
2 changed files with 83 additions and 28 deletions
+1 -28
View File
@@ -5,39 +5,12 @@
#include <memory>
#include <mentalEntity.h>
#include <concept.h>
#include <user/logic.h>
#include <user/comparator.h>
#include <user/stimulusFrame.h>
namespace smo {
namespace cologex {
class Comparator
: public MentalEntity, public logic::Operand
{
public:
/** EXPLANATION:
* The reference for a Comparator is the fixed mentity or range of mentities
* that this comparator is intended to validate a match against.
*
* There are several mentities against which a comparator can match. At the
* time of writing, we're fairly sure that these will be at minimum,
* qualia, chronomena and mentena.
*/
std::shared_ptr<MentalEntity> reference;
};
class ComparatorExpression
: public logic::UnaryExpression
{
public:
ComparatorExpression(
logic::Operator &op, std::shared_ptr<Comparator> &comparator
)
: logic::UnaryExpression(
op, std::static_pointer_cast<logic::Operand>(comparator))
{}
};
class CombinatorialLogicExpression
: public MentalEntity, public logic::Expression, public Concept
{