Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Configuration_Value_IntId Class Reference

The section hash table internal value class. More...

#include <Configuration.h>

List of all members.

Public Methods

 ACE_Configuration_Value_IntId (void)
 Default constructor. More...

ACE_EXPLICIT ACE_Configuration_Value_IntId (ACE_TCHAR *string)
 String constructor, takes ownership of string. More...

ACE_EXPLICIT ACE_Configuration_Value_IntId (u_int integer)
 Integer constructor. More...

 ACE_Configuration_Value_IntId (void *data, size_t length)
 Binary constructor, takes ownership of data. More...

 ACE_Configuration_Value_IntId (const ACE_Configuration_Value_IntId &rhs)
 Copy ctor. More...

 ~ACE_Configuration_Value_IntId (void)
 Destructor. More...

ACE_Configuration_Value_IntId & operator= (const ACE_Configuration_Value_IntId &rhs)
 Assignment operator. More...

void free (ACE_Allocator *alloc)

Public Attributes

ACE_Configuration::VALUETYPE type_
union {
   void *   ptr_
   u_int   int_
data_
size_t length_


Detailed Description

The section hash table internal value class.

This class is present as the internal portion of a section's value hash table It may store string, integer or binary data.

Definition at line 615 of file Configuration.h.


Constructor & Destructor Documentation

ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId void   
 

Default constructor.

Definition at line 1071 of file Configuration.cpp.

References data_.

01072   : type_ (ACE_Configuration::INVALID),
01073     length_ (0)
01074 {
01075   this->data_.ptr_ = 0;
01076 }

ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId ACE_TCHAR   string
 

String constructor, takes ownership of string.

Definition at line 1078 of file Configuration.cpp.

References ACE_TCHAR, and data_.

01079   : type_ (ACE_Configuration::STRING),
01080     length_ (0)
01081 {
01082   this->data_.ptr_ = string;
01083 }

ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId u_int    integer
 

Integer constructor.

Definition at line 1085 of file Configuration.cpp.

References data_.

01086   : type_ (ACE_Configuration::INTEGER),
01087     length_ (0)
01088 {
01089   this->data_.int_ = integer;
01090 }

ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId void *    data,
size_t    length
 

Binary constructor, takes ownership of data.

Definition at line 1092 of file Configuration.cpp.

References data_.

01093   : type_ (ACE_Configuration::BINARY),
01094     length_ (length)
01095 {
01096   this->data_.ptr_ = data;
01097 }

ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId const ACE_Configuration_Value_IntId &    rhs
 

Copy ctor.

Definition at line 1099 of file Configuration.cpp.

01100   : type_ (rhs.type_),
01101     data_ (rhs.data_),
01102     length_ (rhs.length_)
01103 {
01104 }

ACE_Configuration_Value_IntId::~ACE_Configuration_Value_IntId void   
 

Destructor.

Definition at line 1106 of file Configuration.cpp.

01107 {
01108 }


Member Function Documentation

void ACE_Configuration_Value_IntId::free ACE_Allocator   alloc
 

Definition at line 1122 of file Configuration.cpp.

References ACE_Configuration::BINARY, data_, ACE_Allocator::free, ACE_Configuration::STRING, and type_.

Referenced by ACE_Configuration_Heap::remove_section, ACE_Configuration_Heap::remove_value, ACE_Configuration_Heap::set_binary_value, and ACE_Configuration_Heap::set_string_value.

01123 {
01124   if (this->type_ == ACE_Configuration::STRING
01125       || this->type_ == ACE_Configuration::BINARY)
01126     alloc->free (data_.ptr_);
01127   // Do nothing in other cases...
01128 }

ACE_Configuration_Value_IntId & ACE_Configuration_Value_IntId::operator= const ACE_Configuration_Value_IntId &    rhs
 

Assignment operator.

Definition at line 1110 of file Configuration.cpp.

References data_, length_, and type_.

01111 {
01112   if (this != &rhs)
01113     {
01114       type_ = rhs.type_;
01115       data_ = rhs.data_;
01116       length_ = rhs.length_;
01117     }
01118   return *this;
01119 }


Member Data Documentation

union { ... } ACE_Configuration_Value_IntId::data_
 

Referenced by ACE_Configuration_Value_IntId, free, ACE_Configuration_Heap::get_binary_value, ACE_Configuration_Heap::get_integer_value, ACE_Configuration_Heap::get_string_value, and operator=.

u_int ACE_Configuration_Value_IntId::int_
 

Definition at line 651 of file Configuration.h.

size_t ACE_Configuration_Value_IntId::length_
 

Definition at line 653 of file Configuration.h.

Referenced by ACE_Configuration_Heap::get_binary_value, and operator=.

void* ACE_Configuration_Value_IntId::ptr_
 

Definition at line 650 of file Configuration.h.

ACE_Configuration::VALUETYPE ACE_Configuration_Value_IntId::type_
 

Points to the string value or binary data or IS the integer Length is only used when type_ == BINARY

Definition at line 648 of file Configuration.h.

Referenced by ACE_Configuration_Heap::find_value, free, ACE_Configuration_Heap::get_binary_value, ACE_Configuration_Heap::get_integer_value, ACE_Configuration_Heap::get_string_value, and operator=.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:46:51 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002