473,775 Members | 2,621 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using "super" for base class in C++/CLI

In Managed C++ one could use __super to invoke a base class function.
Has this been changed to "super" or is it still "__super" ? Looking
through the MSDN help I could not find a hit for just "super".
May 24 '06 #1
3 5977
__super is one of the few double underscore keywords left in C++/CLI.
(__identifier is another).
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter & VB to C++ converter
Instant J#: VB to J# converter

"Edward Diener" wrote:
In Managed C++ one could use __super to invoke a base class function.
Has this been changed to "super" or is it still "__super" ? Looking
through the MSDN help I could not find a hit for just "super".

May 24 '06 #2
David Anton wrote:
__super is one of the few double underscore keywords left in C++/CLI.
(__identifier is another).


Thanks, I should have suspected that when I could not find "super" for
VC++ in the VS2005 docs. I do remember that __identifier is there but I
thought it was the only double underscore keyword left. Now I know
different.
May 24 '06 #3
"Edward Diener" <ed************ *******@tropics oft.com> wrote
__super is one of the few double underscore keywords left in C++/CLI.
(__identifier is another).


Thanks, I should have suspected that when I could not find "super" for
VC++ in the VS2005 docs. I do remember that __identifier is there but I
thought it was the only double underscore keyword left. Now I know
different.


Well, I'd argue __super is not specifically related to C++/CLI.

After all, there's still __stdcall, __declspec, __pragma etc.

In fact, some argue __super is especially useful with multiple
inheritance where the appropriate base class is selected based
on context.
Typically, however, you wouldn't use __super to refer to
an interface.

Anyway, I fail to see any case where you couldn't use
the (injected) base class name instead of using __super.

-hg
May 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9600
by: Fernando Rodriguez | last post by:
Hi, I need to traverse the methods defined in a class and its superclasses. This is the code I'm using: # An instance of class B should be able to check all the methods defined in B #and A, while an instance of class C should be able to check all methods #defined in C, B and A. #------------------------------------------------
5
6538
by: Da Costa Gomez | last post by:
Hi, I was wondering whether someone could shed some light on the following. Using inheritance in Java one can override a function f() (or is it overload?) in the child and then do: public f() { super.f(); ... } in the child to first execute the parent stuff to be followed by the
7
1932
by: Pupeno | last post by:
Hello, I have a class called MyConfig, it is based on Python's ConfigParser.ConfigParser. It implements add_section(self, section), which is also implemented on ConfigParser.ConfigParser, which I want to call. So, reducing the problem to the bare minimum, the class (with a useless add_section that shows the problem): .... def add_section(self, section): .... super(MyConfig, self).add_section(section)
4
1721
by: ddtl | last post by:
Hello everybody. Consider the following code: class A(object): def met(self): print 'A.met' class B(A): def met(self):
3
2672
by: 7stud | last post by:
When I run the following code and call super() in the Base class's __init__ () method, only one Parent's __init__() method is called. class Parent1(object): def __init__(self): print "Parent1 init called." self.x = 10 class Parent2(object):
5
1403
by: Nagarajan | last post by:
Hi group, I am confused with "super" usage..It seems to be complicated and less obvious. Here is what I need to achieve.. class A : def __init__( self ): self.x = 0 class B ( A ):
12
344
by: iu2 | last post by:
Hi I'm trying to make a method call automatically to its super using this syntax: class A: chained = def pr(self): print 'Hello from A'
6
2143
by: jmarcrum | last post by:
Hi everyone! I'm using a super class (DVD.java) that handles another class (EnhancedDVD.java). I want to pass the "details" of the DVD into the super class DVD.java. The super class contains the Title, RegionCode, Format, and Length of a dummy DVD...let's say..."Forrest Gump." But I can't figure out how to do this and I have 4 errors going on when I compile the two classes. I have a driver that runs the System.out.println's. But I think...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10268
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10107
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10048
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8939
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7464
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6718
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5486
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.