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 41 of file Configuration.cpp.

00042   : key_ (0)
00043 {
00044 }

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 52 of file Configuration.cpp.

References ACE_Section_Key_Internal::add_ref(), and key_.

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

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 59 of file Configuration.cpp.

References ACE_Section_Key_Internal::add_ref(), and key_.

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

ACE_Configuration_Section_Key::~ACE_Configuration_Section_Key void   ) 
 

Destructor, decrements reference count on the referenced key.

Definition at line 46 of file Configuration.cpp.

References ACE_Section_Key_Internal::dec_ref(), and key_.

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


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 67 of file Configuration.cpp.

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

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


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 Thu Nov 9 11:20:57 2006 for ACE by doxygen 1.3.6