diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:15:18 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:15:18 +0000 |
commit | b71531b42b3325fd6079a7039aae8641262c8adf (patch) | |
tree | a5b9aa16924c541fcb424ee9460b1ac7f5a89352 /modules/CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp | |
parent | a0f67cc97c0050d907145e312135b60c0125e56e (diff) | |
download | ATCD-b71531b42b3325fd6079a7039aae8641262c8adf.tar.gz |
branching/taggingDS-main
Diffstat (limited to 'modules/CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp')
-rw-r--r-- | modules/CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/modules/CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp b/modules/CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp new file mode 100644 index 00000000000..9d29bec5c40 --- /dev/null +++ b/modules/CIAO/tools/Config_Handlers/RT-CCM/TP_Handler.cpp @@ -0,0 +1,63 @@ +// $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), + Priority (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; + } + } +} |