#pragma once #include "th_cola.h" template class DataOlvAsync_cola{ public: int id; T data; }; template class OlvAsync_cola : public Cth_cola> { void (*func_proc)( int, OlvAsync_cola

*, P *); public: OlvAsync_cola(void){}; ~OlvAsync_cola(void){}; void inicia(int miliseconds,void (*func)( int, OlvAsync_cola

*, P *), int fin =-1, char* nombre=NULL) { func_proc =func; time_sleep = miliseconds; pirate=FALSE; lanza(nombre); } virtual void procesa(DataOlvAsync_cola

&t)//override de procesado que hay que sobreescribir { func_proc(t.id,this,&t.data); }; void encola(int tarea, P *argumentos, BOOL forzar) { DataOlvAsync_cola

t; t.id = tarea; if(argumentos) t.data = *argumentos; (*this)+t; } void termina() { fin(); } };