Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

corbafwd.cpp

Go to the documentation of this file.
00001 #include "tao_pch.h"
00002 // $Id: corbafwd.cpp,v 1.1.1.3.2.2 2003/04/21 19:10:25 chad Exp $
00003 
00004 #include "tao/corbafwd.h"
00005 
00006 #if !defined (__ACE_INLINE__)
00007 # include "tao/corbafwd.i"
00008 #endif /* ! __ACE_INLINE__ */
00009 
00010 ACE_RCSID (tao, 
00011            corbafwd, 
00012            "$Id: corbafwd.cpp,v 1.1.1.3.2.2 2003/04/21 19:10:25 chad Exp $")
00013 
00014 char *
00015 CORBA::string_dup (const char *str)
00016 {
00017   if (!str)
00018     {
00019       errno = EINVAL;
00020       return 0;
00021     }
00022 
00023   size_t len = ACE_OS::strlen (str);
00024 
00025   // This allocates an extra byte for the '\0';
00026   char * copy = CORBA::string_alloc (ACE_static_cast(CORBA::ULong, len));
00027 
00028   // The memcpy() below assumes that the destination is a valid buffer.  
00029   if (copy == 0)
00030     {
00031       return 0;
00032     }
00033 
00034   ACE_OS::memcpy (copy, 
00035                   str, 
00036                   len + 1);
00037   return copy;
00038 }
00039 
00040 // ----------------------------------------------------------------------
00041 // Wide strings
00042 // ----------------------------------------------------------------------
00043 
00044 CORBA::WChar*
00045 CORBA::wstring_dup (const WChar *const str)
00046 {
00047   if (!str)
00048     {
00049       errno = EINVAL;
00050       return 0;
00051     }
00052 
00053   CORBA::WChar* retval = CORBA::wstring_alloc (ACE_OS::wslen (str));
00054 
00055   // The wscpy() below assumes that the destination is a valid buffer.
00056   if (retval == 0)
00057     {
00058       return 0;
00059     }
00060 
00061   return ACE_OS::wscpy (retval, 
00062                         str);
00063 }
00064 
00065 // ****************************************************************
00066 
00067 TAO_NAMESPACE_TYPE (const CORBA::ServiceType)
00068 TAO_NAMESPACE_BEGIN (CORBA)
00069 TAO_NAMESPACE_DEFINE (const CORBA::ServiceType, Security, 1)
00070 TAO_NAMESPACE_END
00071 
00072 // ****************************************************************
00073 
00074 TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
00075 TAO_NAMESPACE_BEGIN (CORBA)
00076 TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_Visibility, 0)
00077 TAO_NAMESPACE_END
00078 
00079 TAO_NAMESPACE_TYPE (const CORBA::Visibility)
00080 TAO_NAMESPACE_BEGIN (CORBA)
00081 TAO_NAMESPACE_DEFINE (const CORBA::Visibility, PRIVATE_MEMBER, 0)
00082 TAO_NAMESPACE_END
00083 TAO_NAMESPACE_TYPE (const CORBA::Visibility)
00084 TAO_NAMESPACE_BEGIN (CORBA)
00085 TAO_NAMESPACE_DEFINE (const CORBA::Visibility, PUBLIC_MEMBER, 1)
00086 TAO_NAMESPACE_END
00087 
00088 TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
00089 TAO_NAMESPACE_BEGIN (CORBA)
00090 TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ValueModifier, 0)
00091 TAO_NAMESPACE_END
00092 
00093 TAO_NAMESPACE_TYPE (const CORBA::ValueModifier)
00094 TAO_NAMESPACE_BEGIN (CORBA)
00095 TAO_NAMESPACE_DEFINE (const CORBA::ValueModifier, VM_NONE, 0)
00096 TAO_NAMESPACE_END
00097 TAO_NAMESPACE_TYPE (const CORBA::ValueModifier)
00098 TAO_NAMESPACE_BEGIN (CORBA)
00099 TAO_NAMESPACE_DEFINE (const CORBA::ValueModifier, VM_CUSTOM, 1)
00100 TAO_NAMESPACE_END
00101 TAO_NAMESPACE_TYPE (const CORBA::ValueModifier)
00102 TAO_NAMESPACE_BEGIN (CORBA)
00103 TAO_NAMESPACE_DEFINE (const CORBA::ValueModifier, VM_ABSTRACT, 2)
00104 TAO_NAMESPACE_END
00105 TAO_NAMESPACE_TYPE (const CORBA::ValueModifier)
00106 TAO_NAMESPACE_BEGIN (CORBA)
00107 TAO_NAMESPACE_DEFINE (const CORBA::ValueModifier, VM_TRUNCATABLE, 3)
00108 TAO_NAMESPACE_END
00109 

Generated on Mon Jun 16 13:48:10 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002