2 #include "ace/Name_Space.h"
3 #include "ace/OS_NS_string.h"
4 #include "ace/OS_NS_stdlib.h"
8 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
10 ACE_Name_Binding::ACE_Name_Binding (void)
13 type_ (ACE_OS::strdup (""))
15 ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
19 ACE_Name_Binding::~ACE_Name_Binding (void)
21 ACE_TRACE ("ACE_Name_Binding::~ACE_Name_Binding");
22 #if defined (ACE_HAS_ALLOC_HOOKS)
23 ACE_Allocator::instance()->free ((void *) this->type_
);
25 ACE_OS::free ((void *) this->type_
);
26 #endif /* ACE_HAS_ALLOC_HOOKS */
29 ACE_Name_Binding::ACE_Name_Binding (const ACE_NS_WString
&name
,
30 const ACE_NS_WString
&value
,
34 type_ (type
== 0 ? ACE_OS::strdup ("") : ACE_OS::strdup (type
))
36 ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
39 ACE_Name_Binding::ACE_Name_Binding (const ACE_Name_Binding
&s
)
42 type_ (ACE_OS::strdup (s
.type_
))
44 ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
47 const ACE_Name_Binding
&
48 ACE_Name_Binding::operator = (const ACE_Name_Binding
&s
)
50 ACE_TRACE ("ACE_Name_Binding::operator =");
54 #if defined (ACE_HAS_ALLOC_HOOKS)
55 ACE_Allocator::instance()->free ((void *) this->type_
);
57 ACE_OS::free ((void *) this->type_
);
58 #endif /* ACE_HAS_ALLOC_HOOKS */
59 this->name_
= s
.name_
;
60 this->value_
= s
.value_
;
61 this->type_
= ACE_OS::strdup (s
.type_
);
68 ACE_Name_Binding::operator == (const ACE_Name_Binding
&s
) const
70 ACE_TRACE ("ACE_Name_Binding::operator ==");
71 return this->name_
== s
.name_
72 && this->value_
== s
.value_
73 && ACE_OS::strcmp (this->type_
, s
.type_
) == 0;
76 ACE_Name_Space::~ACE_Name_Space (void)
78 ACE_TRACE ("ACE_Name_Space::~ACE_Name_Space");
81 ACE_END_VERSIONED_NAMESPACE_DECL