[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] ANSI C++ og events



Mads Bondo Dydensborg wrote:

>Jeg har gjort noget lidt simplere (tror jeg); klasser der skal kunne
>kaldes (altså modtage en event) nedarver alle fra en baseklasse, der har
>en public "modtag event" funktion, som er parametriseret med en event.
>De klasser der skal kalde en anden klasse, sættes så til at pege på den
>klasse de skal kalde, og kalder den veldefinerede metode i klassen.

Det er en mulighed, men desværre har jeg ingen forudsætninger om
hvilken klasse det er der skal bruge eventsne. Det er selvfølgelig muligt at
lave
en baseclass for hver eventtype og så pålægge brugeren at han skal nedarve
fra den klasse for at kunne "binde" funktionen sammen med eventet,
men det bliver nok noget rodet og også alt for meget arbejde for alt for
lidt -
så det ville jeg helst undgå hvis det var muligt.
(lige nu bruger jeg en forhåbentligt midlertidig løsning hvor det er
almindelige
C funktioner som bliver kaldt, og de sender så eventet videre)

- Peter




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *