5 #include "ace/OS_NS_stdlib.h"
6 #include "ace/OS_NS_string.h"
7 #include "ace/Name_Space.h"
10 // Listing 1 code/ch21
14 Name_Binding (ACE_Name_Binding
*entry
)
16 this->name_
= entry
->name_
.char_rep ();
17 this->value_
= entry
->value_
.char_rep ();
18 this->type_
= ACE_OS::strdup (entry
->type_
);
21 Name_Binding (const ACE_NS_WString
&n
,
22 const ACE_NS_WString
&v
,
25 this->name_
= n
.char_rep ();
26 this->value_
= v
.char_rep ();
27 this->type_
= ACE_OS::strdup (t
);
33 delete[] this->value_
;
34 ACE_OS::free (const_cast<char*> (this->type_
));
39 { return this->name_
; }
42 { return this->value_
; }
45 { return this->type_
; }
48 { return ACE_OS::atoi (this->value ()); }
56 typedef std::unique_ptr
<Name_Binding
> Name_Binding_Ptr
;
59 #endif /* NAME_BINDING_H */