summaryrefslogtreecommitdiff
path: root/ace/CDR_Stream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ace/CDR_Stream.cpp')
-rw-r--r--ace/CDR_Stream.cpp42
1 files changed, 37 insertions, 5 deletions
diff --git a/ace/CDR_Stream.cpp b/ace/CDR_Stream.cpp
index e64d13b2791..aea3198e0dd 100644
--- a/ace/CDR_Stream.cpp
+++ b/ace/CDR_Stream.cpp
@@ -1,5 +1,37 @@
+// CDR_Stream.cpp
// $Id$
+// Portions of this file are:
+// Copyright 1994-1995 by Sun Microsystems Inc.
+// All Rights Reserved
+
+// CDR: Encode/Decode basic machine data types
+//
+// Implementation of OMG "Common Data Representation" (CDR) ... there
+// are one routine each for byte/halfword/word/doubleword put/get,
+// which adjust to establish "natural" alignment (the bulk of the
+// code) and then put or get with byteswapping as needed.
+//
+// The implementation knows that native data formats are conformant
+// with OMG-IDL's (and hence CDR's) size requirements, and relies on
+// the fact that (for example) CORBA's Long is always four bytes long
+// even if the environment's "int" is a different size.
+//
+// char, octet 8 bits (1 byte)
+// short, unsigned short 16 bits (2 bytes)
+// long, unsigned long, float 32 bits (4 bytes)
+// double, (unsigned) long long 64 bits (8 bytes)
+// long double 128 bits (16 bytes)
+//
+// Moreover, this "knows" that the native 'char' represents ISO
+// Latin/1 characters (an ASCII superset addressing Western European
+// characters) and that "double" and "float" comply with the IEEE
+// standards. (The "long double" may not be a native data type,
+// though.)
+//
+// THREADING NOTE: "CDR" is a data structure which must be protected
+// by external critical sections.
+
#define ACE_BUILD_DLL
#include "ace/CDR_Stream.h"
@@ -85,20 +117,20 @@ ACE_CDR::LongDouble::operator!= (const ACE_CDR::LongDouble &rhs) const
}
#endif /* NONNATIVE_LONGDOUBLE */
-#if defined(_UNICOS) && !defined(_CRAYMPP)
+#if defined(_UNICOS)
// placeholders to get things compiling
ACE_CDR::Float::Float()
{
}
-ACE_CDR::Float::Float(const float & init)
+ACE_CDR::Float::Float(const float & init))
{
}
-ACE_CDR::Float &
-ACE_CDR::Float::operator= (const float &rhs)
+float
+ACE_CDR::Float::operator= (const ACE_CDR::Float &rhs) const
{
- return *this;
+ return 0.0f;
}
int