ACE_Configuration_Section_Key Class Reference

Reference counted wrapper for ACE_Section_Key_Internal. More...

#include <Configuration.h>

Collaboration diagram for ACE_Configuration_Section_Key:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACE_Configuration_Section_Key (void)
 Default constructor.

 ACE_Configuration_Section_Key (ACE_Section_Key_Internal *key)
 Constructor that initializes to a pointer to a concrete internal key.

 ACE_Configuration_Section_Key (const ACE_Configuration_Section_Key &rhs)
 Copy constructor, increments the reference count on the key.

 ~ACE_Configuration_Section_Key (void)
 Destructor, decrements reference count on the referenced key.

ACE_Configuration_Section_Keyoperator= (const ACE_Configuration_Section_Key &rhs)

Private Attributes

ACE_Section_Key_Internalkey_

Friends

class ACE_Configuration

Detailed Description

Reference counted wrapper for ACE_Section_Key_Internal.

Reference counted wrapper class for the abstract internal section key. A user gets one of these to represent a section in the configuration database.

Definition at line 98 of file Configuration.h.


Constructor & Destructor Documentation

ACE_Configuration_Section_Key::ACE_Configuration_Section_Key void   ) 
 

Default constructor.

Definition at line 42 of file Configuration.cpp.

00043   : key_ (0)
00044 {
00045 }

ACE_Configuration_Section_Key::ACE_Configuration_Section_Key ACE_Section_Key_Internal key  )  [explicit]
 

Constructor that initializes to a pointer to a concrete internal key.

Parameters:
key The section key to reference. Calls add_ref() with key.

Definition at line 53 of file Configuration.cpp.

References ACE_Section_Key_Internal::add_ref(), and key_.

00054   : key_ (key)
00055 {
00056   if (key_)
00057     key_->add_ref ();
00058 }

ACE_Configuration_Section_Key::ACE_Configuration_Section_Key const ACE_Configuration_Section_Key rhs  ) 
 

Copy constructor, increments the reference count on the key.

Definition at line 60 of file Configuration.cpp.

References ACE_Section_Key_Internal::add_ref(), and key_.

00061   : key_ (rhs.key_)
00062 {
00063   if (key_)
00064     key_->add_ref ();
00065 }

ACE_Configuration_Section_Key::~ACE_Configuration_Section_Key void   ) 
 

Destructor, decrements reference count on the referenced key.

Definition at line 47 of file Configuration.cpp.

References ACE_Section_Key_Internal::dec_ref(), and key_.

00048 {
00049   if (key_)
00050     key_->dec_ref ();
00051 }


Member Function Documentation

ACE_Configuration_Section_Key & ACE_Configuration_Section_Key::operator= const ACE_Configuration_Section_Key rhs  ) 
 

Assignment operator, increments reference count for this object and decrements it on rhs.

Definition at line 68 of file Configuration.cpp.

References ACE_Section_Key_Internal::add_ref(), ACE_Section_Key_Internal::dec_ref(), and key_.

00069 {
00070   if (this != &rhs)
00071     {
00072       if (key_)
00073         key_->dec_ref ();
00074 
00075       key_ = rhs.key_;
00076 
00077       if (key_)
00078         key_->add_ref ();
00079     }
00080   return *this;
00081 }


Friends And Related Function Documentation

friend class ACE_Configuration [friend]
 

Definition at line 100 of file Configuration.h.


Member Data Documentation

ACE_Section_Key_Internal* ACE_Configuration_Section_Key::key_ [private]
 

Definition at line 122 of file Configuration.h.

Referenced by ACE_Configuration_Section_Key(), ACE_Configuration::get_internal_key(), operator=(), and ~ACE_Configuration_Section_Key().


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 12:54:19 2008 for ACE by doxygen 1.3.6