What is the C++ size in the mapping for CORBA types?
A: The C++ size depends on the architecture and is not fixed in the specifications. For example the CORBA type The attached size_of.cpp small program prints the size of every relevant C++ and CORBA type size. Compile it using this command line: g++ -I$ACE_ROOT -I$ACE_ROOT/TAO -o size_of size_of.cpp and attach the output here below if it is for an architecture not already listed. Linux RH-E 4 on INTEL PC 32 bitssizeof(bool)=1 sizeof(char)=1 sizeof(short)=2 sizeof(int)=4 sizeof(long)=4 sizeof(long long)=8 sizeof(unsigned char)=1 sizeof(unsigned short)=2 sizeof(unsigned int)=4 sizeof(unsigned long)=4 sizeof(unsigned long long)=8 sizeof(float)=4 sizeof(double)=8 sizeof(long double)=12 sizeof(CORBA::Boolean)=1 sizeof(CORBA::Octet)=1 sizeof(CORBA::Char)=1 sizeof(CORBA::WChar)=4 sizeof(CORBA::Short)=2 sizeof(CORBA::UShort)=2 sizeof(CORBA::Long)=4 sizeof(CORBA::ULong)=4 sizeof(CORBA::LongLong)=8 sizeof(CORBA::ULongLong)=8 sizeof(CORBA::Float)=4 sizeof(CORBA::Double)=8 sizeof(CORBA::LongDouble)=16 Scientific Linux SL release 4.1 (Beryllium) on octuple AMD Opteron(tm) Processor 875 (8 dual core CPUs)Added for AIRUB, by courtesy of RolandLemke. -- ThomasJuerges - 10 Apr 2006 sizeof(bool)=1 sizeof(char)=1 sizeof(short)=2 sizeof(int)=4 sizeof(long)=8 sizeof(long long)=8 sizeof(unsigned char)=1 sizeof(unsigned short)=2 sizeof(unsigned int)=4 sizeof(unsigned long)=8 sizeof(unsigned long long)=8 sizeof(float)=4 sizeof(double)=8 sizeof(long double)=16 sizeof(CORBA::Boolean)=1 sizeof(CORBA::Octet)=1 sizeof(CORBA::Char)=1 sizeof(CORBA::WChar)=4 sizeof(CORBA::Short)=2 sizeof(CORBA::UShort)=2 sizeof(CORBA::Long)=4 sizeof(CORBA::ULong)=4 sizeof(CORBA::LongLong)=8 sizeof(CORBA::ULongLong)=8 sizeof(CORBA::Float)=4 sizeof(CORBA::Double)=8 sizeof(CORBA::LongDouble)=16 -- GianlucaChiozzi - 31 Mar 2006
|
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|