From 6f6fa7749871efe168bca865cf2a3c0b7eba998b Mon Sep 17 00:00:00 2001 From: Hayodea Hakol Date: Sun, 3 Aug 2025 05:23:05 -0400 Subject: [PATCH] Get rid of enum Quale::Type, create BoundingQuale; use typeid() We just learned about typeid. Apparently it was either not mentioned in the Stroupstrup book or we totally missed it. --- smocore/include/mentalExistent.h | 6 +++++- smocore/include/quale.h | 28 +++++++++++++--------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/smocore/include/mentalExistent.h b/smocore/include/mentalExistent.h index af8d5a6..8ad6748 100644 --- a/smocore/include/mentalExistent.h +++ b/smocore/include/mentalExistent.h @@ -11,9 +11,13 @@ namespace smo { * Mentexents are Mentities, but not all Mentities are Mentexents. */ -class MentalExistent +struct MentalExistent : public MentalEntity { +public: + MentalExistent(const MentalEntity::Id id) + : MentalEntity(id) + {} }; typedef MentalExistent Mentexent; diff --git a/smocore/include/quale.h b/smocore/include/quale.h index 0c939ef..e9886e6 100644 --- a/smocore/include/quale.h +++ b/smocore/include/quale.h @@ -11,21 +11,10 @@ class Quale : public MentalExistent { public: - enum class Type - { - NEUTRAL, - /* Bounding refers to qualia such as tactile pressure which - * are mostly neutral but disclose information about the limits - * of the body. - **/ - BOUNDING, - PAINFUL, - PLEASURABLE - } type; - -public: - Quale(const Type type, const int32_t intensity) - : type(type), intensity(intensity) {} + Quale(const MentalEntity::Id id, const int32_t intensity) + : MentalExistent(id), + intensity(intensity) + {} public: int32_t intensity; @@ -36,6 +25,15 @@ class NeutralQuale { }; +/* Bounding qualia refer to qualia such as tactile pressure which are + * mostly neutral but disclose information about the limits of the body. + * These qualia are supplied by interoceptive sensors. + **/ +class BoundingQuale +: public NeutralQuale +{ +}; + class NonNeutralQuale : public Quale, public AttentionTrigger {