🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by brian hawley Sat, 08 Dec 1990 14:45
Suppressing the "this" pointer
#336
Author: brian hawley
Date: Sat, 08 Dec 1990 14:45
29 lines
1717 bytes

Is there a way to suppress the passing of the implicit this pointer in g++?

The reason I ask, is that for purposes of code clarity, I'd like to include
signal handlers in some of the classes.  However, signal handlers are
not invoked by the code compiled with g++, and as such, have no way of
knowing that the implicit this pointer should be pushed on the stack
as well as any other arguments.

Also, for other reasons, I'd like to store the address of a member function,
and call it directly (namely because I need to store objects on an event
queue, and invoke the right handler for these various objects.
There are ways of doing it without making these
handlers (signal and otherwise) member functions, but it makes the code
less readable.  There are yet other very cumbersome ways around it, but
I'd prefer not to use them because of their clumsyness.

Have you run into this situation before?  Do you have any suggestions?
Do you know who might?

Thanks,

Brian

------------------------------------------------------------------------------
Brian N. Hawley                            Internet: hawley@ucrmath.ucr.edu
Dept. of  Computer Scienc                  uucp: {ucsd, uci}!ucrmath!hawley
Univ. of Calif., Riverside, CA 92521       phone: (714) 787-4645
Suppressing the "this" pointer
#337
Author: Michael Tiemann
Date: Sat, 08 Dec 1990 23:20
3 lines
620 bytes
This is what static member functions are for.  See E&S for more info.

Michael
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads