X-Git-Url: https://git.llucax.com/z.facultad/75.68/celdas.git/blobdiff_plain/a4c9e136c32a1686046eaf6c6e1902cac4b7bb73..e800bc42e811087efc35350d5bfaa97cd1926d88:/trunk/src/plugin.cpp diff --git a/trunk/src/plugin.cpp b/trunk/src/plugin.cpp index 5ac1614..52e1404 100644 --- a/trunk/src/plugin.cpp +++ b/trunk/src/plugin.cpp @@ -50,13 +50,6 @@ int SAbrTeoriaGetAccion(brEval args[], brEval* result, void* data) return EC_OK; } -// void TeoriaDelete(pointer{Teoria}) -int SAbrTeoriaDelete(brEval args[], brEval* result, void* data) -{ - delete (CTeoria*) BRPOINTER(args); - return EC_OK; -} - /////////////////////////// CSistemaAutonomo ///////////////////////// @@ -72,7 +65,7 @@ int SAbrSistemaAutonomoAddTeoria(brEval args[], brEval* result, void* data) { CSistemaAutonomo* sa = (CSistemaAutonomo*) BRPOINTER(args); CTeoria* t = (CTeoria*) BRPOINTER(args+1); - sa->teorias.add(t->nombre.c_str(), *t); + sa->teorias.add(t->nombre, t); #ifdef DEBUG std::cout << "Agrega teoria " << t->nombre << ":\n"; std::cout << " .datos_iniciales:\n" << t->datos_iniciales << "\n"; @@ -149,8 +142,6 @@ DLLEXPORT void SAbrFunctions(void *data) AT_STRING, AT_POINTER, 0); brNewBreveCall(data, "TeoriaGetAccion", SAbrTeoriaGetAccion, AT_STRING, AT_POINTER, 0); - brNewBreveCall(data, "TeoriaDelete", SAbrTeoriaDelete, - AT_NULL, AT_POINTER, 0); brNewBreveCall(data, "SistemaAutonomoNew", SAbrSistemaAutonomoNew, AT_POINTER, 0); brNewBreveCall(data, "SistemaAutonomoAddTeoria", SAbrSistemaAutonomoAddTeoria,