#include "tao/Service_Context.h"#include "tao/CDR.h"#include "ace/OS_NS_string.h"
Go to the source code of this file.
Functions | |
| ACE_RCSID (tao, Service_Context,"$Id: Service_Context.cpp 82034 2008-06-18 11:59:23Z johnnyw $") 1 void TAO_Service_Context | |
| ACE_RCSID | ( | tao | , | |
| Service_Context | , | |||
| "$Id: Service_Context.cpp 82034 2008-06-18 11:59:23Z johnnyw $" | ||||
| ) |
Definition at line 12 of file Service_Context.cpp.
00014 : Service_Context.cpp 82034 2008-06-18 11:59:23Z johnnyw $") 00015 00016 00017 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00018 00019 void 00020 TAO_Service_Context::set_context_i (IOP::ServiceId id, TAO_OutputCDR &cdr) 00021 { 00022 IOP::ServiceContext context; 00023 context.context_id = id; 00024 00025 // Make a *copy* of the CDR stream... 00026 size_t const length = cdr.total_length (); 00027 context.context_data.length (static_cast<CORBA::ULong> (length)); 00028 CORBA::Octet *buf = context.context_data.get_buffer (); 00029 00030 for (const ACE_Message_Block *i = cdr.begin (); 00031 i != 0; 00032 i = i->cont ()) 00033 { 00034 ACE_OS::memcpy (buf, i->rd_ptr (), i->length ()); 00035 buf += i->length (); 00036 } 00037 00038 this->set_context_i (context); 00039 }
1.6.1