00001 //============================================================================= 00002 /** 00003 * @file Save_Persist_Worker_T.cpp 00004 * 00005 * $Id: Save_Persist_Worker_T.cpp 76589 2007-01-25 18:04:11Z elliott_c $ 00006 * 00007 * @author Jonathan Pollack <pollack_j@ociweb.com> 00008 */ 00009 //============================================================================= 00010 00011 #ifndef SAVE_PERSIST_WORKER_CPP 00012 #define SAVE_PERSIST_WORKER_CPP 00013 00014 #include "orbsvcs/ESF/ESF_Worker.h" 00015 00016 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00017 #pragma once 00018 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00019 00020 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00021 00022 namespace TAO_Notify 00023 { 00024 template<class TOPOOBJ> 00025 Save_Persist_Worker<TOPOOBJ>::Save_Persist_Worker(Topology_Saver& saver, 00026 bool want_all_children) 00027 : saver_ (saver) 00028 , want_all_children_ (want_all_children) 00029 { 00030 } 00031 00032 template<class TOPOOBJ> 00033 void 00034 Save_Persist_Worker<TOPOOBJ>::work (TOPOOBJ* o) 00035 { 00036 ACE_ASSERT(o != 0); 00037 if (this->want_all_children_ || o->is_changed ()) 00038 { 00039 o->save_persistent (saver_); 00040 } 00041 } 00042 } // namespace TAO_Notify 00043 00044 TAO_END_VERSIONED_NAMESPACE_DECL 00045 00046 #endif /* SAVE_PERSIST_WORKER_CPP */