View Single Post
  #2   Spotlight this post!  
Unread 06-03-2014, 04:57
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,169
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: Grabbing subsystem data to use in another subsystem in Command Based

This is really just a classic C++ question. If a method or member in one class is public any other code (in the same space that has a handle/pointer to the class) can access the member or call the method. In practice it is wiser to keep everything things private and add public methods to access your private data. This way your data (or devices) controlled by the object have only carefully defined external interfaces, making your objects more "coherent".

HTH
__________________
Fast, cheap or working - pick any two!
Reply With Quote