#include "CLIPSNET_Agenda.h" using namespace System; using namespace CLIPS; namespace CLIPSNET { /*######################*/ /* Agenda class methods */ /*######################*/ Agenda::Agenda() { List ^ theList; theList = gcnew List; activations = theList; } Agenda::Agenda(List ^ theList) { activations = theList; } Agenda::~Agenda() { this->!Agenda(); } Agenda::!Agenda() { } List ^Agenda::GetActivations() { return this->activations; } int Agenda::GetHashCode() { if (activations == nullptr) return 0; return activations->GetHashCode(); } bool Agenda::Equals(Object ^ obj) { if ((obj == nullptr) || (GetType() != obj->GetType())) { return false; } List ^ list1 = this->GetActivations(); List ^ list2 = ((Agenda ^) obj)->GetActivations(); if (list1->Count != list2->Count) { return false; } for (int i = 0; i < this->activations->Count; i++) { if (! list1[i]->Equals(list2[i])) { return false; } } return true; } };