delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/19/13:35:22

From: DavMac AT iname DOT com (Davin McCall)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Weird error messages...
Date: Mon, 19 Jul 1999 04:26:45 GMT
Organization: Monash Uni
Lines: 43
Distribution: world
Message-ID: <3792a65b.18125800@newsserver.cc.monash.edu.au>
References: <378EAD2C DOT BD9A743C AT geocities DOT com> <378eb8c2 DOT 1394708 AT newsserver DOT cc DOT monash DOT edu DOT au> <378F5E0E DOT 161797BE AT geocities DOT com>
NNTP-Posting-Host: damcc5.halls.monash.edu.au
X-Trace: towncrier.cc.monash.edu.au 932358397 16859 130.194.198.138 (19 Jul 1999 04:26:37 GMT)
X-Complaints-To: abuse AT monash DOT edu DOT au
NNTP-Posting-Date: 19 Jul 1999 04:26:37 GMT
X-Newsreader: Forte Free Agent 1.1/32.230
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

The member-function of a particular object of a certain class does not
exist as a seperate entity to the same member-function of a different
object in the same class.

So, you can't create a member function to serve as an interrupt
handler. However, you could have the actual interrupt handler (a
non-member function)  to call the member function with reference to a
particular object, for instance:

class SoundCard {
	(declarations etc...)
	....
};

SoundCard sblaster;

void handler( void )
{
  sblaster.handler();
}  


Of course, this doesn't easily allow for more than one soundcard to be
operative at once... You really have to use your imagination to find a
solution for this case.

Davin.


On Fri, 16 Jul 1999 12:30:06 -0400, Sahab Yazdani
<beyonder69 AT geocities DOT com> wrote:

>> I suspect most of your problems would be solved if you made "handler"
>> static (eg, "static void handler();").
[snip]
>
>Yes I could make a static function, but then the function couldn't
>access any of the classes internal values and I'd have to make them
>static and that would defeat the entire purpose of Object Orientation!

__________________________________________________________
       *** davmac - sharkin'!! davmac AT iname DOT com ***
my programming page: http://yoyo.cc.monash.edu.au/~davmac/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019