downcast
Should downcasting be avoided while using a class hierarchy in C++?
Let\'s say I\'m writing an application which works with 开发者_如何学Pythonprojects, and exposes different functionality depending on the type of the project. I have a hierarchy of classes for the dif[详细]
2023-02-03 09:50 分类:问答Accessing a submethod of an argument of an overriden method in android?
This must be a noob question, but I can\'t find the proper wait to achieve the following: In android, I made a subclass MyView extending a View class. In B, I\'ve defined a method mMethod not present[详细]
2023-01-26 06:20 分类:问答static_cast on derived classes when base turns from not polymorphic to polymorphic
I am reviewing C++ casts operator and I have the following doubt: for polymorphic classes I I should use polymorphic_cast[详细]
2023-01-22 07:44 分类:问答Why can't I downcast pointer to members in template arguments?
If I make a pointer-to-base-member, I can convert it to a pointer-to-derived-member usually, but not when used within a template like Buzz below, where the first template argument influences the secon[详细]
2023-01-21 07:06 分类:问答How do I down-cast a c++ object from a python SWIG wrapper?
The problem: I\'ve wrapped some c++ code in python using SWIG. On the python side, I want to take a wrapped c++ pointer and down-cast it to be a pointer to a subclass. I\'ve added a new c++ function t[详细]
2023-01-19 23:20 分类:问答Cant copy construction be done without creating an explicit function in the pure virtual base class?
My objective is to do a deep copy of a class, but a virtual class is causing trouble. #include<iostream>[详细]
2023-01-18 02:58 分类:问答C++ cannot convert from base A to derived type B via virtual base A
I have four classes: class A {}; class B : virtual public A {}; class C : vi开发者_如何学JAVArtual public A {};[详细]
2023-01-16 23:05 分类:问答How can I do a safe downcast and prevent a ClassCastException
I have the following s开发者_Python百科cenario: public class A { } public class B extends A { } public class C extends B {[详细]
2023-01-08 12:18 分类:问答C++ inheritance question
I have the following problem in application arch开发者_如何学JAVAitecture and am willing to solve it (sorry for a lot of text).[详细]
2023-01-07 00:07 分类:问答Java downcasting and is-A has-A relationship
HI, I have a down casting question, I am a bit rusty in this area. I have 2 clasess like this: class A{ int i; String j ; //Getters and setters}[详细]
2022-12-30 18:57 分类:问答