[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cdt-dev] Theoretical Question
- From: Jason Litton <jason@xxxxxxxxxxxxxxx>
- Date: Wed, 25 Apr 2012 09:30:20 -0600 (MDT)
- Delivered-to: firstname.lastname@example.org
When I'm writing code extending CDT, I find I have a really hard time doing the things I need to do because a lot of classes that I'd like to extend have hordes of private variables with no getters. That means that an extending class doesn't have access to its own information. For example, I'm extending the GDB Control classes and, to register my class to the DSF service provider, I need to provide a GDBControlDMContext, which is contained, totally privately and with no access, by the parent class. So I either have to hack my way around or I have to change the visibility of the variable in the parent class. I'm willing to change the variable, or at least put a getter in the parent class, but I'm wondering why CDT does things this way? It greatly limits the ability to extend vital pieces of the code and just seems to make things more complicated than they need to be. Do we want to keep everything hidden away where only CDT-layer things can have it, or is it acceptable to open things up a little where extensions need to happen?