summaryrefslogtreecommitdiff
path: root/tao/AnyTypeCode/Any.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tao/AnyTypeCode/Any.cpp')
-rw-r--r--tao/AnyTypeCode/Any.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/tao/AnyTypeCode/Any.cpp b/tao/AnyTypeCode/Any.cpp
index 279f45ff238..b3cc6a9e3b0 100644
--- a/tao/AnyTypeCode/Any.cpp
+++ b/tao/AnyTypeCode/Any.cpp
@@ -527,9 +527,23 @@ operator <<= (CORBA::Any &any, const std::string & str)
void
operator <<= (CORBA::Any &, std::string *)
{
- // TODO
+ // @todo
}
+#if !defined(ACE_LACKS_STD_WSTRING)
+void
+operator <<= (CORBA::Any &any, const std::wstring & str)
+{
+ any <<= str.c_str ();
+}
+
+void
+operator <<= (CORBA::Any &, std::wstring *)
+{
+ // @todo
+}
+#endif
+
// Extraction: these are safe and hence we have to check that the
// typecode of the Any is equal to the one we are trying to extract
// into.
@@ -745,6 +759,18 @@ operator >>= (const CORBA::Any &any, std::string &str)
return flag;
}
+#if !defined(ACE_LACKS_STD_WSTRING)
+CORBA::Boolean
+operator >>= (const CORBA::Any &any, std::wstring &str)
+{
+ const wchar_t *buf = 0;
+ CORBA::Boolean const flag = any >>= buf;
+ str.assign (buf);
+ ACE::strdelete (const_cast <wchar_t *> (buf));
+ return flag;
+}
+#endif
+
#ifdef ACE_ANY_OPS_USE_NAMESPACE
}
#endif