Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] [DSF] FinalLaunchSequence extensibility

On 07/07/2010 12:51, Vladimir Prus wrote:

> because our product happens to support a lot of different debuggers,
> including somewhat tricky ones, we've added a custom final launch
> sequence that seriously modifies a couple of steps. The
> remaining dozen and a half steps from standard FinalLaunchSequence
> are perfectly OK, and we would like to reuse it, but it turns out
> problematic. All the steps are defined like so:
> 	private Step[] fSteps = {
> 		new Step() { .... } ;
>     }
> So, even if I derive a class from FinalLaunchSequence, I cannot even access
> any of the standard steps. Further, even if fSteps were private, accessing
> predefined steps by index would be very brittle. 

  Unless perhaps the (private) array were replaced by a (protected) hash, with
well-known names for the keys and the steps themselves as the values.  (This
would need to be combined with a separate array to hold the ordering of the
steps.)  It would then I think be quite robust to derive classes that could
refer to the standard steps known to be defined in a parent, and could modify
the inherited ordering or substitute its own altogether.


Back to the top