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

00047   : key_ (0)
00048 {
00049 }

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

References ACE_Section_Key_Internal::add_ref(), and key_.

00058   : key_ (key)
00059 {
00060   if (key_)
00061     key_->add_ref ();
00062 }

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

References ACE_Section_Key_Internal::add_ref(), and key_.

00065   : key_ (rhs.key_)
00066 {
00067   if (key_)
00068     key_->add_ref ();
00069 }

ACE_Configuration_Section_Key::~ACE_Configuration_Section_Key ( void   ) 

Destructor, decrements reference count on the referenced key.

Definition at line 51 of file Configuration.cpp.

References ACE_Section_Key_Internal::dec_ref(), and key_.

00052 {
00053   if (key_)
00054     key_->dec_ref ();
00055 }


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

References ACE_Section_Key_Internal::add_ref(), and key_.

00073 {
00074   if (this != &rhs)
00075     {
00076       if (key_)
00077         key_->dec_ref ();
00078 
00079       key_ = rhs.key_;
00080 
00081       if (key_)
00082         key_->add_ref ();
00083     }
00084   return *this;
00085 }


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 Tue Feb 2 17:35:00 2010 for ACE by  doxygen 1.4.7