it_bus/string_operators.h

00001 //  @Copyright (c) 2004 IONA Technologies PLC. All Rights Reserved.
00002 //
00003 
00004 #ifndef _IT_BUS_USTRING_OPERATORS_H_
00005 #define _IT_BUS_USTRING_OPERATORS_H_
00006 
00007 #include <it_bus/string.h>
00008 #include <it_bus/binary_buffer.h>
00009 #include <omg/orb.hh>      
00010 
00011 // This operator can be used to resolve ambiguities when trying to
00012 // apply operator+ between CORBA::String_var and IT_Bus::UString.
00013 // It is separate to the other operators because it has a dependency
00014 // on the CORBA libraries, and hence if this file is included you must
00015 // then link with the core ART library.
00016 //
00017 inline IT_Bus::String
00018 operator+(
00019     const IT_Bus::String& s1,
00020     const CORBA::String_var& s2
00021 )
00022 {
00023     IT_Bus::String newstr(s1, 0, IT_Bus::String::npos, s1.it_eh());
00024     newstr += IT_Bus::String((const char*) s2, IT_Bus::String::npos, s1.it_eh());
00025     return newstr;
00026 }
00027 
00028 #endif  

Generated on Thu Sep 7 11:39:06 2006 for Artix by  doxygen 1.4.7