summaryrefslogtreecommitdiff
path: root/ACE/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Safe_InputCDR.inl
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Safe_InputCDR.inl')
-rw-r--r--ACE/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Safe_InputCDR.inl23
1 files changed, 23 insertions, 0 deletions
diff --git a/ACE/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Safe_InputCDR.inl b/ACE/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Safe_InputCDR.inl
new file mode 100644
index 00000000000..a4712c153f5
--- /dev/null
+++ b/ACE/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Safe_InputCDR.inl
@@ -0,0 +1,23 @@
+// -*- C++ -*-
+//
+// $Id$
+
+#include "ace/OS_Memory.h"
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+ACE_INLINE
+Safe_InputCDR::Safe_InputCDR(const char* buf, int size)
+: TAO_InputCDR((ACE_Message_Block*)0)
+{
+ if (ACE_ptr_align_binary(buf, ACE_CDR::MAX_ALIGNMENT) != buf) {
+ ACE_CDR::grow(&start_,size);
+ this->start_.copy(buf, size);
+ }
+ else {
+ this->start_.init(buf,size);
+ this->start_.wr_ptr(size);
+ }
+}
+
+TAO_END_VERSIONED_NAMESPACE_DECL