blob: 0f33927253b3d6571a97d89f251fa4c3169038fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
// ============================================================================
//
// = LIBRARY
// TAO
//
// = FILENAME
// managed_types.cpp
//
// = DESCRIPTION
// C++ mapping of sequences of strings/objrefs or struct/union members with
// strings/objrefs require a special managed type. These types are define
// din this header file.
// = AUTHOR
// Aniruddha Gokhale
//
// ============================================================================
#include "tao/corba.h"
TAO_String_ManagedType &
TAO_String_ManagedType::operator= (char *p)
{
if (this->ptr_ != p)
{
if ((this->ptr_ != 0) && this->release_)
CORBA::string_free (this->ptr_);
this->ptr_ = p;
}
return *this;
}
TAO_String_ManagedType &
TAO_String_ManagedType::operator= (const char *p)
{
if ((this->ptr_ != 0) && this->release_)
CORBA::string_free (this->ptr_);
this->ptr_ = CORBA::string_dup (p);
return *this;
}
TAO_String_ManagedType &
TAO_String_ManagedType::operator= (const TAO_String_ManagedType& r)
{
if ((this->ptr_ != 0) && this->release_)
CORBA::string_free (this->ptr_);
this->ptr_ = CORBA::string_dup (r.ptr_);
return *this;
}
|