X-Git-Url: https://git.llucax.com/z.facultad/75.68/celdas.git/blobdiff_plain/a4c9e136c32a1686046eaf6c6e1902cac4b7bb73..5530730f6759a3c449df3e78f122084d16f825d6:/trunk/src/plugin.cpp?ds=inline diff --git a/trunk/src/plugin.cpp b/trunk/src/plugin.cpp index 5ac1614..9571aa2 100644 --- a/trunk/src/plugin.cpp +++ b/trunk/src/plugin.cpp @@ -50,20 +50,13 @@ 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 ///////////////////////// -// pointer{SistemaAutonomo} SistemaAutonomoNew() +// pointer{SistemaAutonomo} SistemaAutonomoNew(int, int) int SAbrSistemaAutonomoNew(brEval args[], brEval* result, void* data) { - result->set(new CSistemaAutonomo()); + result->set(new CSistemaAutonomo(BRINT(args), BRINT(args+1))); return EC_OK; } @@ -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,10 +142,8 @@ 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); + AT_POINTER, AT_INT, AT_INT, 0); brNewBreveCall(data, "SistemaAutonomoAddTeoria", SAbrSistemaAutonomoAddTeoria, AT_NULL, AT_POINTER, AT_POINTER, 0); brNewBreveCall(data, "SistemaAutonomoSetValue", SAbrSistemaAutonomoSetValue,