Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / Notify / lib / common.cpp
blob08267c1047f49c8339b1cb200fa3ab28a3121e0c
1 #include "common.h"
3 #include "orbsvcs/CosNotifyCommC.h"
4 #include "orbsvcs/CosNamingC.h"
5 #include "ace/OS_NS_stdio.h"
6 #include "ace/OS_NS_string.h"
9 const char*
10 Any_String (const CORBA::Any& any)
12 static char out[256] = "";
13 CORBA::Short s;
14 CORBA::UShort us;
15 CORBA::Long l;
16 CORBA::ULong ul;
17 CORBA::ULongLong ull;
18 const char* str;
20 if (any >>= s)
22 ACE_OS::sprintf (out, ACE_INT16_FORMAT_SPECIFIER_ASCII, s);
24 else if (any >>= us)
26 ACE_OS::sprintf (out, ACE_UINT16_FORMAT_SPECIFIER_ASCII, us);
28 else if (any >>= l)
30 ACE_OS::sprintf (out, ACE_INT32_FORMAT_SPECIFIER_ASCII, l);
32 else if (any >>= ul)
34 ACE_OS::sprintf (out, ACE_UINT32_FORMAT_SPECIFIER_ASCII, ul);
36 else if (any >>= str)
38 ACE_OS::strcpy (out, str);
40 else if (any >>= ull)
42 ACE_OS::sprintf (out, ACE_UINT64_FORMAT_SPECIFIER_ASCII, ull);
44 else
46 ACE_OS::strcpy (out, "Unsupported Any Type");
49 return out;