2 #include "ace/Name_Space.h"
3 #include "ace/OS_NS_string.h"
4 #include "ace/OS_NS_stdlib.h"
7 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
9 ACE_Name_Binding::ACE_Name_Binding ()
12 type_ (ACE_OS::strdup (""))
14 ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
18 ACE_Name_Binding::~ACE_Name_Binding ()
20 ACE_TRACE ("ACE_Name_Binding::~ACE_Name_Binding");
21 #if defined (ACE_HAS_ALLOC_HOOKS)
22 ACE_Allocator::instance()->free ((void *) this->type_
);
24 ACE_OS::free ((void *) this->type_
);
25 #endif /* ACE_HAS_ALLOC_HOOKS */
28 ACE_Name_Binding::ACE_Name_Binding (const ACE_NS_WString
&name
,
29 const ACE_NS_WString
&value
,
33 type_ (type
== 0 ? ACE_OS::strdup ("") : ACE_OS::strdup (type
))
35 ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
38 ACE_Name_Binding::ACE_Name_Binding (const ACE_Name_Binding
&s
)
41 type_ (ACE_OS::strdup (s
.type_
))
43 ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
46 const ACE_Name_Binding
&
47 ACE_Name_Binding::operator = (const ACE_Name_Binding
&s
)
49 ACE_TRACE ("ACE_Name_Binding::operator =");
53 #if defined (ACE_HAS_ALLOC_HOOKS)
54 ACE_Allocator::instance()->free ((void *) this->type_
);
56 ACE_OS::free ((void *) this->type_
);
57 #endif /* ACE_HAS_ALLOC_HOOKS */
58 this->name_
= s
.name_
;
59 this->value_
= s
.value_
;
60 this->type_
= ACE_OS::strdup (s
.type_
);
67 ACE_Name_Binding::operator == (const ACE_Name_Binding
&s
) const
69 ACE_TRACE ("ACE_Name_Binding::operator ==");
70 return this->name_
== s
.name_
71 && this->value_
== s
.value_
72 && ACE_OS::strcmp (this->type_
, s
.type_
) == 0;
75 ACE_Name_Space::~ACE_Name_Space ()
77 ACE_TRACE ("ACE_Name_Space::~ACE_Name_Space");
80 ACE_END_VERSIONED_NAMESPACE_DECL