Add methods in base SimObject to turn whole sim object on/off.

Added enable/disable methods to the SimObject base class.  Used
enable/disable to be consistent with the JobData class that already
had these defined.

fixes #103
This commit is contained in:
Alex Lin
2015-08-05 15:17:32 -05:00
parent e12ddbcfe1
commit 80fb82e9f6
2 changed files with 27 additions and 2 deletions

View File

@ -99,3 +99,17 @@ Trick::JobData * Trick::SimObject::get_job( std::string job_name, unsigned int j
return NULL ;
}
void Trick::SimObject::enable() {
std::vector <Trick::JobData *>::iterator it ;
for ( it = jobs.begin() ; it != jobs.end() ; it++ ) {
(*it)->enable() ;
}
}
void Trick::SimObject::disable() {
std::vector <Trick::JobData *>::iterator it ;
for ( it = jobs.begin() ; it != jobs.end() ; it++ ) {
(*it)->disable() ;
}
}