ACE_Name_Binding Class Reference

Maintains a mapping from name to value and type. More...

#include <Name_Space.h>

Collaboration diagram for ACE_Name_Binding:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACE_Name_Binding (const ACE_NS_WString &n, const ACE_NS_WString &v, const char *t)
 Main constructor that initializes all the fields.

 ACE_Name_Binding (void)
 Default constructor.

 ACE_Name_Binding (const ACE_Name_Binding &)
 Copy constructor.

void operator= (const ACE_Name_Binding &)
 Assignment operator.

 ~ACE_Name_Binding (void)
 Destructor.

bool operator== (const ACE_Name_Binding &s) const
 Test for equality.


Public Attributes

ACE_NS_WString name_
 Name of the binding.

ACE_NS_WString value_
 Value of the binding.

char * type_
 Type of the binding.


Detailed Description

Maintains a mapping from name to value and type.

Definition at line 36 of file Name_Space.h.


Constructor & Destructor Documentation

ACE_Name_Binding::ACE_Name_Binding const ACE_NS_WString n,
const ACE_NS_WString v,
const char *  t
 

Main constructor that initializes all the fields.

Definition at line 27 of file Name_Space.cpp.

References ACE_TRACE.

00030   : name_ (name),
00031     value_ (value),
00032     type_ (type == 0 ? ACE_OS::strdup ("") : ACE_OS::strdup (type))
00033 {
00034   ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
00035 }

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Name_Binding::ACE_Name_Binding void   ) 
 

Default constructor.

Definition at line 12 of file Name_Space.cpp.

References ACE_TRACE.

00013   : name_ (),
00014     value_ (),
00015     type_ (ACE_OS::strdup (""))
00016 {
00017   ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
00018 }

ACE_Name_Binding::ACE_Name_Binding const ACE_Name_Binding  ) 
 

Copy constructor.

Definition at line 37 of file Name_Space.cpp.

References ACE_TRACE.

00038   : name_ (s.name_),
00039     value_ (s.value_),
00040     type_ (ACE_OS::strdup (s.type_))
00041 {
00042   ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
00043 }

ACE_Name_Binding::~ACE_Name_Binding void   ) 
 

Destructor.

Definition at line 21 of file Name_Space.cpp.

References ACE_TRACE, and ACE_OS::free().

00022 {
00023   ACE_TRACE ("ACE_Name_Binding::~ACE_Name_Binding");
00024   ACE_OS::free ((void *) this->type_);
00025 }


Member Function Documentation

void ACE_Name_Binding::operator= const ACE_Name_Binding  ) 
 

Assignment operator.

Definition at line 46 of file Name_Space.cpp.

References ACE_TRACE, ACE_OS::free(), name_, ACE_OS::strdup(), type_, and value_.

00047 {
00048   ACE_TRACE ("ACE_Name_Binding::operator =");
00049 
00050   if (this != &s)
00051     {
00052       ACE_OS::free ((void *) this->type_);
00053       this->name_ = s.name_;
00054       this->value_ = s.value_;
00055       this->type_ = ACE_OS::strdup (s.type_);
00056     }
00057 }

bool ACE_Name_Binding::operator== const ACE_Name_Binding s  )  const
 

Test for equality.

Definition at line 60 of file Name_Space.cpp.

References ACE_TRACE, name_, ACE_OS::strcmp(), type_, and value_.

00061 {
00062   ACE_TRACE ("ACE_Name_Binding::operator ==");
00063   return this->name_ == s.name_
00064     && this->value_ == s.value_
00065     && ACE_OS::strcmp (this->type_, s.type_) == 0;
00066 }


Member Data Documentation

ACE_NS_WString ACE_Name_Binding::name_
 

Name of the binding.

Definition at line 61 of file Name_Space.h.

Referenced by ACE_Registry_Name_Space::list_names(), operator=(), and operator==().

char* ACE_Name_Binding::type_
 

Type of the binding.

Definition at line 67 of file Name_Space.h.

Referenced by operator=(), and operator==().

ACE_NS_WString ACE_Name_Binding::value_
 

Value of the binding.

Definition at line 64 of file Name_Space.h.

Referenced by ACE_Registry_Name_Space::list_values(), operator=(), and operator==().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:25:25 2006 for ACE by doxygen 1.3.6