I am working in VB.NET defining my own classes.
I have 5 classes, Policy, Coverage, CoverageCollection, Layer, and LayerCollection. Policy has a bunch of data items, one of which is of type CoverageCollection. Coverage has a bunch of data items, one of which is of type LayerCollection.
Policy
private id as Long
private name as String
private cov as CoverageCollection
…corresponding public properties
Coverage
private plan as String
private age as Integer
private lyr as LayerCollection
…corresponding public properties
Layer
private face as Double
private dur as Integer
…corresponding public properties
Then I do like "dim p as Policy". So, iIn order to get to properties on a Layer, I reference it like p.cov(0).lyr(0).face.
What I am trying to do is add a readonly property to Layer that is calculated using some Layer information but also using something from Coverage (or even Policy). I can take this in as a parameter to the property, but I think there should be a way to get at Coverage/Policy information since I am "under" it already. Is there a way to do this?
I have 5 classes, Policy, Coverage, CoverageCollection, Layer, and LayerCollection. Policy has a bunch of data items, one of which is of type CoverageCollection. Coverage has a bunch of data items, one of which is of type LayerCollection.
Policy
private id as Long
private name as String
private cov as CoverageCollection
…corresponding public properties
Coverage
private plan as String
private age as Integer
private lyr as LayerCollection
…corresponding public properties
Layer
private face as Double
private dur as Integer
…corresponding public properties
Then I do like "dim p as Policy". So, iIn order to get to properties on a Layer, I reference it like p.cov(0).lyr(0).face.
What I am trying to do is add a readonly property to Layer that is calculated using some Layer information but also using something from Coverage (or even Policy). I can take this in as a parameter to the property, but I think there should be a way to get at Coverage/Policy information since I am "under" it already. Is there a way to do this?