Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How can I make inheritance selectable?

1 Ansicht (letzte 30 Tage)
Tom McGiffen
Tom McGiffen am 20 Jun. 2016
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I am doing some work in wireless. I wanted to select between Mac layer classes as such:
classdef myRadio < chosenMacLayer
where chosenMacLayer is a "variable" in that other code will swap it to the desired MAC layer. Can this be done?
Thanks! Tom

Antworten (1)

Walter Roberson
Walter Roberson am 20 Jun. 2016
I don't think so. I gather that the approach to use in a situation like this would be to declare a class with virtual methods, and then the various Mac Layer classes would inherit from it and be responsible for instantiating the methods that differ between the sorts of layers.

Diese Frage ist geschlossen.

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by