From 27ff4a3a0a30401e219b1996091911337133f85a Mon Sep 17 00:00:00 2001 From: Hayodea Hekol Date: Sun, 5 Oct 2025 21:15:55 -0400 Subject: [PATCH] Concept,Cologex,Goal: refactor headers All Cologexes (both Cologexes and CologexSets) are now categorized as Concepts. Goals are now also Concepts -- they inherit from Concept as a base class. Using Concept as the base class for both Cologex and CologexSet allows us to treat both cologexes and cologexsets the same way when comparing in the abstract. --- smocore/include/cologex.h | 15 +++++++++++++-- smocore/include/concept.h | 14 ++++++++++++++ smocore/include/goal.h | 5 +++-- 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 smocore/include/concept.h diff --git a/smocore/include/cologex.h b/smocore/include/cologex.h index 6587ef1..0a67485 100644 --- a/smocore/include/cologex.h +++ b/smocore/include/cologex.h @@ -5,6 +5,8 @@ #include #include #include +#include +#include namespace smo { namespace cologex { @@ -37,14 +39,23 @@ public: }; class CombinatorialLogicExpression -: public MentalEntity, public logic::Expression +: public MentalEntity, public logic::Expression, public Concept { public: }; +class CombinatorialLogicExpressionSet +: public MentalEntity, public Concept +{ +public: + std::vector< + std::pair + > expressions; +}; + typedef CombinatorialLogicExpression Cologex; -typedef CombinatorialLogicExpression Clast; +typedef CombinatorialLogicExpressionSet CologexSet; } // namespace cologex } // namespace smo diff --git a/smocore/include/concept.h b/smocore/include/concept.h new file mode 100644 index 0000000..02766f5 --- /dev/null +++ b/smocore/include/concept.h @@ -0,0 +1,14 @@ +#ifndef _CONCEPT_H +#define _CONCEPT_H + +namespace smo { +namespace cologex { + +class Concept +{ +}; + +} // namespace cologex +} // namespace smo + +#endif // _CONCEPT_H diff --git a/smocore/include/goal.h b/smocore/include/goal.h index 3f1933a..690be6b 100644 --- a/smocore/include/goal.h +++ b/smocore/include/goal.h @@ -6,7 +6,8 @@ namespace smo { class Goal -: public concepts::Concept { +: public cologex::Concept +{ public: Goal() = default; ~Goal() = default; @@ -14,4 +15,4 @@ public: } // namespace smo -#endif +#endif // _GOAL_H