summaryrefslogtreecommitdiff
path: root/CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp
diff options
context:
space:
mode:
authorAbdullah Sowayan <sowayan@users.noreply.github.com>2007-03-18 22:23:37 +0000
committerAbdullah Sowayan <sowayan@users.noreply.github.com>2007-03-18 22:23:37 +0000
commit06a34455bd98b1379cc69bbc5b2cf085e0fc0d9b (patch)
tree8815ce3b3a85c3c4285429295f338e00ea4497f4 /CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp
parentd66fcc9b4aaec8e88eeb83fc578fdf8a3cc963de (diff)
downloadATCD-Static_RT_DAnCE.tar.gz
Diffstat (limited to 'CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp')
-rw-r--r--CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp b/CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp
new file mode 100644
index 00000000000..3def524a0bb
--- /dev/null
+++ b/CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp
@@ -0,0 +1,57 @@
+// $Id$Exp lseibert
+
+#include "TP_Handler.h"
+#include "CIAOServerResources.hpp"
+
+namespace CIAO
+{
+ namespace Config_Handlers
+ {
+ bool TP_Handler::thread_pool (const ThreadpoolDef &src,
+ ::CIAO::DAnCE::ORS_Threadpool &dest)
+ {
+ dest.Id = CORBA::String_var (src.id ().c_str ());
+
+ dest.stacksize =
+ static_cast <ACE_UINT32> (src.stacksize ());
+
+ dest.static_threads =
+ static_cast <ACE_UINT32> (src.static_threads( ));
+
+ dest.dynamic_threads =
+ static_cast <ACE_UINT32> (src.dynamic_threads());
+
+ dest.default_priority =
+ static_cast <ACE_INT16> (src.default_priority ());
+
+ dest.allow_request_buffering = src.allow_request_buffering ();
+
+ dest.max_buffered_requests =
+ static_cast <ACE_UINT32> (src.max_buffered_requests ());
+
+ dest.max_request_buffer_size =
+ static_cast <ACE_UINT32> (src.max_request_buffered_size ());
+
+ return true;
+ }
+
+ ThreadpoolDef
+ TP_Handler::thread_pool (const ::CIAO::DAnCE::ORS_Threadpool &src)
+ {
+ ThreadpoolDef tp (XMLSchema::unsignedLong (src.stacksize),
+ XMLSchema::unsignedLong (src.static_threads),
+ XMLSchema::unsignedLong (src.dynamic_threads),
+ XMLSchema::int_ (src.default_priority),
+ XMLSchema::boolean (src.allow_request_buffering),
+ XMLSchema::unsignedLong (src.max_buffered_requests),
+ XMLSchema::unsignedLong (src.max_request_buffer_size));
+
+ if (src.Id.in () == 0)
+ {
+ tp.id (src.Id.in ());
+ }
+
+ return tp;
+ }
+ }
+}