Public Member Functions | Public Attributes

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.
const ACE_Name_Bindingoperator= (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.

  : name_ (name),
    value_ (value),
    type_ (type == 0 ? ACE_OS::strdup ("") : ACE_OS::strdup (type))
{
  ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
}

ACE_Name_Binding::ACE_Name_Binding ( void   ) 

Default constructor.

Definition at line 12 of file Name_Space.cpp.

  : name_ (),
    value_ (),
    type_ (ACE_OS::strdup (""))
{
  ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
}

ACE_Name_Binding::ACE_Name_Binding ( const ACE_Name_Binding s  ) 

Copy constructor.

Definition at line 37 of file Name_Space.cpp.

  : name_ (s.name_),
    value_ (s.value_),
    type_ (ACE_OS::strdup (s.type_))
{
  ACE_TRACE ("ACE_Name_Binding::ACE_Name_Binding");
}

ACE_Name_Binding::~ACE_Name_Binding ( void   ) 

Destructor.

Definition at line 21 of file Name_Space.cpp.

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


Member Function Documentation

const ACE_Name_Binding & ACE_Name_Binding::operator= ( const ACE_Name_Binding s  ) 

Assignment operator.

Definition at line 46 of file Name_Space.cpp.

{
  ACE_TRACE ("ACE_Name_Binding::operator =");

  if (this != &s)
    {
      ACE_OS::free ((void *) this->type_);
      this->name_ = s.name_;
      this->value_ = s.value_;
      this->type_ = ACE_OS::strdup (s.type_);
    }

  return *this;
}

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

Test for equality.

Definition at line 62 of file Name_Space.cpp.

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


Member Data Documentation

Name of the binding.

Definition at line 61 of file Name_Space.h.

Type of the binding.

Definition at line 67 of file Name_Space.h.

Value of the binding.

Definition at line 64 of file Name_Space.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines