Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How can I make inheritance selectable?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Walter Roberson
2016년 6월 20일
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.
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!