This implementation of LVOOP is valid

I have a base class, call it AnalogAcquisition. Then, I have a class of the StrainAcquisition child. I have a second AnalogChannel class, which has a child class, StrainChannel.

My base class AnalogAcquisition has a picture of AnalogChannels in there. My strain class has a method called "SetChannels', which accepts an array of StrainChannels as input, and then uses an accessor to these channels of strain in the table of AnalogChannel of parent classes. I want this implementation because I want to ensure only StrainChannels are placed in my StrainAcquisition class, but then I'm reusing the parent classes array existing AnalogChannels to maintain the child, the class channels.

So far, it seems to work very well. I just want to check if it is a valid implementation. Something feels a little weird on a specific channel type, then he hustle on wire of the parent class, where from this moment I have to use SD screw for something specific to this class, even if I already have insured the type ahead.

Maybe that of OK and I'm just not seeing the big picture. That's why I'm at the search either "good job, you are on the right track" or a "what are you do wrong you", preferably with an explanation as to why included .

for (imstuck) wroteAUT feels a little strange topic that requires a specific type of channel, then push on the wire of the parent class, where from this moment I have to use SD screw for something specific to this class, even if I already have insured the type ahead.

What you have independently discovered is called the pattern, abstract factory in the Gang of Four book (Google if you need more information). Quite acceptable. This differs from the factory pattern. In fact, bits of data is used to choose the child to instantiate classes. In the abstract factory, you have two (or more) matched class hierarchies, and you use a method of the primary class to provide related classes specific to a framework defined by the parent class.

Tags: NI Software

Similar Questions

Maybe you are looking for

  • in an e-mail conversation how a message

    In Mail - when messages are linked in a conversation how I isolate them one message so that I can this message? I am using Yosemite 10.10.5 thanks

  • How can I block cookies.

    I do not have to automatically accept cookies. In another browser, that I have ever used, I had the opportunity to accept a cookie or not, generally a window open text and asked me if I wanted to accept a cookie or not. How can I set up in firefox. I

  • Why firefox doesn't answer after that I submit my crash report?

    When I open Mozilla, Mozilla's Crash report screen comes up. After I sent the report, another Mozilla Crash report screen appears asking to send another report. I have dk what crash ID is. When I go to the summary report, it is incredibly long. User

  • HP Omni 120-1024 all-in-one - I think I'll have hard disk problems, I can replace "on my own"?

    Sorry if this sounds stupid, but with the all-in-one is so compact and mysterious, I'm not confident juggling it as I used to be when I got a tour. This week the computer starts to work slower than snails. as something and 10 minutes later, he answer

  • HP2000-104 CA

    Hello, I just downloaded windows 7 ultimate 32 bit and now I can't connect to internet via wifi, the WiFi icon is still pending mode... There is a mark on the netwrok and PCI device controller in the window of the Manager. PCI device ID is PCI\VEN_10