• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hierarchy Question  RSS feed

 
Tyler Jordan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone check this basic program setup and see if it will work:


Should this basic setup provide me with the following?:
Program--
Switch--
Slot--
Port--
Port0 referenced with:
prog.sw0.sl0.port0
Every slot should have a port object? Every switch should have a slot object which has a port object, and so forth?
Thanks
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, everything is as you say.
Of course, you don't want to be writing things like "prog.sw0.sl0.port0" -- you want to give classes methods you can call to tell them to manipulate their data, rather then reaching into an object and grabbing out its data directly.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!