LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GOOP Modified data?

I have a GOOP class CC containing sub-classes A, B and C. Some common data is owned by the CC class and in additon the sub-classes have their own private data.
Now, if I want to modify the data in sub-class A, I call some method for the CC class which then handles "A".
What I'm then wondering is: Should the CC method be of Reading type or Modifying type?
Since I don't change any of the common data for class CC I think I could have it "Reading type", but what is the right thing to do?
0 Kudos
Message 1 of 3
(2,845 Views)
Hi,

If I understand your question correctly, you have a class "CC" which aggregates three classes "A", "B" and "C" by keeping the reference to these object by storing the their references in the "CC"-class as attributes.

Now, as you wrote in your question, you do not modify anything in the attributes of the "CC"-class. The only thing you do is reading the value of the reference (actually a I32) to the "A"-class. The right thing to do is using the "Reading"-template just as you thought.

The reference that is store in the "CC"-class attribute is only a "pointer" to the "A" object and it do not change as long as the "A" object lives (until you execute the "Destroy" method for the "A" object).

Best regards,
Mattias Ericsson
Endevo Sweden
Member of th
e GOOP developer team

Have you seen the new GOOP Wizard 2.0 at www.endevo.se?
0 Kudos
Message 2 of 3
(2,845 Views)
Thanks. You understood what I asked about!
0 Kudos
Message 3 of 3
(2,845 Views)