summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Save_Persist_Worker_T.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Save_Persist_Worker_T.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Save_Persist_Worker_T.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Save_Persist_Worker_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/Save_Persist_Worker_T.cpp
new file mode 100644
index 00000000000..941d3ae1872
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/Notify/Save_Persist_Worker_T.cpp
@@ -0,0 +1,46 @@
+//=============================================================================
+/**
+* @file Save_Persist_Worker_T.cpp
+*
+* $Id$
+*
+* @author Jonathan Pollack <pollack_j@ociweb.com>
+*/
+//=============================================================================
+
+#ifndef SAVE_PERSIST_WORKER_CPP
+#define SAVE_PERSIST_WORKER_CPP
+
+#include "orbsvcs/ESF/ESF_Worker.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+#pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+namespace TAO_Notify
+{
+ template<class TOPOOBJ>
+ Save_Persist_Worker<TOPOOBJ>::Save_Persist_Worker(Topology_Saver& saver,
+ bool want_all_children)
+ : saver_ (saver)
+ , want_all_children_ (want_all_children)
+ {
+ }
+
+ template<class TOPOOBJ>
+ void
+ Save_Persist_Worker<TOPOOBJ>::work (TOPOOBJ* o)
+ {
+ ACE_ASSERT(o != 0);
+ if (this->want_all_children_ || o->is_changed ())
+ {
+ o->save_persistent (saver_);
+ }
+ }
+} // namespace TAO_Notify
+
+TAO_END_VERSIONED_NAMESPACE_DECL
+
+#endif /* SAVE_PERSIST_WORKER_CPP */