summaryrefslogtreecommitdiff
path: root/TAO/tao/String_Traits_Base_T.h
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:11 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:11 +0000
commit6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (patch)
treeda50d054f9c761c3f6a5923f6979e93306c56d68 /TAO/tao/String_Traits_Base_T.h
parent0e555b9150d38e3b3473ba325b56db2642e6352b (diff)
downloadATCD-6b846cf03c0bcbd8c276cb0af61a181e5f98eaae.tar.gz
Repo restructuring
Diffstat (limited to 'TAO/tao/String_Traits_Base_T.h')
-rw-r--r--TAO/tao/String_Traits_Base_T.h112
1 files changed, 0 insertions, 112 deletions
diff --git a/TAO/tao/String_Traits_Base_T.h b/TAO/tao/String_Traits_Base_T.h
deleted file mode 100644
index 0ab07b3a539..00000000000
--- a/TAO/tao/String_Traits_Base_T.h
+++ /dev/null
@@ -1,112 +0,0 @@
-#ifndef guard_string_traits_base_hpp
-#define guard_string_traits_base_hpp
-/**
- * @file
- *
- * @brief Isolate the string_traits from the accidental differences
- * between wstring and string.
- *
- * $Id$
- *
- * @author Carlos O'Ryan
- */
-
-#include "tao/String_Alloc.h"
-#include "ace/CDR_Stream.h"
-
-TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-
-namespace TAO
-{
-template<typename charT>
-class String_Manager_T;
-
-template<typename charT>
-class String_var;
-
-template<typename charT>
-class String_out;
-
-namespace details
-{
-
-template<typename charT>
-struct string_traits_base
-{
-};
-
-template<>
-struct string_traits_base<char>
-{
- typedef char char_type;
- typedef TAO::String_var <char_type> string_var;
- typedef TAO::String_out <char_type> string_out;
- typedef TAO::String_Manager_T <char_type> string_mgr;
- typedef ACE_InputCDR::to_string to_type;
- typedef ACE_OutputCDR::from_string from_type;
-
- inline static char_type * default_initializer()
- {
- return CORBA::string_dup("");
- }
-
- inline static char_type * duplicate(char_type const * s)
- {
- return CORBA::string_dup(s);
- }
-
- inline static void release(char_type * s)
- {
- CORBA::string_free(s);
- }
-
- inline static char_type * allocate (CORBA::ULong len)
- {
- return CORBA::string_alloc (len);
- }
-};
-
-template<>
-struct string_traits_base<CORBA::WChar>
-{
- typedef CORBA::WChar char_type;
- typedef TAO::String_var <char_type> string_var;
- typedef TAO::String_out <char_type> string_out;
- typedef TAO::String_Manager_T <char_type> string_mgr;
- typedef ACE_InputCDR::to_wstring to_type;
- typedef ACE_OutputCDR::from_wstring from_type;
-
- inline static char_type * default_initializer()
- {
-#if defined(ACE_HAS_WCHAR) || defined(ACE_HAS_XPG4_MULTIBYTE_CHAR)
- return CORBA::wstring_dup(L"");
-#else
-//#warning "platform not configured with native wchar_t support"
-// static CORBA::WChar empty[] = { 0 };
- CORBA::WChar empty[] = { 0 };
- return CORBA::wstring_dup(empty);
-#endif /* 0 */
- }
-
- inline static char_type * duplicate(char_type const * s)
- {
- return CORBA::wstring_dup(s);
- }
-
- inline static void release(char_type * s)
- {
- CORBA::wstring_free(s);
- }
-
- inline static char_type * allocate (CORBA::ULong len)
- {
- return CORBA::wstring_alloc (len);
- }
-};
-
-} // namespace details
-} // namespace TAO
-
-TAO_END_VERSIONED_NAMESPACE_DECL
-
-#endif // guard_string_traits_base_hpp